You can check out this guide for setting up HTTPS with Let’s Encrypt:
Possible Cause: Hidden “Port” Setting
Sometimes a hidden port site setting remains in the database after migration or restore.
This can cause Discourse to append an incorrect port (like :80) to HTTPS URLs.
To check and fix it:
- Enter your container:
./launcher enter app
- Open the Rails console:
rails c
- Check the current value:
SiteSetting.port
- If it returns
80, clear it:
SiteSetting.port = ""
- Then rebake all posts and assets to update links:
Jobs.enqueue(:rebake_all_posts)