An enterprise-grade, fully automated Instagram SMM (Social Media Marketing) Panel and bot manager. Built on top of Django and Playwright, the system provides a robust dashboard UI to orchestrate accounts creation, solve CAPTCHAs, manage SMS verifications, maintain rotating proxy pools, and schedule engagement actions (follows, likes, and comments).
Designed with session cookie persistence, a database-backed task queue, dynamic credentials settings, and interactive live console streaming directly in the browser interface.
- β¨ Key Features
- ποΈ System Architecture
- π οΈ Tech Stack
- π Quick Start Guide
- βοΈ Configuration Parameters
- π Project Structure
- π Security & Best Practices
- π₯οΈ UI Overview
- π¦ Production Deployment
- π€ Contributing
- βοΈ License
- π₯οΈ Interactive Dashboard: Monitor key telemetry (active proxies, account health ratio, completed/running tasks) visually with Chart.js diagrams.
- πͺ Session State Persistence: Caches browser contexts and session cookies inside
session_cookies/to avoid repetitive sign-in queries and bypass Instagram verification check blocks. - β‘ DB-Backed Queue Worker: A multithreaded queue processor that handles browser automation in the background. Submit tasks via the UI and track live outputs.
- π Live Stream Console: Streams automated actions and Playwright process logs directly to a dark console container on the web page.
- π Smart Proxy Rotator: Scrape fresh proxy pools, verify connection speeds against Instagram endpoints, and rotate active IP configurations automatically.
- π€ Anti-Detection Design: Integrates human typing behavior (variable keystroke delay) and random User-Agent rotation.
- π Bulk CSV Manager: Import existing account details in bulk or download the complete system registration roster in a click.
graph TD
UI[Web UI / Templates] -->|Enqueue Jobs| DB[(SQLite / PostgreSQL)]
UI -->|Configure Settings| Settings[Dynamic Global Settings]
DB -->|Fetch Pending Tasks| Worker[Daemon Queue Worker]
Worker -->|Configure Context| Browser[Playwright Browser Launcher]
Browser -->|Use Scraped IPs| ProxyPool[Proxy Scraper / Tester]
Browser -->|Autofill Credentials| AccountCreator[Instagram account creator]
Browser -->|Follow / Like / Comment| SocialActions[Social Action Engine]
AccountCreator -->|Solve CAPTCHA| CapSolve[CapMonster / AntiCaptcha API]
AccountCreator -->|Retrieve SMS| SMS[5sim / SMS-Activate API]
AccountCreator -->|Verify Link| Email[1secmail API Inbox Polling]
Worker -->|Write Logs| DB
UI -->|Poll Logs API| DB
- Backend Framework: Django 5.x / 6.x
- Browser Automation: Playwright Python
- HTML Processing: BeautifulSoup4 & requests
- Frontend Design: Vanilla CSS (Responsive Flexbox/Grid layout with custom scrollbars)
- Visualizations: Chart.js
- Database: SQLite (Default) or PostgreSQL
- Python 3.10, 3.11, or 3.12
- SQLite3 (installed by default with Python)
- Firefox (
/usr/bin/firefoxpre-installed on Debian/Ubuntu environments)
-
Clone the Repository
git clone https://github.com/pain-hub/instagram_smm_panel.git cd instagram_smm_panel -
Install Dependencies It is recommended to use a virtual environment. Install packages using pip:
python3 -m pip install -r requirements.txt
(On Debian/Kali Linux systems enforcing PEP 668, append the
--break-system-packagesflag or run inside a configured venv). -
Initialize the Database Generate database schemas and apply the migration scripts:
python3 manage.py makemigrations panel python3 manage.py migrate
-
Launch the Panel Webserver Start the Django development server:
python3 manage.py runserver 127.0.0.1:8000
Access the dashboard at http://127.0.0.1:8000.
-
Launch the Background Worker Daemon To execute the browser automation tasks enqueued by the dashboard, launch the worker process in a separate terminal window:
python3 manage.py run_worker
Navigate to the Settings view in the sidebar to configure the dynamic parameters:
| Category | Parameter | Description |
|---|---|---|
| CAPTCHA | Solver Provider |
Select CapMonster or AntiCaptcha. |
API Secret Key |
API key from your solving provider dashboard. | |
| SMS | SMS Provider |
Select 5sim or SMS-Activate. |
API Auth Token |
Token to acquire and read verification phone numbers. | |
| Automation | Browser Engine |
Select Firefox (Default) or Chromium. |
Local Browser Path |
Absolute path (e.g. /usr/bin/firefox). Useful if Playwright downloads time out. |
|
Delay Range |
Set minimum and maximum delays (seconds) between human actions. | |
Headless Mode |
Enable to hide browser window during operations. |
instagram_smm_panel/
βββ smm_panel_project/ # Core configurations & root routing
β βββ settings.py # Cookies hardening, CSP, frame-ancestors
β βββ urls.py # Django base URLs
β βββ wsgi.py / asgi.py
β
βββ panel/ # SMM Panel app
β βββ models.py # Database tables (Proxy, Account, BotTask, Setting)
β βββ views.py # Controllers (Stats, CSV imports, Logs API)
β βββ forms.py # safe inputs validation forms
β βββ urls.py # App url routes
β βββ worker.py # Background thread pool queue runner
β β
β βββ management/commands/
β β βββ run_worker.py # CLI daemon command (run_worker)
β β
β βββ templates/panel/ # Dashboard HTML Templates
β β βββ base.html # Left Sidebar layouts
β β βββ dashboard.html # Chart widgets
β β βββ accounts.html # Profile grids & bulk uploads
β β βββ proxies.html # Scrapers & speed testers
β β βββ targets.html # Target list (follow/like targets)
β β βββ tasks.html # Job submission dispatchers
β β βββ task_detail.html # Live streaming console log
β β βββ settings.html # Credentials management forms
β β
β βββ bot_logic/ # Automation modules (Refactored)
β βββ browser.py # Playwright browser setups
β βββ human_behavior.py # keystroke human behaviors
β βββ account_creator.py # signup automation sequence
β βββ social_actions.py # Follow, Like, and Comment controls
β βββ captcha_solver.py # CapMonster API solvers
β βββ sms_handler.py # 5sim endpoint integrations
β βββ email_verifier.py # 1secmail inbox polling
β βββ proxy_scraper.py # Scraping sslproxies.org
β βββ helper.py # Unique credentials helpers
β
βββ static/css/
β βββ styles.css # Custom responsive styling
βββ requirements.txt # Project dependencies listThis setup has been developed strictly adhering to secure coding guidelines:
- Framework Auto-Escaping: All template variables are escaped by default to mitigate Cross-Site Scripting (XSS).
- Safe Session Management: Session and CSRF cookies are set to
HttpOnlywith strictSameSite=Laxparameters to prevent token theft and clickjacking. - Prepared Queries: The project avoids string formatting queries, leveraging Django's database ORM parameterization to prevent SQL injection.
- Resource Cleanup: Browser context sessions, pages, and playwright instances are closed in nested
try...finallyscopes to ensure memory is freed up correctly.
For production deployments:
- Turn off debug mode in
settings.pyor set the env varDJANGO_DEBUG=False. - Generate a secure secret key and set it inside
DJANGO_SECRET_KEYenvironment variable. - Configure
ALLOWED_HOSTSto match your domain name. - Run the Django app using Gunicorn:
gunicorn smm_panel_project.wsgi:application --bind 127.0.0.1:8000
- Set up a systemd daemon service for the background worker (
run_worker).
We welcome pull requests! Feel free to:
- Fork this Repository.
- Create a feature branch (
git checkout -b feature/NewAwesomeFeature). - Commit your changes (
git commit -m 'Add some NewAwesomeFeature'). - Push to the branch (
git push origin feature/NewAwesomeFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.