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.
- β¨ Key Features
- ποΈ System Architecture
- π οΈ Tech Stack
- π Quick Start Guide
- βοΈ Configuration Parameters
- π Proxy Health & Handshake Ping System
- π Project Structure
- π Security & Concurrency Design
- π¦ Production Deployment & Systemd
- π€ Contributing
- βοΈ License
- π₯οΈ 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 = undefinedevasion. - π© 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.
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
- 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
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.
- 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)
-
Clone the Repository
git clone https://github.com/pain-hub/instagram_smm_panel.git cd instagram_smm_panel -
Create and Activate a Virtual Environment
python3 -m venv venv source venv/bin/activate -
Install Dependencies
pip install -r requirements.txt
-
Install Browser Engine (Optional if Google Chrome is installed)
playwright install chromium
-
Apply Database Migrations
python manage.py makemigrations panel python manage.py migrate
-
Start the Web Dashboard
python manage.py runserver 127.0.0.1:8000
Open http://127.0.0.1:8000 in your browser.
-
Launch the Dedicated Queue Worker (Optional Terminal)
python manage.py run_worker
:: 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:8000Verify that your environment, database, and browser launcher are operational:
python manage.py testExpected output:
System check identified no issues (0 silenced).
........
----------------------------------------------------------------------
Ran 8 tests in 3.973s
OK
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 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. |
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.comwith 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
BlockedandOfflineproxies 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.
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- Resource Leak Prevention: All browser contexts, pages, and Playwright instances are closed inside nested
try...finallyscopes to prevent zombie browser processes. - Safe Session Management: Session and CSRF cookies are set to
HttpOnlywith strictSameSite=Laxparameters 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.
For production servers (Debian/Ubuntu/RHEL):
-
Environment Setup
export DJANGO_DEBUG=False export DJANGO_SECRET_KEY="your-secure-random-secret-key" export ALLOWED_HOSTS="yourdomain.com,127.0.0.1"
-
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
-
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
-
Enable and Start Services
sudo systemctl daemon-reload sudo systemctl enable --now smm_web smm_worker
Contributions, bug reports, and suggestions are welcome!
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/NewFeature). - Commit your Changes (
git commit -m 'Add NewFeature'). - Push to the Branch (
git push origin feature/NewFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more details.