Super Java Host
  1. Home
  2. Guides
  3. Deploy Quarkus to a VPS

Deploy a Quarkus application to a VPS

Quarkus starts fast and uses little memory. Here is how to run it in JVM mode as a systemd service behind Nginx.

JVM mode or native?

A Quarkus application can run on a normal JVM or be compiled to a native executable with GraalVM. Native builds start in milliseconds and use less memory, but they take minutes and a lot of RAM to compile, and some libraries need extra configuration. For most small servers, JVM mode is the practical choice: it needs only a JDK, and with a modest heap it fits comfortably on a 2 GB server. Build natively on your computer or CI if you want it, then copy the binary the same way as below.

1. Package

The default package type is fast-jar: a folder, target/quarkus-app/, with quarkus-run.jar and its libraries. If you prefer one file, set quarkus.package.jar.type=uber-jar in application.properties.

./mvnw package -DskipTests        # or: ./gradlew build
ls target/quarkus-app/

2. Server preparation

sudo apt update
sudo apt install -y openjdk-21-jdk-headless nginx
sudo useradd --system --home-dir /opt/quarkus --shell /usr/sbin/nologin quarkus
sudo mkdir -p /opt/quarkus

3. Copy the application

rsync -az --delete target/quarkus-app/ user@your-server:/tmp/quarkus-app/
ssh user@your-server 'sudo rsync -a --delete /tmp/quarkus-app/ /opt/quarkus/ && sudo chown -R quarkus:quarkus /opt/quarkus'

With an uber-jar, copy the single file to /opt/quarkus/app.jar and change the ExecStart accordingly.

4. Settings through environment variables

Quarkus maps environment variables to properties, for example QUARKUS_HTTP_PORT or QUARKUS_DATASOURCE_JDBC_URL.

sudo tee /etc/quarkus.env >/dev/null <<'EOF'
QUARKUS_HTTP_HOST=127.0.0.1
QUARKUS_HTTP_PORT=8080
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING=true
QUARKUS_HTTP_PROXY_ALLOW_X_FORWARDED=true
EOF
sudo chmod 0640 /etc/quarkus.env && sudo chown root:quarkus /etc/quarkus.env

5. systemd service

sudo tee /etc/systemd/system/quarkus.service >/dev/null <<'EOF'
[Unit]
Description=Quarkus application
After=network.target

[Service]
User=quarkus
Group=quarkus
WorkingDirectory=/opt/quarkus
EnvironmentFile=/etc/quarkus.env
ExecStart=/usr/bin/java -Xms64m -Xmx256m -XX:+UseSerialGC -XX:+ExitOnOutOfMemoryError -jar /opt/quarkus/quarkus-run.jar
SuccessExitStatus=143
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now quarkus
curl -I http://127.0.0.1:8080/q/health 2>/dev/null | head -1

-XX:+UseSerialGC suits one or two CPU cores and a small heap. See choosing a garbage collector. The /q/health path exists only if you added the SmallRye Health extension.

6. Nginx and SSL

Use the same server block and Certbot steps as in deploy Spring Boot to a VPS, proxying to 127.0.0.1:8080.

Updating

rsync -az --delete target/quarkus-app/ user@your-server:/tmp/quarkus-app/
ssh user@your-server 'sudo rsync -a --delete /tmp/quarkus-app/ /opt/quarkus/ && sudo chown -R quarkus:quarkus /opt/quarkus && sudo systemctl restart quarkus'

Our Quarkus hosting servers start from €15.30 per month and come with this stack ready.

Last updated October 29, 2026.

Your own Java server, billed monthly

Plans from €15.30 a month. Set up for you, or run for you.