---
name: free-comment-to-dm
description: "OpenReply is an open-source (MIT) alternative to paid comment-to-DM tools. Someone comments a keyword on your reel, and it DMs them your link through Instagram's official API. You host it yourself. Use when the user asks to: free comment-to-dm for instagram."
---

Walk the user through this workflow. Check each setup step is done before running the prompts, and ask for anything marked [LIKE THIS] before starting.

# Free comment-to-DM for Instagram

OpenReply is an open-source (MIT) alternative to paid comment-to-DM tools. Someone comments a keyword on your reel, and it DMs them your link through Instagram's official API. You host it yourself.

## Setup
1. Your Instagram must be a Business or Creator account.
2. Fork OpenReply on GitHub and deploy the web app, the worker, Postgres and Redis to your host.
3. Set ALLOWED_EMAILS to your own email, so nobody else can sign in to your copy.
4. Create a Meta app, add Instagram messaging and the comments webhook, and paste its keys into your settings (docs/setup.md walks through it).
5. Sign in, connect Instagram, create a campaign with a keyword and your link, then test it by commenting from another account.

## Tools
- OpenReply (https://github.com/diwenne/openreply): The app. Read docs/setup.md in the repo: it covers every step.
- Meta for Developers (https://developers.facebook.com): Where you create your own Meta app to connect Instagram.
- A host with Postgres and Redis (https://railway.com): Any host works. It needs a web app, an always-on worker, a database and Redis.

## Prompts
### Let Claude Code deploy it
Paste into Claude Code in your fork of OpenReply.

```
This is my fork of OpenReply. Read README.md and docs/setup.md, then deploy it to [YOUR HOST] for my Instagram account only.
1. List every environment variable it needs, which ones I must create myself (Meta app keys, email sender), and generate strong random values for the secrets.
2. Set ALLOWED_EMAILS to [YOUR EMAIL].
3. Deploy the web app and the worker, with Postgres and Redis.
4. Walk me through creating the Meta app step by step, waiting for me at each step that needs my login.
Ask before anything that costs money.
```

## Worth knowing
- Instagram allows one automated DM per comment, sent within 7 days of the comment. Follow-ups are only allowed if the person replies.
- Using your own Meta app for your own account doesn't need Meta's full app review. Serving other people's accounts does.
- Hosting costs a few pounds a month. It's free software, not a free service.

Source: https://kodebykraft.com/guides/free-comment-to-dm (The Leaky Funnel, @theleakyfunnel)
