---
title: "Deploy SendPortal"
description: "Self-hosted email marketing: newsletters via SES, SMTP, SendGrid and more"
category: "Other"
url: https://railway.com/deploy/sendportal-1
---

# Deploy SendPortal

Self-hosted email marketing: newsletters via SES, SMTP, SendGrid and more

**[Deploy SendPortal on Railway](https://railway.com/template/sendportal-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/sendportal-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### SendPortal https://raw.githubusercontent.com/mettle/sendportal-core/master/public/img/favicons/android-icon-192x192.png

- **Source:** https://github.com/aalfath/sendportal-railway-template
- **Health check:** /login
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host SendPortal on Railway

SendPortal is an open-source, self-hosted email marketing app built with Laravel. It manages subscribers, tags and segments, email templates and campaigns, tracks opens, clicks, bounces and unsubscribes, and has a REST API. It sends through your own Amazon SES, SendGrid, Mailgun, Postmark, Mailjet, Postal or SMTP account, so you pay only your provider's sending costs.

## About Hosting SendPortal

Hosting SendPortal means running a PHP web app, a queue that sends every campaign message in the background, a scheduler that releases scheduled campaigns, a Postgres database and Redis. This template builds SendPortal v4.0.0.1 from a GitHub repo, on the official PHP 8.4 Apache image, and runs the web app, the Horizon queue workers and the scheduler together in one service. Postgres and Redis run as Railway services on the private network. On the first start it runs the database migrations and creates your admin account and workspace from the email you enter, with a generated password, so the setup wizard is never open to strangers. Public sign-up stays closed.

## Common Use Cases

* Send newsletters and product announcements to your own mailing list
* Run marketing campaigns through Amazon SES or another low-cost email provider instead of a paid email marketing platform
* Add subscribers and send campaigns from your own app through the SendPortal API

## Dependencies for SendPortal Hosting

* PostgreSQL (Railway Postgres) for subscribers, campaigns, templates and messages
* Redis (Railway Redis) for the queue, cache and sessions
* An account with an email provider (Amazon SES, SendGrid, Mailgun, Postmark, Mailjet, Postal or any SMTP server) to send campaigns

### Deployment Dependencies

* SendPortal source and releases: https://github.com/mettle/sendportal
* SendPortal documentation: https://sendportal.io/docs
* Template repository (Dockerfile, start script, changelog): https://github.com/aalfath/sendportal-railway-template

### Implementation Details

The only value you enter is `SENDPORTAL_ADMIN_EMAIL`. After the deploy, log in with that email and the generated `SENDPORTAL_ADMIN_PASSWORD` from the SendPortal service's Variables tab, then change the password under your profile.

Then add an email service under Email Services. For SMTP, type `tls` in the Encryption field: SendPortal 4.0 can't send over SMTP with it empty. To record deliveries, bounces and complaints, point your provider's webhooks at `https://YOUR-DOMAIN/api/v1/webhooks/PROVIDER` (for example `/api/v1/webhooks/postmark`).

Password-reset and invitation emails go to the logs until you set the optional `MAIL_MAILER`, `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD`, `MAIL_ENCRYPTION` and `MAIL_FROM_ADDRESS` variables on the SendPortal service. Campaign emails don't need them. If you add a custom domain, set `APP_URL` to it so tracking and unsubscribe links use it. The Horizon queue dashboard is at `/horizon` for workspace owners.

## Why Deploy SendPortal 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 SendPortal 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) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/sendportal-1
