Ghost links to localhost in docker + portainer

Okay, so you got ghost going on your domain, you got that set up with Let'sEncrypt, but then you click the "home" button and everything goes white with the nice "can't go there" localhost url. What gives?

Go to your portainer container, and click on the name of the container, and then under "Actions", choose "duplicate/edit".

Scroll down to "Advanced Container Settings" and click on the "Env" tab.

Scroll down to the bottom and choose "Add an environment variable". The name needs to be "url", no quotes, lowercase. The value is your url, with the HTTPS:// included.

Scroll up to the "Deploy the container" button. Click that. Wait for reload, then test your site again.

Subscribe to distinctive.coffee

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe