Self-host MailHog with Levelrail
An SMTP test server that catches outgoing mail from your apps and shows it in a web inbox.
- Authormailhog
- LicenceMIT
- Memory128 MiB
- Services1
How to self-host MailHog
-
Pull the images
One image is pulled on your server.
Show images
mailhog/mailhog:v1.0.1
-
Create the app
One service starts in a single Compose app, on ports 8025, 1025.
-
Fill in the secrets
You do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
MailHog requirements
- Memory
- About 128 MiB
- Architectures
- amd64 image published, arm64 not available
- Ports
- 8025, 1025
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then MailHog. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the MailHog docs page.
Deploy MailHog your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy MailHog from the CLI
levelrail-cli templates deploy mailhog --name my-mailhog Deploy MailHog with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/mailhog/deploy MailHog configuration
MailHog services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| mailhog | mailhog/mailhog:v1.0.1 | 8025, 1025 | none |
MailHog environment variables
The catalog lists no environment variables for this template.
Ports and volumes
- Ports
- 8025, 1025
- Volumes
- none
MailHog FAQ
How much memory does MailHog need?
The catalog lists about 128 MiB of memory for MailHog.
Does MailHog run on arm64?
For MailHog, amd64 only, no arm64 image; amd64 is image published.
What licence is MailHog under?
MailHog is licensed under MIT, which is permissive, with few conditions on reuse.
Does MailHog need configuration before it starts?
No. The template fills in its own defaults.
Which ports does MailHog use?
MailHog listens on ports 8025 and 1025 inside the stack.
Can I deploy MailHog on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for MailHog, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image mailhog/mailhog:v1.0.1 is what you deploy there.