Installed Ghost on Docker. But can't setup SMTP

Hi, I recently installed the cyberpanel on my VPS, configured everything, and installed ghost on docker. Now my ghost blog is up and running. But, I can’t understand setting up SMTP because I can’t find any config.development.json file inside the ghost directory.

Here is all I can see in the ghost folder. No config.development.json there:

So, how do I set up SMTP? I already have Mailgun SMTP details. If you need any other information, I can provide them. Thank you!

The Docker image doesn’t use the standard config files because storage is ephemeral in a docker setup. You can supply config via environment variables instead, either as part of the docker run command or in a docker-compose config file. There’s more information about that in the Docker image’s readme Docker

1 Like

Thank you so much! I have configured my SMTP details via environment variables and now everything works well :smiling_face:

1 Like

In case anyone struggling with the same issue, here is what I have configured in environment variables:

mail__transport=SMTP
mail__options__host=smtp.exemple.com
mail__options__port=587
mail__options__auth__user=username@exmple.com
mail__options__auth__pass=XXX
mail__from=Exemple Corp. <username@exmple.com>

Thanks to @Kevin

3 Likes

Hej Aliya, thanks for this. Fixed it for me after many hours of digging.

The mail__from variable did not work though.