Deploy OpenReply
ManyChat alternative: someone comments LINK, your DM goes out.
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
openreply
Just deployed
Deploy and Host OpenReply on Railway
OpenReply is the open-source ManyChat alternative for Instagram comment-to-DM automation. Someone comments LINK on your reel, and a DM with your link goes out automatically. It watches your posts, matches keywords you set, and runs the whole flow — dashboard, worker, scheduler — on infrastructure you control.
About Hosting OpenReply
Hosting OpenReply takes one app service beside managed PostgreSQL and Redis. The app runs three processes in one container: the Next.js web app on port 3000, the DM worker, and the scheduler that keeps tokens and comment watchers alive. Migrations apply on every start, before the processes launch. Sign-in is an emailed magic link — bring a Resend key or your own SMTP. The health endpoint checks the database, the queue, and a worker heartbeat — a passing check means your automations are actually running. Most deployments silently omit the scheduler; without it the Instagram token expires and every automation stops without an error.
Common Use Cases
- Send a link, coupon, or guide by DM the moment someone comments a keyword.
- Run "comment below and I'll DM you" funnels without ManyChat per-seat fees.
- Snapshot follower counts and refresh Instagram tokens on a schedule.
- Keep every campaign, comment, and DM log in your own Postgres.
- Give an agency client their own instance on infrastructure you control.
Dependencies for OpenReply Hosting
- The upstream repository as the service source (no published image exists yet; Railway builds the official Dockerfile).
- One PostgreSQL database (Railway-managed) for workspaces, campaigns, and logs.
- One Redis database (Railway-managed) for the DM queue.
- An email sender for magic-link sign-in: a Resend API key (free tier works) or your own SMTP server.
- An Instagram app with messaging permissions, connected in-app after first sign-in.
Implementation Details
First run: open https://YOUR-DOMAIN, enter your email, and click the magic link that arrives. Sign-in needs an email sender, but the deployment does not: the app boots and passes its health check with the Resend key empty, and only the magic-link send waits for it — so deployers set a free-tier Resend key or their own SMTP at first login, never before deploying. If you set ALLOWED_EMAILS, only those addresses can sign in; otherwise anyone who reaches the URL can create a workspace — so set it on a shared domain or right after deploying.
| Path | Purpose |
|---|---|
/ (port 3000) | Dashboard — magic-link sign-in |
/api/health | Deep health: database, Redis queue, worker heartbeat |
:5432 / :6379 | PostgreSQL and Redis, private network only |
| Scheduler (in-container) | attach-next-reel every 5 min, daily token refresh |
The start command runs migrations, then supervises the web app, the DM worker, and the scheduler together; if any process dies, the container restarts and the others come back with it. The scheduler targets the web app on loopback, so no extra ports are exposed.
Comparison with Alternatives
✅ = built-in, ❌ = not available or requires extra work.
| Capability | This template (OpenReply) | ManyChat | Vercel + manual services |
|---|---|---|---|
| Self-hosted; no per-seat or usage pricing | ✅ | ❌ | ✅ |
| DM worker running always-on | ✅ | ✅ | ⚠️ (needs a separate host for the worker) |
| Token-refresh scheduler included | ✅ | ✅ | ❌ (silent expiry without it) |
| Deep health check (worker heartbeat + queue) | ✅ | — | ⚠️ (only if you build it) |
| Your data in your own Postgres | ✅ | ❌ | ✅ |
| First sign-in by magic link | ✅ | ✅ | ✅ |
Sources: the OpenReply repository and its deployment guides.
Security Considerations
- Anyone who can reach the URL can request a magic link and create a workspace unless
ALLOWED_EMAILSis set. Set it right after deploying on any instance you do not fully control. - The magic-link email is the only sign-in: protect the Resend or SMTP credentials, and remember that anyone with project access can read them from the variables.
- Instagram credentials are connected in-app and stored encrypted in PostgreSQL; the workspace owns them, not the deployment.
- The web app is the only public surface; PostgreSQL and Redis stay on the private network.
- The source tracks upstream
main— there are no release tags yet. Redeploy to update, and pin a fork of your own if you need reproducibility.
Why Deploy OpenReply 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 OpenReply 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.
One app service with its worker and scheduler inside, plus managed Postgres and Redis, replaces both a ManyChat subscription and the VPS most self-hosters struggle with — and the health check proves the automations are alive, not just the web page.
Template Content
Redis
redis:8.2openreply
diwennee/openreplyRESEND_API_KEY
FILL IN before first sign-in: create a free account at resend.com, open API Keys, and paste the key here (it starts with re_). Deploys fine empty - only the magic-link email needs it. Prefer your own SMTP? Leave this empty and add EMAIL_SERVER="smtps://user:password@smtp.example.com:465" instead.