-
Notifications
You must be signed in to change notification settings - Fork 187
Description
I cannot use Revolt when using a Reverse Proxy like Nginx Proxy (configured via NPM).
I have many domains already setup so I know it isn't an issue with the NPM itself.
Revolt is running in a VM with the local IP 192.168.5.18 on port 80, I've used the generate_config.sh and the only change I did was to change the HOSTNAME= on .env.web to HOSTNAME=:80 (as your guide guidelines for proxy) but I cannot log in, it tells me to see the error on console and when I do, I see nothing useful.
All other URLs are (as I've set up with generate_config.sh) set to https://mydomain.tld or wss://mydomain.tld
Before I try to log in, I see some errors like:
database-1 | {"t":{"$date":"2025-08-04T17:29:20.925+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn19","msg":"Connection ended","attr":{"remote":"127.0.0.1:45300","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"4151f387-efe1-4681-ae38-f35c14957b51"}},"connectionId":19,"connectionCount":13}}
database-1 | {"t":{"$date":"2025-08-04T17:29:20.926+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn22","msg":"Connection ended","attr":{"remote":"127.0.0.1:45330","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"ddc36f75-6cf9-412d-bc2b-a5b8dc38c352"}},"connectionId":22,"connectionCount":12}}
Then on console I see:
api-1 | INFO rocket::server > OPTIONS /auth/session/login:
api-1 | INFO rocket::server::_ > Matched: OPTIONS /<catch_all_options_route..> [9223372036854775807]
api-1 | INFO rocket_cors::_ > "Catch all" handling of CORS OPTIONS preflight for request OPTIONS /auth/session/login
api-1 | INFO rocket::server::_ > Outcome: Success(200 OK)
api-1 | INFO rocket::server::_ > Response succeeded.
api-1 | INFO rocket::server > POST /auth/session/login application/json:
api-1 | INFO rocket::server::_ > Matched: (login) POST /auth/session/login
api-1 | INFO rocket::server::_ > Outcome: Success(200 OK)
api-1 | INFO rocket::server::_ > Response succeeded.
api-1 | INFO rocket::server > OPTIONS /onboard/hello:
api-1 | INFO rocket::server::_ > Matched: OPTIONS /<catch_all_options_route..> [9223372036854775807]
api-1 | INFO rocket_cors::_ > "Catch all" handling of CORS OPTIONS preflight for request OPTIONS /onboard/hello
api-1 | INFO rocket::server::_ > Outcome: Success(200 OK)
api-1 | INFO rocket::server::_ > Response succeeded.
api-1 | INFO rocket::server > GET /onboard/hello application/json:
api-1 | INFO rocket::server::_ > Matched: (hello) GET /onboard/hello
api-1 | INFO rocket::server::_ > Outcome: Success(200 OK)
api-1 | INFO rocket::server::_ > Response succeeded.
api-1 | INFO rocket::server > GET /onboard/hello application/json:
api-1 | INFO rocket::server::_ > Matched: (hello) GET /onboard/hello
api-1 | INFO rocket::server::_ > Outcome: Success(200 OK)
api-1 | INFO rocket::server::_ > Response succeeded.
database-1 | {"t":{"$date":"2025-08-04T17:31:21.842+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:32832","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"7591d158-2820-486a-9d21-bf543a7bfd3f"}},"connectionId":69,"connectionCount":10}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.847+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn69","msg":"client metadata","attr":{"remote":"127.0.0.1:32832","client":"conn69","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.5.6"},"driver":{"name":"nodejs|mongosh","version":"6.16.0|2.5.6"},"platform":"Node.js v20.19.4, LE","os":{"name":"linux","architecture":"x64","version":"3.10.0-327.22.2.el7.x86_64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.910+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:32848","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"59144e8a-5b73-41c5-b753-a346b3678687"}},"connectionId":70,"connectionCount":11}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.911+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:32858","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"6c652f33-1018-4bfa-87ad-a2349d8ff1f0"}},"connectionId":71,"connectionCount":12}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.912+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn70","msg":"client metadata","attr":{"remote":"127.0.0.1:32848","client":"conn70","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.5.6"},"driver":{"name":"nodejs|mongosh","version":"6.16.0|2.5.6"},"platform":"Node.js v20.19.4, LE","os":{"name":"linux","architecture":"x64","version":"3.10.0-327.22.2.el7.x86_64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.914+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn71","msg":"client metadata","attr":{"remote":"127.0.0.1:32858","client":"conn71","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.5.6"},"driver":{"name":"nodejs|mongosh","version":"6.16.0|2.5.6"},"platform":"Node.js v20.19.4, LE","os":{"name":"linux","architecture":"x64","version":"3.10.0-327.22.2.el7.x86_64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.918+00:00"},"s":"I", "c":"NETWORK", "id":6788700, "ctx":"conn70","msg":"Received first command on ingress connection since session start or auth handshake","attr":{"elapsedMillis":5}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.924+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:32862","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"ea761e26-3434-4dbd-b30e-4652d78c1bb8"}},"connectionId":72,"connectionCount":13}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.930+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn72","msg":"client metadata","attr":{"remote":"127.0.0.1:32862","client":"conn72","negotiatedCompressors":[],"doc":{"application":{"name":"mongosh 2.5.6"},"driver":{"name":"nodejs|mongosh","version":"6.16.0|2.5.6"},"platform":"Node.js v20.19.4, LE","os":{"name":"linux","architecture":"x64","version":"3.10.0-327.22.2.el7.x86_64","type":"Linux"},"env":{"container":{"runtime":"docker"}}}}}
database-1 | {"t":{"$date":"2025-08-04T17:31:21.932+00:00"},"s":"I", "c":"NETWORK", "id":6788700, "ctx":"conn72","msg":"Received first command on ingress connection since session start or auth handshake","attr":{"elapsedMillis":1}}
database-1 | {"t":{"$date":"2025-08-04T17:31:22.312+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn69","msg":"Connection ended","attr":{"remote":"127.0.0.1:32832","isLoadBalanced":false,"uuid":{"uuid":{"$uuid":"7591d158-2820-486a-9d21-bf543a7bfd3f"}},"connectionId":69,"connectionCount":12}}
The configuration files are as below (I hid the secret keys and the domain for security reasons):
.env.web file:
HOSTNAME=:80
REVOLT_PUBLIC_URL=https://my.beautiful.domain.tld/api
Revolt.toml file:
[hosts]
app = "https://my.beautiful.domain.tld"
api = "https://my.beautiful.domain.tld/api"
events = "wss://my.beautiful.domain.tld/ws"
autumn = "https://my.beautiful.domain.tld/autumn"
january = "https://my.beautiful.domain.tld/january"
[pushd.vapid]
private_key = "THE.SECRET.PRIVATE.KEY"
public_key = "THE.SECRET.PUBLIC.KEY"
[files]
encryption_key = "THE.SECRET.ENCRYPTION.KEY"
I even tried to get Revolt.toml file and just replace the hosts default values from the ones generated by your bash script but same thing.
To test if was something wrong with the proxy I tried to change my /etc/hosts (locally) to point directly to the VM and even though I have the same errors, something seems wrong.