mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-07-21 04:25:24 -04:00
Account created but login fails #131
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @noisymuffin on GitHub (Feb 11, 2026).
Got the server running by following the instructions on the main page. Running Ubuntu 24.04.3 LTS, fully updated.
I've:
On the server, observing the logs using
docker compose logs -f:Had to change the healthcheck for the database service so that it succeeds:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quietAlso had a problem with redis always restarting, changed docker tags to an older version and it seems stable now:
I run my own caddy server on a separate server, which just forwards to stoat's caddy server on port 1234:
I've got all host URLs set to cleartext in Revolt.toml:
My .env.web:
@JimmyBassy commented on GitHub (Feb 11, 2026):
I was able to solve this with nginx by having a separate config for web sockets, here's my config:
location /ws { proxy_pass http://127.0.0.1:8008; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Forwarded-Port $server_port; }These are mainly needed headers for websockets to work behind a reverse proxy.
Sorry but I'm unable to format it correctly
@kiwidoggie commented on GitHub (Feb 12, 2026):
https://nginx.org/en/docs/http/websocket.html
Reference.
@seva-luchianov commented on GitHub (Feb 12, 2026):
Looks like I have the same issue
https://github.com/stoatchat/self-hosted/issues/162#issuecomment-3887148863
Not sure why my version does not work - will try moving the ws nginx conf into its own location section.
@seva-luchianov commented on GitHub (Feb 12, 2026):
Now I get a different error
@noisymuffin is this what you were seeing that led you to tweak the db health check?
What's weird is that I'm able to register users, so presumably the db IS working?
@gr33k commented on GitHub (Feb 12, 2026):
I've been toying with this and Nginx as a reverse proxy (I have multiple services on this server)....it just isn't wanting to work right yet. I'm sure it's a problem with the ports and reverse proxy (notably websockets)- but I wish this project was more streamlined to work with a nginx reverse proxy (it's super popular)...or perhaps add that in the compose file ready to go + nginx example you could easily copy and paste in to your nginx setup. No port allocations are present either in the event you want to expose/change them. Yes you can add all this stuff, but the goal would be to simplify this for the wave of people looking to replace Discord with something like this ;)
@noisymuffin commented on GitHub (Feb 12, 2026):
No, I'm running on an older system so I have to use MongoDB v4.4. For me, the database was starting in an unhealthy state so the other services were failing. The mongosh command didn't exist on v4.4 - thus my change to the healthcheck command.
@seva-luchianov commented on GitHub (Feb 12, 2026):
Huh, thanks for letting me know! Seems like I'm the only person on the internet seeing
Connection not authenticatingin the db logs with zero tweaks to default configs 😅Let's see if my separate issue gets any traction.
@gr33k commented on GitHub (Feb 12, 2026):
Funny enough - setting up a brand new VM running Ubuntu 24 server ... I simply had to change the .env.web HOSTNAME=:80 as mentioned for reverse proxy support...Using Nginx Proxy Manager (docker on another server) - I pointed to the http://LANIP:80 with websocket support enabled. I was able to enable HTTPS w/ letsencrypt and it's working fine.
Not sure why this struggles to work on my Ubuntu 18 VPS or my physical Fedora 40 server...but alas - If you want to avoid a big headache - set this up on a fresh Ubuntu 24 and you can have it working in a few minutes vs a few hours I wasted trying to get it working elsewhere 😆
@noisymuffin commented on GitHub (Feb 13, 2026):
Thats the thing, mine is a fresh Ubuntu 24 install dedicated just for Stoat. Other than setting up hosting on a VPS I've followed all instructions on the main page, fixed the issues with mongodb and keydb docker tags, and then the reverse proxy instructions.
Its rather frustrating how unhelpful the logs are despite the error.
Perhaps it is websockets related, but from my understanding of Caddy it handles most of these things automatically. I'll keep digging.
For reference, here is my caddy configuration on my other server: