Run Spider as Docker container

Both amd64 and arm64 editions are available.

On Docker host machine:

  • Pull the official image from Docker Hub:

    Use tag latest for AMD64, or latest-arm64 for ARM64 platform.

    docker pull iredmail/spider:latest
    
  • Create directory /spider (you're free to use a different directory) to store data, also generate a long random string as secret key (used to encrypt archived email messages and attachments):

    WARNING: Keep this secret key file safe.

    Email messages and attachments are compressed (in gzip format) and encrypted with this secret key before saving to disk. If this secret key is lost, all archived email messages and attachments are impossible to decrypt and recover.

    mkdir /spider
    cd /spider
    LC_CTYPE=C tr -dc [:alnum:] </dev/urandom | head -c 64 > secret.key
    chmod 0400 secret.key
    
  • If you have a purchased ssl cert, please copy the cert and private key files to:

    • /spider/cert.pem: the cert file
    • /spider/key.pem: the private key

    Spider web console runs on network port 8080 without ssl cert, or 443 with a valid cert.

    You can request a free ssl cert from Let's Encrypt on Spider web console (Settings -> SSL Cert) to secure SMTP and http connections.

  • Launch the container:

    docker run -d \
        --name spider \
        -p 25:25 \
        -p 443:443 \
        -p 8080:8080 \
        -v /spider:/opt/spider \
        iredmail/spider:latest
    

    It exposes port 25 for smtp service and 8080 for web console by default, you're free to change them with the -p argument.