Skip to main content

Wildduck docker image

Obtaining the Docker image

To pull the latest pre-built image of wildduck from docker hub:

docker pull nodemailer/wildduck

It is also possible to pull a specific version of wildduck by specifying the version as the image tag. (example, for version 1.20):

docker pull nodemailer/wildduck:1.20

Environment variables in the Docker image

The following docker env variables are available inside the container:

  1. WILDDUCK_APPDIR: The folder where wildduck is installed inside the container
  2. WILDDUCK_CONFIG: Path to the config file to be used with wildduck

Running wildduck using Docker

The image is configured to use the default config file

docker run nodemailer/wildduck

This is likely to fail due to mongodb and redis not present in localhost inside the container. To pass custom configuration options/files to wildduck inside the docker image, the following two strategies can be used:

  1. Pass APPCONF_* env variables to configure options using wild-config

    To set a custom mongo and redis host, and configure the FQDN and the domain for receiving emails:

    FQDN='example.com'
    MAIL_DOMAIN='mail.example.com'
    docker run \
    -e APPCONF_dbs_mongo='mongodb://mongo:27017/' \
    -e APPCONF_dbs_redis='redis://redis:6379/3' \
    -e APPCONF_smtp_setup_hostname=$FQDN \
    -e APPCONF_log_gelf_hostname=$FQDN \
    -e APPCONF_imap_setup_hostname=$FQDN \
    -e APPCONF_emailDomain=$MAIL_DOMAIN \
    nodemailer/wildduck

    More details available at the wild-config documentation.

  2. Mount a Docker volume with a custom configuration file:

    To replace the default config folder (/wildduck/config) inside the docker image

    docker run -v '/config/from/host:/wildduck/config' nodemailer/wildduck