Deploy OpenReply

ManyChat alternative: someone comments LINK, your DM goes out.

Deploy OpenReply

Just deployed

/data

/var/lib/postgresql/data

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.

PathPurpose
/ (port 3000)Dashboard — magic-link sign-in
/api/healthDeep health: database, Redis queue, worker heartbeat
:5432 / :6379PostgreSQL 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.

CapabilityThis template (OpenReply)ManyChatVercel + 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_EMAILS is 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
121
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
116
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
866