Moved instance from AWS to DO: Websocket problems


So i moved my Mastodon instance from AWS to Digital Ocean today, following these instructions.

Everything worked fine, the instance is back up on DO.

There’s one issue though: the Websocket won’t connect, i keep getting these errors in the browser console, on all feeds:

index.js:64 WebSocket connection to 'wss://' failed: HTTP Authentication failed; no valid credentials available

Anyone here has any idea what could have gone wrong? Apart from this, everything works just fine.
Thanks in advance!

This is probably related. In the logs i keep getting errors:

node[8078]: ERR! error: no pg_hba.conf entry for host "", user "mastodon", database "mastodon_production", SSL off is the main machine where the rails app runs.
The database is a separate host.

I believe i solved it. I defined DB_HOST, DB_PORT, DB_NAME, DB_USER and DB_PASS in .env.production. Seems this doesn’t work.

Now in addition to the above, i defined DATABASE_URL=DATABASE_URL=postgresql://mastodon:PASSWORD@HOST:PORT/mastodon_production?sslmode=require&ssl=true, and that seems to work. No more Websocket errors, no more errors in the log.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.