VorticPanel

Installation

Using your own web server

The installer sets up HTTPS with Caddy. If the server already runs nginx (or another web server) for something else, install with --no-proxy instead, and put your web server in front of the panel:

curl -fsSL https://vorticpanel.com/install.sh | sudo bash -s -- --no-proxy --domain panel.example.com

The panel listens on 127.0.0.1:8080, without TLS, and only answers on this server. Your web server runs on the same machine and has to:

  • forward everything for the panel’s domain to http://127.0.0.1:8080
  • pass WebSocket upgrades: nodes and consoles use them, on /agent/v1/connect, /agent/v1/console/…, /agent/v1/notebook/… and /console/v1/…
  • send the visitor’s address in X-Forwarded-For
  • accept request bodies of up to 8 MB: nodes send backup pieces of up to 6 MB through the panel to SFTP backup storage

nginx, step by step

1. Install nginx and Certbot (for the free certificate):

apt-get install -y nginx certbot python3-certbot-nginx

2. Create the site’s file, /etc/nginx/sites-available/panel. This opens it in the nano editor:

nano /etc/nginx/sites-available/panel

Paste this in, change panel.example.com to your domain, then save with Ctrl+O, Enter and Ctrl+X:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 80;
    server_name panel.example.com;

    # Nodes send backup pieces of up to 6 MB through the panel.
    client_max_body_size 8m;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        # Backup downloads stream for as long as they take.
        proxy_buffering off;
        proxy_read_timeout 1h;
    }
}

3. Switch the site on, check the configuration, and reload nginx:

ln -s /etc/nginx/sites-available/panel /etc/nginx/sites-enabled/panel
nginx -t && systemctl reload nginx

nginx -t should say syntax is ok and test is successful.

4. Get the certificate. Certbot adds HTTPS to the file you made, and redirects http to https:

certbot --nginx -d panel.example.com --redirect

Check: https://panel.example.com shows the sign-in page with a valid certificate. Certbot renews the certificate.

Caddy

What the installer writes to /etc/caddy/Caddyfile, if you’d rather set Caddy up yourself. Caddy gets the certificates and passes WebSockets without extra settings. In it:

  • admin off turns off Caddy’s local admin API.
  • read_header 10s drops clients that take longer than 10 seconds to send a request’s headers.
  • strict_sni_host on makes each request’s Host match the name its TLS connection was opened for.
  • The body limits are 8 MB for nodes’ backup pieces, 2 MB for everything else and 32 MB for JupyterLab.
  • The on_demand_tls block and the https:// site at the end serve JupyterLab over HTTPS: Caddy gets a certificate for an instance’s address the first time it’s opened, once the panel confirms it’s one.
{
	admin off
	on_demand_tls {
		ask http://127.0.0.1:8080/_tls/notebook
	}
	servers {
		timeouts {
			read_header 10s
		}
		strict_sni_host on
	}
}

panel.example.com {
	@not_relay not path /agent/v1/objects/*
	request_body @not_relay {
		max_size 2MB
	}
	request_body /agent/v1/objects/* {
		max_size 8MB
	}
	header >Strict-Transport-Security "max-age=31536000; includeSubDomains"
	reverse_proxy 127.0.0.1:8080
}

https:// {
	tls {
		on_demand
	}
	request_body {
		max_size 32MB
	}
	reverse_proxy 127.0.0.1:8080
}

Then systemctl restart caddy. With the admin API off, systemctl reload caddy can’t apply changes.

JupyterLab over HTTPS

With a notebook domain set in the panel, every address under it (*.gpu.example.com) is a GPU instance’s JupyterLab, which the panel serves too. Your web server has to:

  • forward every address under the notebook domain to http://127.0.0.1:8080, keeping the Host header as the browser sent it, and passing WebSocket upgrades (JupyterLab’s kernels and terminals use them)
  • serve them over HTTPS with a certificate that covers *.gpu.example.com
  • send the visitor’s address in X-Forwarded-For
  • accept request bodies of up to 32 MB

A wildcard certificate needs the DNS challenge. With nginx, Certbot gets one through your DNS provider’s plugin (python3-certbot-dns-cloudflare for Cloudflare, for example):

certbot certonly --dns-cloudflare --dns-cloudflare-credentials /root/cloudflare.ini -d '*.gpu.example.com'

Then a second server block like the panel’s, with server_name *.gpu.example.com;, client_max_body_size 32m;, listen 443 ssl; and that certificate’s ssl_certificate and ssl_certificate_key lines.

Another proxy in front

The panel only believes X-Forwarded-For from addresses in PANEL_TRUSTED_PROXIES (just this machine, by default), which covers your web server. If something else sits in front of it, such as a load balancer or a CDN, change the PANEL_TRUSTED_PROXIES line in /etc/panel/controller.env to add its addresses or ranges, keeping loopback:

PANEL_TRUSTED_PROXIES=loopback,10.0.0.5

Then restart the panel:

systemctl restart panel

Upgrades keep the line. Without it, sign-in limits, IP allowlists and the audit log see the proxy’s address instead of the visitor’s.

With the installer’s own Caddy, give the addresses to the installer instead (--trusted-proxies 10.0.0.5, see installer options): it sets both Caddy and the panel.

Every word has to appear. ↑ ↓ to move, Enter to open.