openreply README

项目的 README,来自 github.com/diwenne/openreply。合并为一个 markdown 文件:README.md。

OpenReply

Open-sourced ManyChat for Instagram comment-to-DM automation.

License: MIT Stars Built with Next.js

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.

Why this exists

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.

Features

How it works

  1. Someone comments on your Instagram post or reel, or DMs you, or replies to your Story.
  2. Your connection provider (direct Meta or Zernio) delivers the event to your OpenReply instance.
  3. OpenReply checks the text against your active campaigns.
  4. On a keyword match, it queues a job.
  5. A background worker sends the private reply, and the public reply if you enabled one.

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.

Quick start

  1. Choose your Instagram connection. Zernio is recommended if you want to avoid setting up your own Meta app. It is a paid service and sponsor, not a hosted OpenReply plan. Or follow the existing direct Meta setup.
  2. Deploy the app and worker. Both paths need PostgreSQL, Redis, a public HTTPS URL, and email delivery for magic-link sign-in.
  3. Connect an Instagram Business or Creator account in Settings, create a campaign, and test a keyword comment from another account.

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.

Moving from ManyChat or another DM tool? Disconnect it from the Instagram account and give OpenReply control of conversations in Meta Business Suite, or button taps in DMs will fail with "not the thread owner". See Migrating from ManyChat.

Deploy the web app

The button creates your web deployment. You still need to configure the database, Redis, email delivery, and a separate always-on worker.

Deploy with Vercel

Run it locally

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.

Set it up with your AI assistant

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.

Tech stack

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.

Contributing

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.

Credits

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.

Star History

Star History Chart

Star the repo

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.

License

MIT. See LICENSE.

openreply (diwenne/openreply)

正在搜索数据库…

这是什么?OpenReply 是一款可自行部署的开源软件,是 ManyChat 的开源替代方案,用于 Instagram 评论转私信的自动化:当有人在你的帖子或短视频下评论关键词时,它会通过 Instagram 官方 API 向对方发送一条私信,其中附上你的链接。
这是托管服务,还是需要我自己运行的软件?这是需要你自己部署的软件。公开的演示站点只是界面预览,没有提供托管服务的注册套餐。
我该怎么让它运行起来?部署网页应用和一个单独的常驻后台进程(worker),然后在「设置」中连接 Instagram 商业或创作者账号,并创建一个活动。在本地运行时,用 'npm run dev' 启动应用,用 'npm run worker' 启动发送进程。
运行自己的实例需要准备什么?你需要一个公网 HTTPS 地址、PostgreSQL、Redis、用于魔法链接登录的邮件发送服务,以及 Instagram 连接方式:可以通过你自己的 Meta 应用,也可以使用付费的 Zernio 服务商。
它能用于各种 Instagram 自动化吗,还是只能严格按规则运行?它只使用 Meta 官方的私信回复 API,并遵守 Instagram 的频率限制、消息时间窗口和平台政策。它不会抓取数据、操控浏览器,也不会绕过任何限制。每个账号每小时最多发送 750 条私信回复,超出的部分会排队等待。
我能把它运行在自己的服务器上吗?可以,它的设计就是在你自己的基础设施上运行,包括免费方案,例如用 Oracle Cloud 永久免费的虚拟机来运行 worker。
它会使用我的 Instagram 密码或抓取数据吗?不会。它只使用 Meta 官方的 Instagram API,从不索要你的 Instagram 密码。
如果有人点了链接却没有关注我,会怎样?如果你开启了关注门槛,OpenReply 会检查 Meta 的关注状态,并反复提示对方关注,直到对方关注为止。但如果 Instagram 没有返回关注状态,它会「失败放行」,照常发送链接,所以真正的粉丝不会被拦住。
它也能处理对我限时动态的回复吗?可以。同一个关键词活动可以由收到的私信触发。Instagram 会把限时动态的文字回复当作私信投递,所以有人只要在限时动态里回复 LINK,无需关联任何帖子,就能触发活动。
我需要自己创建 Meta 开发者应用吗?可以自己创建,也可以跳过这一步,改用付费的 Zernio 服务商。它负责 Instagram 连接,而 OpenReply 仍然在你自己的基础设施上运行你的活动、队列和收件箱。
它背后用的是什么技术栈?应用部分使用 Next.js 16 和 React 19;数据部分使用 Prisma 7 加 PostgreSQL;发送队列和 worker 使用基于 Redis 的 BullMQ;魔法链接登录使用 Auth.js 搭配 Resend;界面使用 Tailwind CSS。
有哪些类似的项目?rankme.fast, asobeast, crm, casdoor, os, bisibility, documenso, itsaplan
作者
diwenne
大小
1.3 MB
星标
3.3K
更新
提交Oct 29
时长
4个月
提交 · 90 天