Skip to content

About

πŸ”₯ Fully automated Instagram bot that creates accounts, solves captchas, verifies with email/SMS, and performs actions like follow, like, and comment. Supports proxy rotation, headless mode, and one-click setup. Built for devs, testers, and bot researchers. Plug it in and let the matrix do the work.

Topics

Resources

Stars

21 stars

Watchers

3 watching

Forks

Repository files navigation

Instagram SMM Panel

Python Versions Django Versions Playwright Docker Ready Tests MIT License

An enterprise-grade, fully automated Instagram Social Media Marketing (SMM) Panel and bot management system. Engineered with Django and Playwright, the panel provides an interactive dashboard interface to orchestrate automated account registration, solve CAPTCHAs, verify SMS numbers, maintain live-monitored rotating proxy pools, and automate engagement actions (Follows, Likes, and Comments).

Features session cookie persistence, atomic queue processing, live console streaming, anti-bot detection evasion, and an Instagram-specific proxy health analyzer.


πŸ“– Table of Contents


✨ Key Features

  • πŸ–₯️ Real-Time Telemetry Dashboard: Monitor account health metrics, active rotating proxies, and task queue distributions with Chart.js data visualizations.
  • ⚑ Atomic DB-Backed Queue Worker: Multithreaded background queue with atomic task claiming (UPDATE ... WHERE status='pending'), completely preventing double-dispatch race conditions and SQLite database lockups.
  • 🌐 Instagram Handshake Proxy Checker: Live latency measurement and anti-ban classifier (Clean / Fast, Slow Response, IG Blocked, Offline). The queue worker automatically filters out blacklisted IPs to protect accounts.
  • πŸ€– Anti-Detection Stealth Engine: Automated Chromium/Chrome engine with human-simulated typing speeds, randomized User-Agents, mobile device viewport emulation, and navigator.webdriver = undefined evasion.
  • πŸ“© Resilient Email & SMS Verification: Integrated with Mail.tm REST API with automatic fallback, dual extraction of verification links and 6-digit confirmation codes, paired with 5sim / SMS-Activate phone dispatchers.
  • πŸͺ Session Cookie Persistence: Caches browser storage states in session_cookies/ to preserve sessions, eliminate repetitive logins, and bypass checkpoint intercepts.
  • πŸ“ Live Stream Console: Streams automated Playwright execution logs directly to an in-browser streaming terminal container.
  • πŸ“‚ Bulk Data Management: Import existing accounts in bulk via CSV or export your entire roster in a single click.

πŸ—οΈ System Architecture

graph TD
    UI[Web UI Dashboard] -->|Enqueue Jobs| DB[(SQLite / PostgreSQL)]
    UI -->|Adjust Credentials| Settings[Global Settings Store]
    UI -->|Manual Ping| ProxyChecker[Proxy Latency & Health Engine]
    
    DB -->|Atomic Claim| Worker[Background Queue Worker Daemon]
    
    Worker -->|Configure Context| Browser[Playwright Stealth Engine]
    Browser -->|Rotate Filtered IPs| ProxyPool[(Active Clean Proxies)]
    Browser -->|Autofill Credentials| AccountCreator[Registration Flow]
    Browser -->|Follow / Like / Comment| SocialActions[Social Action Engine]
    
    AccountCreator -->|Solve ReCAPTCHA| CapSolve[CapMonster / AntiCaptcha API]
    AccountCreator -->|Fetch SMS Code| SMS[5sim / SMS-Activate API]
    AccountCreator -->|Poll Code / Link| Email[Mail.tm REST Inbox]
    
    Worker -->|Stream Execution Logs| DB
    UI -->|Polling Telemetry| DB
Loading

πŸ› οΈ Tech Stack

  • Backend: Django 5.x / Python 3.10 - 3.13+
  • Browser Automation: Playwright Python (Chromium / Google Chrome with stealth flags)
  • HTTP & Scraping: requests, beautifulsoup4
  • Database: SQLite (Development) / PostgreSQL (Production)
  • Frontend UI: Vanilla Responsive CSS (white-mode palette), Chart.js
  • Worker Execution: Concurrent ThreadPool & Daemon Subprocess

πŸš€ Quick Start Guide

🐳 1-Click Docker Deployment (Recommended)

Run the entire application (Web Dashboard + Playwright Background Worker) with a single command without worrying about Python versions, system libraries, or browser dependencies:

# 1. Clone the repository
git clone https://github.com/pain-hub/instagram_smm_panel.git
cd instagram_smm_panel

# 2. Build and run containers in detached mode
docker compose up -d --build
  • Dashboard: Open http://localhost:8000
  • View Real-Time Logs: docker compose logs -f
  • Stop Containers: docker compose down

Tip

The Docker configuration automatically mounts ./db.sqlite3, ./session_cookies, and ./logs into the container, guaranteeing full data persistence across container updates and restarts.


Prerequisites

  • Python 3.10, 3.11, 3.12, or 3.13
  • SQLite3 (installed by default with Python)
  • Google Chrome or Chromium (auto-detected or installed via Playwright)

Installation (Linux / macOS)

  1. Clone the Repository

    git clone https://github.com/pain-hub/instagram_smm_panel.git
    cd instagram_smm_panel
  2. Create and Activate a Virtual Environment

    python3 -m venv venv
    source venv/bin/activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Install Browser Engine (Optional if Google Chrome is installed)

    playwright install chromium
  5. Apply Database Migrations

    python manage.py makemigrations panel
    python manage.py migrate
  6. Start the Web Dashboard

    python manage.py runserver 127.0.0.1:8000

    Open http://127.0.0.1:8000 in your browser.

  7. Launch the Dedicated Queue Worker (Optional Terminal)

    python manage.py run_worker

Installation (Windows)

:: 1. Navigate to directory
cd Instagram_smm_panel

:: 2. Initialize Virtual Environment
python -m venv venv
venv\Scripts\activate

:: 3. Install packages
pip install -r requirements.txt

:: 4. Install Playwright binaries
playwright install chromium

:: 5. Initialize Database
python manage.py makemigrations panel
python manage.py migrate

:: 6. Launch Server
python manage.py runserver 127.0.0.1:8000

Automated Tests

Verify that your environment, database, and browser launcher are operational:

python manage.py test

Expected output:

System check identified no issues (0 silenced).
........
----------------------------------------------------------------------
Ran 8 tests in 3.973s

OK

βš™οΈ Configuration Parameters

Access the Settings view in the sidebar to configure runtime parameters:

Category Parameter Default Description
Automation Browser Engine chromium Chromium / Google Chrome (Recommended). High stability and anti-detection.
Local Browser Path (Empty) Leave blank for auto-discovery (/usr/bin/google-chrome, system Chromium).
Headless Mode True Run headless for background efficiency or False to watch automation live.
Delay Range 2 to 6 sec Randomized delay range between keystrokes and button clicks.
Email Email Provider mailtm Mail.tm (Recommended) or 1secmail.
CAPTCHA Solver Provider capmonster Select CapMonster or AntiCaptcha.
API Secret Key (Custom) Provider API key.
SMS SMS Provider 5sim Select 5sim or SMS-Activate.
API Auth Token (Custom) Bearer authorization token for phone procurement.
Proxies Rotate Proxies True Automatically rotate active clean proxies on each automation job.

🌐 Proxy Health & Handshake Ping System

Instagram blocks datacenter IPs and unverified public proxies aggressively. The panel includes a dedicated handshake testing engine:

  • Live Latency Benchmark: Tests each proxy against https://www.instagram.com with real mobile headers.
  • Auto-Classification:
    • 🟒 Clean / Fast: Latency < 2.5s, HTTP 200, no challenge prompts.
    • 🟑 Slow Response: Response time >= 2.5s.
    • πŸ”΄ IG Blocked: Instagram HTTP 429 (Rate-limited), 403 (Forbidden), or IP challenge intercept.
    • βšͺ Offline: Connection timed out or proxy tunnel refused.
  • Smart Filtering: The task queue skips Blocked and Offline proxies automatically, ensuring tasks only execute over healthy IPs.
  • Single & Batch Testing: Click Ping next to any proxy, or use Ping & Verify All Proxies for parallel multi-threaded testing.

πŸ“‚ Project Structure

instagram_smm_panel/
β”œβ”€β”€ smm_panel_project/               # Core Django configuration
β”‚   β”œβ”€β”€ settings.py                  # Cookies hardening, SQLite timeout, CSP
β”‚   β”œβ”€β”€ urls.py                      # Root URL routing
β”‚   └── wsgi.py / asgi.py
β”‚
β”œβ”€β”€ panel/                           # SMM Panel Application
β”‚   β”œβ”€β”€ models.py                    # Schema (Proxy, InstagramAccount, BotTask, GlobalSetting)
β”‚   β”œβ”€β”€ views.py                     # View logic (Stats, CSV imports, Proxy checks, Logs API)
β”‚   β”œβ”€β”€ forms.py                     # Form definitions with safe input validation
β”‚   β”œβ”€β”€ urls.py                      # App routes
β”‚   β”œβ”€β”€ worker.py                    # Background queue worker with atomic locking
β”‚   β”œβ”€β”€ tests.py                     # Automated unit and integration test suite
β”‚   β”‚
β”‚   β”œβ”€β”€ management/commands/
β”‚   β”‚   └── run_worker.py            # CLI daemon command (manage.py run_worker)
β”‚   β”‚
β”‚   β”œβ”€β”€ templates/panel/             # Dashboard HTML Templates
β”‚   β”‚   β”œβ”€β”€ base.html                # Sidebar layouts and flash alerts
β”‚   β”‚   β”œβ”€β”€ dashboard.html           # Chart.js metrics
β”‚   β”‚   β”œβ”€β”€ accounts.html            # Profile grids & CSV bulk tools
β”‚   β”‚   β”œβ”€β”€ proxies.html             # Proxy health table, ping actions, scraper
β”‚   β”‚   β”œβ”€β”€ targets.html             # Engagement targets manager
β”‚   β”‚   β”œβ”€β”€ tasks.html               # Job submission dispatcher
β”‚   β”‚   β”œβ”€β”€ task_detail.html         # Live streaming console log
β”‚   β”‚   └── settings.html            # Dynamic credentials manager
β”‚   β”‚
β”‚   └── bot_logic/                   # Automation Modules
β”‚       β”œβ”€β”€ browser.py               # Playwright browser launcher with stealth & fallback
β”‚       β”œβ”€β”€ human_behavior.py        # Keystroke typing simulation & randomized waits
β”‚       β”œβ”€β”€ account_creator.py       # Registration sequence with code/link handling
β”‚       β”œβ”€β”€ social_actions.py        # Follow, Like, and Comment controls
β”‚       β”œβ”€β”€ proxy_scraper.py         # Scraping sslproxies.org & parallel health checker
β”‚       β”œβ”€β”€ email_verifier.py        # Mail.tm REST inbox verification
β”‚       β”œβ”€β”€ sms_handler.py           # 5sim / SMS-Activate API handler
β”‚       β”œβ”€β”€ captcha_solver.py        # CapMonster ReCAPTCHA solver
β”‚       └── helper.py                # Unique credentials helpers
β”‚
β”œβ”€β”€ static/css/
β”‚   └── styles.css                   # Responsive white-mode theme styles
β”œβ”€β”€ instruction.md                   # Complete local setup & troubleshooting guide
└── requirements.txt                 # Pinned dependencies

πŸ”’ Security & Concurrency Design

  • Resource Leak Prevention: All browser contexts, pages, and Playwright instances are closed inside nested try...finally scopes to prevent zombie browser processes.
  • Safe Session Management: Session and CSRF cookies are set to HttpOnly with strict SameSite=Lax parameters to prevent token theft and clickjacking.
  • Prepared SQL Queries: Leverages Django's ORM parameterization to eliminate SQL injection risks.
  • Atomic Queue Claiming: Eliminates worker race conditions and table contention using atomic SQL updates.

πŸ“¦ Production Deployment & Systemd

For production servers (Debian/Ubuntu/RHEL):

  1. Environment Setup

    export DJANGO_DEBUG=False
    export DJANGO_SECRET_KEY="your-secure-random-secret-key"
    export ALLOWED_HOSTS="yourdomain.com,127.0.0.1"
  2. Web Server Service (/etc/systemd/system/smm_web.service)

    [Unit]
    Description=Instagram SMM Panel Web Dashboard
    After=network.target
    
    [Service]
    User=www-data
    WorkingDirectory=/var/www/instagram_smm_panel
    ExecStart=/var/www/instagram_smm_panel/venv/bin/gunicorn smm_panel_project.wsgi:application --bind 127.0.0.1:8000 --workers 3
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
  3. Background Worker Service (/etc/systemd/system/smm_worker.service)

    [Unit]
    Description=Instagram SMM Panel Task Worker
    After=network.target
    
    [Service]
    User=www-data
    WorkingDirectory=/var/www/instagram_smm_panel
    ExecStart=/var/www/instagram_smm_panel/venv/bin/python manage.py run_worker
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
  4. Enable and Start Services

    sudo systemctl daemon-reload
    sudo systemctl enable --now smm_web smm_worker

🀝 Contributing

Contributions, bug reports, and suggestions are welcome!

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/NewFeature).
  3. Commit your Changes (git commit -m 'Add NewFeature').
  4. Push to the Branch (git push origin feature/NewFeature).
  5. Open a Pull Request.

βš–οΈ License

Distributed under the MIT License. See LICENSE for more details.

About

πŸ”₯ Fully automated Instagram bot that creates accounts, solves captchas, verifies with email/SMS, and performs actions like follow, like, and comment. Supports proxy rotation, headless mode, and one-click setup. Built for devs, testers, and bot researchers. Plug it in and let the matrix do the work.

Topics

Resources

Stars

21 stars

Watchers

3 watching

Forks

Sponsor this project

Contributors

Languages