# Is there an SMTP server installed in the Grafana Docker container?

**URL:** <https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812>\
**Category:** Alerting\
**Tags:** alerting\
**Created:** [February 8, 2021, 9:48am UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812 "2021-02-08T09:48:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sviscapi](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sviscapi](https://community.grafana.com/u/sviscapi)\
**Post date:** [February 8, 2021, 9:48am UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812/1 "2021-02-08T09:48:54Z")

</div>

Dear all,

I have a simple question regarding the Grafana Docker image available at [Docker Hub](https://hub.docker.com/r/grafana/grafana:)

Is there an SMTP server already installed in this container ? I switched the GF\_SMTP\_ENABLED variable to “True” on Rancher, but now Grafana complains there is no SMTP server listening on localhost:25.

What am I doing wrong ? Should I instantiate a new “SMTP” container for this purpose ?

Best regards,

Samuel

---

<div class="post-metadata">

**Author:** ![wlargou](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/wlargou/32/14374_2.png) [@wlargou](https://community.grafana.com/u/wlargou)\
**Post date:** [February 8, 2021, 11:55am UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812/2 "2021-02-08T11:55:19Z")

</div>

Hi,

Did you launch your container as :

docker run   
-d   
-p 3000:3000   
–name grafana   
-e “GF\_SMTP\_ENABLED=true”   
-e “GF\_SMTP\_HOST=[smtp.example.com](http://smtp.example.com)”   
-e “GF\_SMTP\_USER=myuser”   
-e “GF\_SMTP\_PASSWORD=mysecret”   
grafana/grafana:5.1.0

Check this thread :

> [@SMTP configuration for docker container](https://community.grafana.com/t/smtp-configuration-for-docker-container/16370/2):
>
> If you’re working with containers you can set the .ini via docker volume mapping our you can set the environment variables that maps to .ini parameters. [https://grafana.com/docs/installation/configuration/#using-environment-variables](https://grafana.com/docs/installation/configuration/#using-environment-variables)[https://grafana.com/docs/installation/docker/#default-paths](https://grafana.com/docs/installation/docker/#default-paths) If you can’t configure via volume, you can set the environment variables like this : docker run \ -d \ -p 3000:3000 \ --name grafana \ -e "GF\_SMTP\_ENABLED=true" \ -e "GF\_SMTP\_HOST=smtp.example…

Good Luck

---

<div class="post-metadata">

**Author:** ![sviscapi](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@sviscapi](https://community.grafana.com/u/sviscapi)\
**Post date:** [February 10, 2021, 9:28am UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812/3 "2021-02-10T09:28:02Z")

</div>

Dear @wlargou

Thanks for your quick reply 🙂

I left GF\_SMTP\_HOST blank, hoping there would be an SMTP server already listening locally on port 25, as per this documentation:

> **[Configuration](https://grafana.com/docs/grafana/latest/administration/configuration/#smtp)**
>
> Configuration documentation

One of my colleague told me it used to work without any further configuration (i.e no need to use an external SMTP server).

I just checked the Dockerfile on Github but there doesn’t seem to be any SMTP server installed, and port 25 is not exposed (only port 3000):

> <https://github.com/grafana/grafana/blob/master/Dockerfile>

Would you recommend using an external SMTP server ?

Best regards,

Samuel

---

<div class="post-metadata">

**Author:** ![wlargou](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/wlargou/32/14374_2.png) [@wlargou](https://community.grafana.com/u/wlargou)\
**Post date:** [February 10, 2021, 1:06pm UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812/4 "2021-02-10T13:06:51Z")

</div>

Hi,

Yes as a matter of fact you can either use your existing SMTP or create a new one, SMTP duties are sending/receiving emails, as a design rule you should separate this duties from Grafana.

Goof Luck

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [February 8, 2022, 9:48am UTC](https://community.grafana.com/t/is-there-an-smtp-server-installed-in-the-grafana-docker-container/42812/5 "2022-02-08T09:48:59Z")

</div>

This topic was automatically closed after 365 days. New replies are no longer allowed.
