Deploy SendDock | (Just Updated) Email Marketing Platform, Newsletter and SMTP Sender, Admin Login Pre-Created

SendDock email marketing platform, self-hosted newsletter and SMTP sender

Deploy SendDock | (Just Updated) Email Marketing Platform, Newsletter and SMTP Sender, Admin Login Pre-Created

Just deployed

/data

Just deployed

Just deployed

/var/lib/postgresql

Deploy and Host SendDock on Railway

Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the administrator login, the JWT secret and the database and Redis credentials are generated, and the administrator is created at boot, so nobody can claim a fresh instance through the first-run setup page. SendDock is an open-source email marketing and transactional email platform: subscribers, segments, templates, campaigns, broadcasts, webhooks and a REST API that sends through your own SMTP server.

About Hosting SendDock

This template runs three services: senddock, the official ghcr.io/senddock/senddock image (0.8.3) pinned by digest through a thin wrapper; database, a PostgreSQL 17 instance with a volume at /var/lib/postgresql that holds subscribers, campaigns, templates and settings; and cache, a Redis 8 instance with a volume at /data. The app keeps nothing on its own disk. One public domain serves the dashboard and the API. The healthcheck is GET /health.

What the wrapper fixes. SendDock's first-run setup endpoint (POST /api/v1/setup) creates the first administrator for whoever calls it first, so a stock deploy on a public domain can be claimed by a stranger before you open the page. It also needs DATABASE_URL and REDIS_URL assembled by hand. The wrapper builds both from the Railway variables, binds the server to Railway's injected PORT, and as soon as /health answers it creates the administrator from SENDDOCK_ADMIN_EMAIL and SENDDOCK_ADMIN_PASSWORD and stores the Railway domain as the public URL (used in unsubscribe and tracking links). It acts only while setup_required is true, so a redeploy never touches existing data. Measured on a Railway control deploy: setup is closed (public signup: 403) and the generated login works. The generated password carries a fixed prefix so it always satisfies SendDock's password rule (upper case, digit, special character).

Using it. Open the domain and sign in with SENDDOCK_ADMIN_EMAIL and SENDDOCK_ADMIN_PASSWORD. Outgoing mail is not configured: add your SMTP server under the project's SMTP settings in the dashboard before sending. Pro features need a licence key entered in the dashboard and are not required. SendDock is released under AGPL-3.0.

Agent contract

  • Public URL: https://RAILWAY_PUBLIC_DOMAIN (the generated domain of the senddock service)
  • Private URL: http://senddock.railway.internal:8080
  • Credentials: the variables SENDDOCK_ADMIN_EMAIL and SENDDOCK_ADMIN_PASSWORD on the senddock service (plain text)
  • Auth: POST /api/v1/auth/login with JSON {"email","password"} sets an access_token cookie (and a refresh cookie); send the cookie on every call under /api/v1/. Project API keys can be minted under /api/v1/projects/{id}/keys for sending mail
  • Health: GET /health returns 200 without credentials
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, SENDDOCK_ADMIN_EMAIL, SENDDOCK_ADMIN_PASSWORD (variables of the senddock service); also curl, jq.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="content-type: application/json"; JAR=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/health")" = 200 ]; do n=$((n+1)); [ "$n" -le 90 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/health"
# the administrator exists already, so first-run setup is closed to strangers
curl -s "$R/api/v1/setup/status" | jq -r '"setup_required: " + (.setup_required|tostring), "public_url: " + .public_url'
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$J" -d '{"name":"x","email":"x@example.com","password":"Stranger1!","public_url":""}' "$R/api/v1/setup"
# sign in: the access_token cookie authenticates every call after this
curl -s -o /dev/null -w "login: %{http_code}\n" -c "$JAR" -H "$J" -d "$(jq -nc --arg e "$SENDDOCK_ADMIN_EMAIL" --arg p "$SENDDOCK_ADMIN_PASSWORD" '{email:$e,password:$p}')" "$R/api/v1/auth/login"
# a read with the session succeeds, the same read without it is refused
curl -s -o /dev/null -w "read with session: %{http_code}\n" -b "$JAR" "$R/api/v1/workspaces"
curl -s -o /dev/null -w "read without session: %{http_code}\n" "$R/api/v1/workspaces"
# write-auth: create a workspace with the session, the same write without it is refused
curl -s -o /dev/null -w "write with session: %{http_code}\n" -b "$JAR" -H "$J" -d '{"name":"agent-check"}' "$R/api/v1/workspaces"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$J" -d '{"name":"agent-check"}' "$R/api/v1/workspaces"

Expected output against a fresh deploy (measured on a Railway control deploy of the published template; the output is recorded in template.md):

health: 200
setup_required: false
public_url: https://RAILWAY_PUBLIC_DOMAIN
public signup: 403
login: 200
read with session: 200
read without session: 401
write with session: 201
write without key: 401

The refusals are the contract: a read or write without a session answers 401 (write without key: 401), and the first-run setup call from a stranger answers 403 (public signup: 403).

Why Deploy SendDock 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 SendDock 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.

  • Agent-ready - no deployer fields, a contract block, and one script that proves the server is healthy, a stranger cannot claim it, and the generated login can read and write.
  • Nobody can claim it first - the administrator is created at boot, not by the first visitor to the setup page.
  • Data survives redeploys - subscribers and campaigns in PostgreSQL on a volume, rate-limit state in Redis on a volume.
  • Pinned - the upstream image is pinned by digest and the wrapper by tag and digest.

Common Use Cases

  • Newsletters and campaigns - manage subscribers and segments and send broadcasts through your own SMTP server.
  • Transactional email - send mail from your application through the REST API with a project API key.
  • Email automation with AI agents - create projects, templates and campaigns, and read delivery logs through the API.

Dependencies for SendDock Hosting

  • The senddock service, a PostgreSQL service and a Redis service, the last two with their volumes, created by the template.

Deployment Dependencies


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0