BlogSetup Guide

How to Self-Host an Instagram DM Bot on a ₹299/month VPS

Setup GuideJune 20258 min read
Disclosure: Some links in this guide are affiliate links. We earn a small commission if you purchase through them — at no extra cost to you. We only recommend services we've tested ourselves.

Most Instagram DM automation guides end at “sign up for this SaaS tool.” This one is different. We're going to set up a bot that runs on your own server, replies to DMs in seconds, and costs you nothing beyond the server fee every month.

By the end of this guide, you'll have a working Instagram DM bot live on a Hostinger VPS. The whole process takes about an hour — and you only do it once.

What you need before starting: A Hostinger account, the SocialAIFlow bot license (from our pricing page), and 60 minutes.

Why self-host instead of using a SaaS tool?

Three reasons that matter if you're an Indian seller or agency:

  • Cost. The cheapest decent SaaS Instagram DM tool costs ₹2,500–₹5,000/month. A VPS costs ₹299/month. Over a year, you save ₹26,000+.
  • Data. SaaS tools store your leads and customer conversations on their servers. Self-hosting means that data never leaves your control.
  • Safety. Many SaaS tools use shared IP pools. If someone else on the same pool gets flagged, your account gets painted with the same brush. Your own VPS has your own dedicated IP.

Step 1: Get your VPS (5 minutes)

We use and recommend Hostinger's KVM 1 plan. At ₹299/month, it gives you 1 vCPU, 4GB RAM, and 50GB SSD — more than enough to run the SocialAIFlow bot across 2–3 accounts.

Choose the Mumbai data center and Ubuntu 22.04 LTS as the operating system. During setup, set a strong root password and save it.

⚠️ Important: Choose Ubuntu 22.04 LTS specifically — not 23 or 24. Our bot files and all commands below are tested on this version.

Step 2: Connect to your server (5 minutes)

Once your VPS is provisioned, open your terminal and run:

ssh root@YOUR_SERVER_IP

Update system packages:

apt update && apt upgrade -y

Step 3: Install Node.js (5 minutes)

curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install -y nodejs
node --version   # Should show v18.x.x

Install PM2 to keep the bot running:

npm install -g pm2

Step 4: Download and install the bot (10 minutes)

After purchasing, transfer the bot zip to your server:

scp socialaiflow-bot.zip root@YOUR_SERVER_IP:/root/

Extract and install on the server:

cd /root
unzip socialaiflow-bot.zip
cd socialaiflow-bot
npm install

Step 5: Configure your triggers (10 minutes)

cp config.example.json config.json
nano config.json

You'll see a file like this — fill in your credentials and write your replies:

{
  "instagram": {
    "username": "your_username_here",
    "password": "your_password_here"
  },
  "triggers": [
    {
      "keyword": "price",
      "reply": "Hi! Our product is ₹1,299 with free shipping. Want details?"
    }
  ],
  "settings": {
    "reply_delay_min": 3,
    "reply_delay_max": 8
  }
}
Write your replies the way you actually talk. “Hi! Happy to help 😊” converts better than “Greetings. Your query has been received.” The bot is answering for you — make it sound like you.

Step 6: Start the bot (2 minutes)

pm2 start npm --name "socialaiflow" -- start
pm2 save
pm2 startup

Check it's running:

pm2 status

You should see socialaiflow with status online. Test it by sending your trigger keyword from a second Instagram account.

What to do in week one

  1. Monitor conversations daily for the first 3 days — you'll quickly find missing triggers to add.
  2. Add at least 10 keyword triggers covering your most common DM scenarios.
  3. Set up lead export (CSV) to keep records of everyone who messaged you.
  4. Test it from a second account once a day to make sure it's still running.