Console proxy

Providing VM console access will require you to allow clients to connect to your proxmox server.

If your server is not publicly available or you do not want clients to be able to access the Proxmox control panel you will need to use a reverse proxy.

Below you can find an example configuration for NGINX that allows console access while restricting access to the control panel and unrelated API methods.

server { listen 443 ssl; server_name console.your-site.com; charset utf-8; include /etc/nginx/ssl.conf; proxy_redirect off; resolver 8.8.8.8 1.1.1.1; set $proxmox_host 'https://proxmox.host:8006'; # resources used by novnc/xtermjs app location ~ ^/(xtermjs|novnc)/ { proxy_pass $proxmox_host$request_uri; } # API methods needed to initialize console websocket location ~ /(termproxy|vncproxy|status/current)$ { proxy_pass $proxmox_host$request_uri; } location ~ /vncwebsocket$ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass $proxmox_host$request_uri; proxy_ssl_server_name on; proxy_buffering off; client_max_body_size 0; proxy_connect_timeout 3600s; proxy_read_timeout 3600s; proxy_send_timeout 3600s; send_timeout 3600s; } location / { if ($args !~* "^console=|&console=") { return 401; } if ($args !~* "^xtermjs=1|&novnc=1") { return 404; } proxy_http_version 1.1; proxy_pass $proxmox_host; } }

Change console.your-site.com to a subdomain you want to use for the console, and set https://proxmox.host:8006 to the proxmox instance address.

The last step is to configure your Proxmox App in Hostbill to use the new console address.

Navigate to Settings > Apps > {Proxmox App}, and update Console URL to:
https://console.your-site.com/novnc/vncconsole.html

The session created for the console will give user access to proxmox panel the same way as if he logged in using hosting account credentials.