Instagram DM automation open source projects are programs with public code that you run on your own server and connect to your own Instagram account through Meta's official API. The code is free. You supply a Meta developer app, hosting that stays on around the clock, and the upkeep, and Instagram's usual messaging rules still apply.

We read each project's own repository and Meta's developer documentation on 23 October 2026. We have not run any of the projects, and naming one is not a recommendation.

What does self-hosted Instagram DM automation involve?

Self-hosted Instagram DM automation means you, not a vendor, run the software that watches your comments and sends the messages. A hosted tool runs that part for you. A self-hosted project hands you the code and the job.

The OpenReply project's README lists what a working copy needs: your own deployed copy of the code, a public web address with a secure connection, a database, a queue that holds messages waiting to go out, a program that runs all day and does the sending, and an Instagram connection. If comments arrive and no message ever goes out, the README says to check the sending program first.

Which open source Instagram DM projects use Meta's official API?

Three projects say so in their own READMEs. All three are under the MIT licence, and all three repositories were created in 2026, so none has a long track record. Star counts and activity change daily, so we left them out.

  • OpenReply (repository diwenne/openreply). Its README says it sends private replies through Meta's official API, never scrapes, never automates a browser and never asks for an Instagram password. It offers keyword matching, an optional public reply, link tracking, a follow gate and several accounts in one workspace. There is no hosted version: the project's demo site cannot send messages for you. The README also describes an optional paid connection service, which it names as a sponsor, that lets you skip creating and reviewing your own Meta app.
  • chatmany (repository ryanlaiyanip-ctrl/chatmany). Its README says it uses the official Meta API only, that the author hosts nothing, and that it runs on Cloudflare's free tier. It estimates setup at about 45 minutes.
  • InstaAuto (repository ayuuxh2/insta-p8). Its README says it uses the official Instagram API with Instagram Login, and it lists an AI auto-reply option, which AI agents versus rule-based automation compares with fixed replies. It also says access to the project's hosted demo may need approval.

Which open source Instagram tools break the rules?

Libraries that log in with your username and password sit on the wrong side of Instagram's Terms of Use. The Terms say you cannot access or collect information in an automated way without Instagram's express permission, and cannot solicit, collect or use login credentials. Instagram's Help Center lists giving your username and password to a third-party app, and automating access, among the reasons an account may be restricted.

One open source Python library, instagrapi, calls itself an unofficial wrapper for Instagram's private interface, and its examples sign in with a username and password. Its own README warns that automation through that interface is fragile in production and says to prefer official Instagram APIs where they cover your use case. We are not saying what would happen to any particular account that uses it. We are saying Instagram's pages name that pattern as a cause of restrictions.

Open source does not mean allowed. A project's licence says what you may do with its code. It does not say what Instagram permits on your account. What an Instagram DM bot is separates the two kinds.

Can you build your own Instagram DM bot?

Yes, for your own account, and the steps are the same whether you deploy a project or write your own. In plain words, from Meta's pages and the projects' guides:

  1. Register as a Meta developer and create an app. In Meta's App Dashboard you add the Instagram login product to it.
  2. Use a Business or Creator account. Meta's overview says people who connect must have an Instagram professional account.
  3. Copy two codes from the dashboard. One is your app's public ID and the other is its secret. Keep the secret private.
  4. Add your own account as a tester and accept the invite. Until you do, even your own account cannot connect to your app. OpenReply's guide calls this the step people miss.
  5. Set up a public address that Instagram can notify. Meta says to create and verify a secure web address, tell Meta which events you want, turn on notifications for the account, and test. Your program must check that each notification came from Meta, answer quickly and cope with the same one arriving twice. Instagram keeps no history of notifications, so store what you need.
  6. Send replies inside Meta's rules. The rules are in the next section.
  7. Renew access every 60 days. Meta says the long-lived access token Instagram hands your app is valid for 60 days and can be refreshed before it expires. Once it expires, the access stops working.
  8. Keep it running. The sending program has to stay on, and you are the one who notices when it stops.

OpenReply's guide calls the Meta app setup the slow part of installing it. If you want the mechanics of Meta's official connection first, the Instagram direct message API explained covers them.

What rules does a self-built bot still follow?

Instagram's rules are the same for every program that sends messages, hosted or self-built (Meta's Instagram Platform documentation, read 23 October 2026):

  • One private reply per comment, within 7 days of the comment. Meta's page on private replies says a reply goes to the Requests folder if the person does not follow the account.
  • A 24-hour window after someone messages you. Meta says it may last up to 7 days when the conversation starts from a Click-to-Direct ad, which its messaging changelog documented on 28 September 2026.
  • About 750 private replies an hour per account for comments on posts and reels.
  • Up to three link buttons in one message.
  • No messages to people who never commented on or messaged your account.

Meta's Developer Policies (last updated 3 February 2026) add that people must be able to opt out, and that a messaging experience that gets excessive negative feedback may be limited or paused. Meta's messaging changelog was updated on 18 October 2026, which shows how often these rules are touched.

Does self-hosting need Meta's approval?

Not for your own account. Meta's App Review page says an app for a business you own or manage needs Standard Access, with App Review not required, while a Tech Provider serving several businesses needs Advanced Access and review (updated 30 June 2026). Meta's overview says Advanced Access requires App Review and Business Verification.

Review asks for a screen recording of the app working, a description of how each permission is used, a privacy policy address, an app icon, test instructions for Meta's reviewers and, for some permissions, at least one successful request to Instagram. Meta's access levels page adds a yearly Data Use Checkup for apps with Advanced Access. What a Meta Tech Provider is explains the other side of that review.

Is there an open source alternative to a paid Instagram DM tool?

Yes, the three projects above are open source alternatives, and for one account run by someone comfortable with servers they can work. Whether they are cheaper depends on what you count.

The READMEs say the software has no fee. chatmany says it costs $0 a month at single-creator scale on free tiers, which is its claim. OpenReply says hosting and optional provider costs are separate. We did not price any host. Free tiers have limits that change, so read each host's own pricing page before you count on $0, and count your own hours as well.

If you prefer not to run anything, a hosted tool does that part. For wiring Instagram to other apps without writing the sender yourself, see Zapier, Make and n8n for Instagram DMs.

Where this stops working

  • Your own account only, in practice. Serving clients or other people's accounts means App Review and Business Verification, which is where most self-hosted projects stop.
  • We vouch for no code. We did not audit or run any project, and each one will hold the access to your Instagram account. Young repositories with few contributors can also stall.
  • The rules do not move for open source. The 24-hour window, one reply per comment and the speed ceiling apply to every sender.
  • Costs are unpriced. We left out any monthly figure we could not source.
  • Details change. Repositories and Meta's pages are updated often, and the dates here are when we read them.

If you want comment-to-DM without running a server, inDM's Free plan is $0 forever, with no card, every automation type and one Instagram account, and it connects through Instagram's own login.

Sources

All read on 23 October 2026.