Skip to content

Docker

The Docker image runs the SMTP server and Web UI in one container.

Published images are available from GitHub Container Registry:

Terminal window
docker pull ghcr.io/shuaixr/inbrx:latest

Run inbrx with file-backed storage mounted at /data:

Terminal window
docker run --rm \
-p 2525:2525 \
-p 3000:3000 \
-v inbrx-data:/data \
ghcr.io/shuaixr/inbrx:latest

Then open http://127.0.0.1:3000 and configure your application to send SMTP mail to 127.0.0.1:2525.

The image sets these defaults:

Setting Value
SMTP bind host 0.0.0.0
Web UI bind host 0.0.0.0
File storage directory /data

Mount a Docker volume or host directory to /data to keep captured messages across container restarts:

Terminal window
docker run --rm \
-p 2525:2525 \
-p 3000:3000 \
-v "$PWD/inbrx-data:/data" \
ghcr.io/shuaixr/inbrx:latest

Use memory storage for disposable runs:

Terminal window
docker run --rm \
-p 2525:2525 \
-p 3000:3000 \
ghcr.io/shuaixr/inbrx:latest \
--storage memory

Build the image from this repository:

Terminal window
docker build -t inbrx .

Run the local image:

Terminal window
docker run --rm \
-p 2525:2525 \
-p 3000:3000 \
-v inbrx-data:/data \
inbrx

Use Compose when you want inbrx to run with the rest of your development stack.

For a standalone inbrx service that accepts SMTP from your host machine, expose both ports:

services:
inbrx:
image: ghcr.io/shuaixr/inbrx:latest
ports:
- "2525:2525"
- "3000:3000"
volumes:
- inbrx-data:/data
restart: unless-stopped
volumes:
inbrx-data:

This example is also available at examples/docker-compose.yml.

When your application is in the same Compose project, the application can connect to inbrx by service name. In that case, expose only the Web UI port to your host:

services:
app:
image: your-app
environment:
SMTP_HOST: inbrx
SMTP_PORT: "2525"
depends_on:
- inbrx
inbrx:
image: ghcr.io/shuaixr/inbrx:latest
ports:
- "3000:3000"
volumes:
- inbrx-data:/data
volumes:
inbrx-data:

Inside a Compose network, use inbrx:2525 as the SMTP server address. Use 127.0.0.1:2525 only for applications running on the host machine.