INSTALL GUIDE · RASPBERRY PI
Blue Folder Mail on a Raspberry Pi
A Pi 4/5 (or any home server) sips power and runs this happily. The one thing to get right is reaching it from the internet — a tunnel, not an open port.
Prerequisites
- A 64-bit Pi (Pi 4 / Pi 5, or arm64 SBC) on Raspberry Pi OS 64-bit / Ubuntu. The image is multi-arch, so arm64 works.
- 1 GB+ RAM; data on the SD card is fine, but an SSD is kinder for longevity.
- A domain name and a free Cloudflare Tunnel or Tailscale account for a stable HTTPS URL.
- A Resend account; an inbound provider for receiving.
Install
- Install Docker
curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER # log out/in after
- Install Blue Folder Mail
curl -fsSL https://raw.githubusercontent.com/gordonvividtone/bluefolder-mail/main/install.sh | bash
Set INBOUND_SECRET and RESEND_API_KEY. Data persists in the bfm-data volume.
- Open it on the LAN
http://raspberrypi.local:8080 (or the Pi's IP) to create your mailbox and save the backup password.
Same container as the Docker guide; the image runs on arm64 as-is.
Make it reachable (and HTTPS)
Don't forward ports from your router. Use an outbound tunnel so nothing on your home network is exposed:
- Cloudflare Tunnel — cloudflared connects out and maps a hostname to localhost:8080 with automatic TLS.
- Tailscale — reach it privately from your own devices, or use Funnel for a public HTTPS URL.
Add a login with BASIC_AUTH_USER / BASIC_AUTH_PASS regardless.
Receiving mail — the honest part
Recommended — webhook (the only realistic path at home)
Point a provider (Mailgun, SendGrid, Postal, Resend inbound) at https://your-tunnel/_inbound with the secret as the x-inbound-secret header or ?secret=…, forwarding full raw MIME.
Storage & sending
- Storage — local disk by default. Back up the bfm-data volume (and consider an SSD over the SD card). Or push blobs to S3 with STORAGE_BACKEND=s3. Ciphertext only.
- Sending — verify your domains at resend.com and set RESEND_API_KEY.