# Installed Ghost on Docker. But can't setup SMTP

**URL:** <https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645>\
**Category:** Self-hosting\
**Created:** [July 29, 2022, 9:24am UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645 "2022-07-29T09:24:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aliya\_Lee](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aliya_lee/32/18725_2.png) [@Aliya\_Lee](https://forum.ghost.org/u/Aliya_Lee)\
**Post date:** [July 29, 2022, 9:24am UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/1 "2022-07-29T09:24:14Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/2/0/206aa6922a83558a15e07080f0783fc623e686ff.png)

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!

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [July 29, 2022, 9:45am UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/2 "2022-07-29T09:45:01Z")

</div>

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](https://hub.docker.com/_/ghost)

---

<div class="post-metadata">

**Author:** ![Aliya\_Lee](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aliya_lee/32/18725_2.png) [@Aliya\_Lee](https://forum.ghost.org/u/Aliya_Lee)\
**Post date:** [July 29, 2022, 10:15am UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/3 "2022-07-29T10:15:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Aliya\_Lee](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aliya_lee/32/18725_2.png) [@Aliya\_Lee](https://forum.ghost.org/u/Aliya_Lee)\
**Post date:** [July 29, 2022, 10:21am UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/4 "2022-07-29T10:21:00Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![patghost](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/patghost/32/4859_2.png) [@patghost](https://forum.ghost.org/u/patghost)\
**Post date:** [October 5, 2022, 1:48pm UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/5 "2022-10-05T13:48:51Z")

</div>

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

The mail\_\_from variable did not work though.

---

<div class="post-metadata">

**Author:** ![kasir-barati](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kasir-barati/32/30121_2.png) [@kasir-barati](https://forum.ghost.org/u/kasir-barati)\
**Post date:** [April 26, 2024, 1:51pm UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/6 "2024-04-26T13:51:55Z")

</div>

Same Q&A here: [How to add SMTP (mail) configuration? - #9 by kasir-barati](https://forum.ghost.org/t/how-to-add-smtp-mail-configuration/40981/9)

---

<div class="post-metadata">

**Author:** ![tehrfurth](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/tehrfurth/32/34605_2.png) [@tehrfurth](https://forum.ghost.org/u/tehrfurth)\
**Post date:** [January 30, 2025, 4:27pm UTC](https://forum.ghost.org/t/installed-ghost-on-docker-but-cant-setup-smtp/31645/7 "2025-01-30T16:27:48Z")

</div>

2.5 years later and still doing gods work!  
I didn’t see any of this information on the docker page Kevin linked above.  
I was finally able to get all my signups/subscriptions working like a charm \<3
