When running RustMailer in Docker, older versions (prior to 1.3.0) could encounter permission errors when accessing mounted volumes.
This was typically caused by the container process running as a non-root user (rmailer) that did not have write permissions to the mounted directory.
This issue has been fixed in recent releases, and RustMailer now correctly handles mounted volume permissions.

Step 1: Use the Latest RustMailer Image
Before troubleshooting, make sure you are using the latest Docker image:
docker pull rustmailer/rustmailer:latestStep 2: Start RustMailer with Recommended Command
We recommend starting RustMailer with the following command:
docker run -d \
--name rustmailer \
-p 15630:15630 \
-p 16630:16630 \
-e RUSTMAILER_ROOT_DIR=/data \
-v /sourcecode/rustmailer_data/:/data \
rustmailer/rustmailer:latestParameters explained:
-p 15630:15630&-p 16630:16630– Map RustMailer’s ports to your host.-e RUSTMAILER_ROOT_DIR=/data– Set the root directory inside the container.-v /sourcecode/rustmailer_data/:/data– Mount a local directory to persist RustMailer data.rustmailer/rustmailer:latest– Use the latest RustMailer Docker image.
Step 3: Verify Volume Permissions
If you still encounter permission issues when mounting a directory:
-
Check the local directory’s permissions:
ls -ld /sourcecode/rustmailer_data/ -
Ensure it’s writable by your Docker process:
chmod 777 /sourcecode/rustmailer_data/(You may adjust permissions for stricter security policies as needed.)
Step 4: Check Container Logs
If RustMailer still fails to start, inspect the logs:
docker logs rustmailerLook for messages related to:
- Permission denied errors
- Missing environment variables
- Port binding issues
Need Help?
If you're still experiencing issues, please:
- Open an issue on GitHub: https://github.com/rustmailer/rustmailer/issues
- Join our Discord community: https://discord.gg/3R4scWCsxK
- Email support: rustmailer.git@gmail.com
We’ll be happy to help you troubleshoot Docker startup problems.