<p>The <a href="https://github.com/craftcms/docker" rel="nofollow noreferrer">official Craft CMS Docker images</a> do not have particular support for the environment variables you mentioned, or variables for any other Craft config settings for that matter. My guess is wherever you saw those, the images in use were either from a third party, or were the official images with some additional stuff built around them. The environment variables that are available exclusively to the docker images can be found <a href="https://github.com/craftcms/docker#using-xdebug" rel="nofollow noreferrer">here (Xdebug)</a> and <a href="https://github.com/craftcms/docker#customizable-settings" rel="nofollow noreferrer">here (PHP)</a>.</p>
<p><em>However, just because you are using Docker does not mean you can't setup your environment variables as you would like in your <a href="https://craftcms.com/docs/4.x/config/#env" rel="nofollow noreferrer"><code>.env</code> file</a>, and then reference them in the Craft CP.</em></p>

CC BY-SA 4.0
2022-12-15T07:49:34.647Z
2022-12-15T07:49:34.647Z
Jalen Davenport
<p>Where can I find the possible environment variables that the craftcms docker images accept?</p>
<p>We want to be able to add our SMTP settings.</p>
<p>In some examples I have seen the following SMTP related environment variables:</p>
<pre><code>  SMTP_HOST: 127.0.0.1
  SMTP_FROM_MAIL: test@test.com
  SMTP_FROM_NAME: &quot;Craft CMS&quot;
</code></pre>
<p>But in addition to these I need to able to assign smtp port, smtp username, password, encryption method, authentication etc..</p>

<craft3><docker><smtp>
Craft CMS Docker Environment Variables for SMTP
# Craft CMS Docker Environment Variables for SMTP

(Asked by: username_0 on 2022-12-14)

Where can I find the possible environment variables that the craftcms docker images accept?
We want to be able to add our SMTP settings.
In some examples I have seen the following SMTP related environment variables:
  SMTP_HOST: 127.0.0.1
  SMTP_FROM_MAIL: test@test.com
  SMTP_FROM_NAME: "Craft CMS"

But in addition to these I need to able to assign smtp port, smtp username, password, encryption method, authentication etc..

**Tags:** craft3, docker, smtp

---

## 1 answers

### Answer by username_1 on 2022-12-15. Score: 1

The [official Craft CMS Docker images](https://github.com/craftcms/docker) do not have particular support for the environment variables you mentioned, or variables for any other Craft config settings for that matter. My guess is wherever you saw those, the images in use were either from a third party, or were the official images with some additional stuff built around them. The environment variables that are available exclusively to the docker images can be found [here (Xdebug)](https://github.com/craftcms/docker#using-xdebug) and [here (PHP)](https://github.com/craftcms/docker#customizable-settings).

*However, just because you are using Docker does not mean you can't setup your environment variables as you would like in your [`.env` file](https://craftcms.com/docs/4.x/config/#env), and then reference them in the Craft CP.*


---

