I've gotten as far as being able to access the web interface, but VNC or SPICE don't work at all.
And I also see many settings in the sample nginx configuration that are certainly missing here.
Unfortunately I am not that experienced in the field of reverse proxies. Can someone help me here maybe?
Can you format your configuration file to make it more readable?
Regarding SPICE, the proxmox documentation says:
This daemon listens on TCP port 3128, and implements an HTTP proxy to forward CONNECT request from the SPICE client to the correct Proxmox VE VM. It runs as user www-data and has very limited permissions.
Regarding VNC it seems to be listening on TCP port 5900.
Your current configuration is routing all requests matching the Host matcher "proxmox.home.xxxxx.yyy" to "https://192.168.1.97:8006/", so you only set up a route to reach the web interface.
For SPICE, as I understand it expects CONNECT request, you'll need to add a new router with a rule with the previous host matcher plus a method matcher: Method(`CONNECT`). You'll also have to create the appropriate service to reach the correct port on proxmox.
Thank you very much for your answer. I have adjusted my configuration according to your suggestions. It makes sense what you said. I think it should be right now?
I have traefik running on my server and its routing traffic to my bitwarden, I want to use traefik to route traffic to proxmox. What you have above is if the config file, can you please share your traefik docker-compose file to see how the config file is called.
By the way: the hostname of the proxmox server is `pve'.
When I do nothing in the Traefik config, and I quickly change the url in the pve-spice file to 'pve.home.papasmurf.nl', then I can connect successfully.
It looks like you are from the Netherlands, does your pve-spice.vv file contain any non-ASCII characters? HERE is an issue where a Cyrillic file name was causing this issue.
Other than that, your configuration looks correct.
I know its been a while. Did this config work? I'm having the same problem and I tried this config however, I still can't connect. Do you have a working config now you can share?
I assume you mean "Simple Protocol for Independent Computing Environments"? That’s a TCP protocol, you need to setup an additional TCP router (and service) for that. If it uses TLS you can use the same entrypoint with HostSNI() in rule.
Under config.yml, I created the following TCP settings and Traefik dashboard shows "Success" for both TCP Routers/Services for this config. However, I still get "Connection refused" when I use SPICE console. Is there something I need to modify within the TCP router/service to make it accept the connection?
So I've tried the HTTP and TCP methods in this post and neither work. I experimented with exposing port 3128 on Traefik container I get "404 error" instead of "connection refused" like I typically get. But , I don't think I should have exposed that?
If there is a way to proxy SPICE console I couldn't find a way to do it.
The question is how Proxmox is handling the port. Is the app using the port in the browser to connect to and the server to listen? Or can you configure it differently?
If both need the special port, then you need to open the port and create an entrypoint. If you get 404 on the special port, you can try HostSNI(`*`) in rule.
Ok, Finally made it work. I'll share my entire setup:
My entire setup is based on TechnoTim's tutorial. Follow his tutorial for the proxy network, Cloudflare API token, dashboard credentials and .env and acme.json files.
api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
# for proxmox's SPICE protocol
spice:
address: ":3128"
spice-tls:
address: ":61000" # check if your spice.vv uses 61000 or 61001
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /config.yml
certificatesResolvers:
cloudflare:
acme:
email: your@email.com
storage: acme.json
caServer: https://acme-v02.api.letsencrypt.org/directory # prod (default)
# caServer: https://acme-staging-v02.api.letsencrypt.org/directory # staging
dnsChallenge:
provider: cloudflare
#disablePropagationCheck: true # uncomment this if you have issues pulling certificates through cloudflare, By setting this flag to true disables the need to wait for the propagation of the TXT record to all authoritative name servers.
#delayBeforeCheck: 60s # uncomment along with disablePropagationCheck if needed to ensure the TXT record is ready before verification is attempted
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"