The console works right after installation, without any extra setup. The browser of your customer only talks to Paymenter; Paymenter connects to Proxmox with your API token, so Proxmox never has to be public.
Each open console keeps one PHP worker busy while it is open. If many customers use the console at the same time, raise pm.max_children in your PHP-FPM pool, or use the relay service below.
Optional: relay service#
For hosts with many consoles open at once. Set Console mode to the relay service, then run it and proxy it in nginx:
[Unit]
Description=Paymenter Proxmox console relay
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/paymenter
ExecStart=/usr/bin/php artisan proxmoxve:console-relay --listen=127.0.0.1:8095
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Save it as /etc/systemd/system/paymenter-proxmox-console.service, run systemctl enable --now paymenter-proxmox-console and add this inside the server block of Paymenter:
location /proxmox-console/ {
proxy_pass http://127.0.0.1:8095;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 4h;
}
Optional: direct mode#
With Console mode set to direct, the browser opens the console on Proxmox itself. Proxmox must then be reachable by your customers on a host that shares a parent domain with Paymenter (for example billing.example.com and pve.example.com), with Console cookie domain set to .example.com. Create the console role and group once:
pveum role add ProxmoxConsole -privs "VM.Console VM.Audit"
pveum group add proxmox-console
Direct mode also needs Permissions.Modify in the role from the previous section, and User.Modify plus Realm.AllocateUser on /access/groups/proxmox-console and /access/realm/pve.