Deploy SendPortal
Self-hosted email marketing: newsletters via SES, SMTP, SendGrid and more
SendPortal
Just deployed
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
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.
Template Content
SendPortal
aalfath/sendportal-railway-templateSENDPORTAL_ADMIN_EMAIL
Email address of the first admin account, created on the first deploy.
Redis
redis:8.2