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.
Settings in .env
Section titled “Settings in .env”COMPOSE_PROFILES=own-proxyNEXOVIRT_PUBLIC_URL=https://panel.example.comNEXOVIRT_CADDY_ADDR=offNEXOVIRT_HTTP_BIND=127.0.0.1NEXOVIRT_HTTP_PORT=8080NEXOVIRT_TRUSTED_PROXIES=<address your proxy connects from>| Variable | Meaning |
|---|---|
NEXOVIRT_CADDY_ADDR=off | Turns off the domain check against the bundled proxy. |
NEXOVIRT_HTTP_BIND | 127.0.0.1 = only a proxy on this host reaches the panel. Use another address only if your proxy runs elsewhere. |
NEXOVIRT_HTTP_PORT | Host port, default 8080. |
NEXOVIRT_TRUSTED_PROXIES | Who may send X-Forwarded-For. |
Then run docker compose up -d. Your proxy sends to http://127.0.0.1:8080.
What the proxy must do
Section titled “What the proxy must do”- Forward everything to the panel port with the original
Hostheader. - 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.
Examples
Section titled “Examples”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”).
Certificates
Section titled “Certificates”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.