---
title: "Deploy Cloudflare Email"
description: "EmailFlare is a self-hosted email sending platform built around Cloudflare"
category: "Other"
url: https://railway.com/deploy/emailflare
---

# Deploy Cloudflare Email

EmailFlare is a self-hosted email sending platform built around Cloudflare

**[Deploy Cloudflare Email on Railway](https://railway.com/template/emailflare)**

- **Creator:** 0xlabs-space
- **Category:** Other
- **Total deploys:** 6

## Template content

### EmailFlare https://raw.githubusercontent.com/0xdps/emailflare/refs/heads/trunk/services/landing/public/favicon.svg

- **Image:** ghcr.io/0xdps/emailflare:latest
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host EmailFlare on Railway

EmailFlare is an open-source, self-hosted email sending platform built on the Cloudflare Email Sending API. It ships an admin UI for managing domains, API keys, templates, and send logs — packaged as a single Docker container with embedded SQLite storage.

## About Hosting EmailFlare

EmailFlare is built for minimum infrastructure. A single container bundles the Hono API backend, React admin UI, and embedded SQLite storage via mesahub-core. There are no external databases or message queues to provision. The Railway template pre-configures everything — generated secrets, embedded storage, and a persistent `/data` volume. All you need to bring are your Cloudflare credentials.

## Common Use Cases

- **Transactional email for SaaS apps** — Send password resets, magic links, order confirmations, and notifications via a simple REST API
- **Multi-domain email platform** — Manage multiple Cloudflare sending domains and scoped API keys from a single admin dashboard
- **Team email infrastructure** — Issue per-team or per-service API keys with domain-level scoping; inspect every send in the logs UI

## Dependencies for EmailFlare Hosting

- **Cloudflare account** with Email Sending enabled
- **Cloudflare API token** scoped to Email Routing (Edit) + Email Sending (Edit)

&gt; Everything else — secrets, storage, volume — is handled by the Railway template automatically.

### Deployment Dependencies

- [Cloudflare Email Sending](https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/) — outbound email delivery provider
- [EmailFlare Cloudflare token guide](https://emailflare.dev/cloudflare-token) — step-by-step token creation with required permissions
- [mesahub-core](https://github.com/0xdps/mesahub-core) — embedded SQLite storage engine

### Implementation Details

The Railway template pre-sets `ADMIN_TOKEN`, `SESSION_SECRET`, and `MESAHUB_URL` with secure generated values and configures a persistent volume at `/data`. You only need to supply two variables:

```text
CF_API_TOKEN=
CF_ACCOUNT_ID=
```

**Testing without Cloudflare credentials:** Create a **test API key** in the admin UI. Test keys route sends through SMTP (`SMTP_HOST` / `SMTP_PORT`) instead of Cloudflare — point them at any SMTP catcher such as Mailpit for safe staging tests.

## Why Deploy EmailFlare on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying EmailFlare on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/emailflare
