GitHunt
BA

Bastian/protonmail-bridge-docker

A Docker image for running Protonmail Bridge in headless mode. For use on my private home server. Use at your own risk.

Protonmail Bridge Docker

A Docker image for running Protonmail Bridge in
headless mode.

Warning

For use on my private home server. Use at your own risk. There are no plans to
add features beyond what I need for myself.

Quick Start

1. Build the Image

docker build -t protonmail-bridge .

2. Initial Setup (Interactive)

First run must be interactive to log in:

mkdir -p ./proton_state
docker run -it --name proton-bridge \
    -v ./proton_state:/home/bridge \
    --user "$(id -u):$(id -g)" \
    protonmail-bridge protonmail-bridge --cli

3. Log In

At the >>> prompt:

>>> login

Follow the prompts to enter your Protonmail email and password. If you have 2FA enabled, you'll be prompted for the code.

4. Get Your Bridge Credentials

After logging in, get your IMAP/SMTP credentials:

>>> info

Exit the CLI:

>>> exit

5. Run in Background

After initial setup, restart the container in headless mode:

docker rm proton-bridge
docker run -d --name proton-bridge \
    -v ./proton_state:/home/bridge \
    --user "$(id -u):$(id -g)" \
    --restart unless-stopped \
    protonmail-bridge

To access the CLI later (e.g., to check credentials), stop the container and run interactively again:

docker rm -f proton-bridge
docker run -it --name proton-bridge \
    -v ./proton_state:/home/bridge \
    --user "$(id -u):$(id -g)" \
    protonmail-bridge protonmail-bridge --cli

Ports

Container Port Protocol Notes
1144 IMAP External port (socat forwards to 1143)
1026 SMTP External port (socat forwards to 1025)

Connect from other containers using protonmail-bridge:1144 (IMAP) and protonmail-bridge:1026 (SMTP).

Volumes

Path Description
/home/bridge Bridge data, GPG keys, and password store

Important: Persist this volume to retain your login across container restarts.

Updating

To update to a new Bridge version:

  1. Edit BRIDGE_VER and BRIDGE_SHA256 in the Dockerfile
  2. Get the new SHA256: Build once and check the error message for the correct hash

Languages

Dockerfile56.3%Shell43.7%

Contributors

MIT License
Created December 22, 2025
Updated February 22, 2026
Bastian/protonmail-bridge-docker | GitHunt