Skip to content

Docker behind your own reverse proxy

Use the own-proxy profile when 80/443 on the host belong to another proxy. The bundled Caddy does not start. The panel publishes one port for your proxy.

Terminal window
COMPOSE_PROFILES=own-proxy
NEXOVIRT_PUBLIC_URL=https://panel.example.com
NEXOVIRT_CADDY_ADDR=off
NEXOVIRT_HTTP_BIND=127.0.0.1
NEXOVIRT_HTTP_PORT=8080
NEXOVIRT_TRUSTED_PROXIES=<address your proxy connects from>
VariableMeaning
NEXOVIRT_CADDY_ADDR=offTurns off the domain check against the bundled proxy.
NEXOVIRT_HTTP_BIND127.0.0.1 = only a proxy on this host reaches the panel. Use another address only if your proxy runs elsewhere.
NEXOVIRT_HTTP_PORTHost port, default 8080.
NEXOVIRT_TRUSTED_PROXIESWho may send X-Forwarded-For.

Then run docker compose up -d. Your proxy sends to http://127.0.0.1:8080.

  • Forward everything to the panel port with the original Host header.
  • Forward WebSockets for /console-proxy/ to the same port. Without it the guest console stays black.
  • Pass /api/v1/agent/ on plain http as well if nodes were onboarded over http.
  • Do not cache or rewrite /api/.

Console traffic reaches the panel on the same port. You do not publish the console service separately.

Caddy:

panel.example.com {
reverse_proxy 127.0.0.1:8080
}

Nginx (the WebSocket part is the important one):

server {
server_name panel.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 3600s;
}
}

In Traefik and Nginx Proxy Manager, switch WebSocket support on for the host (Nginx Proxy Manager: “Websockets Support”).

Your proxy owns the certificates. Settings > Domain in the panel still stores the name, but the panel does not request a certificate in this mode.

NexoVirt is developed and designed by Nucez Software, your partner for custom software and web design.