open sourced Manychat: comment-dm automation + account analytics. the link below will not allow you to oauth; you must self-host with your own api keys.
open sourced Manychat: comment-dm automation + account analytics. the link below will not allow you to oauth; you must self-host with your own api keys.
Someone comments LINK on your reel, and OpenReply queues a DM with your link. That is the whole idea. OpenReply watches the comments on your Instagram posts, and when a comment matches a keyword you set, it sends that person a private reply through the official Meta API. You can also post a public reply under the comment at the same time.
OpenReply is free, MIT-licensed software running on your own infrastructure, with no software seat limits or plan caps. Hosting and optional provider costs are separate.
Supported by Zernio. An optional paid Instagram connection provider that lets you avoid creating and reviewing your own Meta app. OpenReply still runs your campaigns, queues, logs, and inbox on your infrastructure. Connect with Zernio, or keep using your own Meta app.
OpenReply is self-hosted. You have to deploy your own copy.
openreply.diwen.dev is a demo of the dashboard, not a service you can sign up for. Creating an account there will never send a DM for you, and there is no hosted plan to upgrade to.
A working instance needs your deployed fork, a public HTTPS URL, PostgreSQL, Redis, a running worker, and an Instagram connection. Choose optional paid Zernio or your own Meta app. docs/setup.md walks through all of it.
If this saves you a subscription or a weekend of building, a star on the repo genuinely helps other people find it.
Comment-to-DM is one feature, but every tool that offers it wants a recurring subscription for it. OpenReply makes that workflow available as software you can inspect, modify, and host yourself.
OpenReply is built around Meta's official Instagram private replies. It does not scrape, it does not automate a browser, and it never asks for an Instagram password. Instagram’s policies, permissions, messaging windows, and rate limits still apply.
Reply LINK to this Story work with no post involved. Turn it on per campaign, and subscribe to the messages webhook field if you use your own Meta app. Zernio webhook registration is automatic.is_user_follow_business flag and only sends the link once they follow, re-prompting until then. It fails open (sends the link anyway) when Instagram does not return follow status, so a real follower is never trapped.{username} in your message to greet the commenter by name.The web app receives the webhook and serves the dashboard. A separate worker process does the sending, because the send has to survive rate limits and retries. Both talk to the same Postgres and Redis.
Read docs/setup.md for the complete walkthrough, including a provider-aware AI assistant prompt. Existing accounts are never automatically migrated. Check Zernio’s feature limits before choosing.
The button creates your web deployment. You still need to configure the database, Redis, email delivery, and a separate always-on worker.
git clone https://github.com/diwenne/openreply.git
cd openreply
npm install
cp .env.example .env # then fill in the values, see docs/setup.md
docker-compose up -d # starts Postgres and Redis
npm run db:generate
npm run db:migrate
npm run dev # web app on http://localhost:3000
npm run worker # in a second terminal, this sends the DMs
Two processes, always. npm run dev serves the app and receives webhooks. npm run worker is what actually sends the messages. If comments come in and no DM ever arrives, the worker is the first thing to check.
Full environment variables and the production layout are in docs/setup.md.
If you use Claude Code, Cursor, or a similar tool, an assistant can walk you through either connection path. There is a ready-made prompt in the Set it up with an AI assistant section of the setup guide. Paste it into your assistant inside a clone of this repo, choose your provider before configuring any Meta secrets, and it will walk you through connecting Instagram and going live.
For the complete stack — application libraries, the two runtime processes, and the free services this runs on (Vercel, Neon, Redis Cloud, an Oracle Cloud always-free VM for the worker, Resend, Meta) — see docs/stack.md.
Issues and pull requests are welcome. If you hit a Meta quirk that is not in the setup guide, a PR that documents it is worth as much as a code fix, because that is where everyone loses time.
See CONTRIBUTING.md to get started.
Built and maintained by Diwen Huang.
OpenReply was initially forked from instagram-comment-to-dm by Anish Raj, also MIT licensed, and has been substantially built upon since.
If OpenReply is useful to you, star it. It is the simplest way to help the project reach the next person looking for a free way to do this.
MIT. See LICENSE.
No open issues yet, or sync has not completed.