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_FROM_MAIL: [email protected]

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

1 Answer 1


The official Craft CMS Docker images 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) and here (PHP).

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, and then reference them in the Craft CP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.