View Modes¶
Examples on this page use the PyPI command instagram_monitor. If you chose another installation, replace that command with the matching command prefix. Keep all targets and options after the prefix.
Choose one of three ways to view monitoring activity:
- Traditional Text Mode: Standard CLI output, best for logging and background processes.
- Terminal Dashboard: A rich, interactive terminal interface with real-time stats.
- Web Dashboard: A modern web interface accessible via your browser.
Traditional Text Mode¶
Text mode is the default. It works in any terminal and is well suited to background processes.
- Every event is printed with a timestamp.
- Earlier events remain available in terminal scrollback and log files.
- It uses fewer terminal features than either dashboard.
Terminal Dashboard¶
The Terminal Dashboard updates status, statistics and recent events in one terminal screen. It requires the rich library, which is included in normal installations.
Enable it with --dashboard or DASHBOARD_ENABLED = True.
Key Features:
- Visual Analytics: Real-time display of tracked targets with number of followers, followings, posts, visibility and story status.
- Live Activity Log: A scrolling view of the last few events.
- Interactive Toggles: Press 'm' to switch between 'User' and 'Config' views instantly.
- Remote Control: Start, stop or recheck monitoring for all targets directly from the terminal.
- Uptime & Status: Clean header showing tool version, status and total runtime.
Keyboard Shortcuts:
- 'm': Toggle dashboard view (User/Config)
- 's': Start All monitoring
- 'x': Stop All monitoring
- 'r': Recheck All targets
- 'q': Exit the tool
- 'h': Show help (lists commands in the activity log)
Web Dashboard¶
The Web Dashboard runs a small web server on your computer. By default, open http://127.0.0.1:8000/ in a browser on the same computer. The 127.0.0.1 address is local, so other devices cannot connect unless you change the server and Docker settings.
The dashboard is intentionally designed for loopback use without a login screen. Keep the host port bound to 127.0.0.1 and do not expose it through a public reverse proxy. Dashboard media links can access only files registered by the running monitor. Post, story and media links that come from Instagram are limited to http and https and escaped before they are displayed, so page content cannot run scripts in the dashboard. Thumbnails are shown only when the monitor has already saved the image locally, so opening the dashboard never makes your browser fetch anything from Instagram's servers. An item whose download failed shows a placeholder instead. Saved webhook and proxy URLs are shown as configured without returning their private values to the browser. Enter a new URL only when you want to replace the saved value.
Request Protection¶
Because there is no login, the dashboard protects itself by checking who is asking rather than who is logged in. Two rules apply to every request:
- Accepted addresses. The server answers only requests addressed to
127.0.0.1,localhost,::1or the configuredWEB_DASHBOARD_HOST. Anything else gets HTTP 403. This stops DNS rebinding, where a web page you visit points its own domain at127.0.0.1so the browser reaches your dashboard for it. Binding to the loopback interface alone does not stop that attack, because the request arrives from your own browser. Add a name toWEB_DASHBOARD_ALLOWED_HOSTSwhen you deliberately reach the dashboard under another address. - Same-origin changes only. Anything that changes state (adding targets, starting or stopping monitoring, saving settings, sending test notifications, clearing the activity log) must come from the dashboard page itself and carry
Content-Type: application/json. A request that another website triggers in your browser is rejected with HTTP 403, and a request without a JSON body is rejected with HTTP 415. Without this, any page you happened to have open could stop your monitoring or force extra Instagram polling.
Scripting the API yourself still works: send Content-Type: application/json and address the server as 127.0.0.1.
Settings updates are validated as one operation before live values change. Malformed booleans, non-integer numeric fields, reversed hour ranges, invalid ports and unsafe URLs return an error without applying the rest of the payload. Polling intervals accepted by the dashboard range from 300 to 86400 seconds. Two fields are deliberately narrow:
- CSV file name. The dashboard names the CSV file but never chooses its location, so a value containing a path is rejected. An absolute path set through
CSV_FILEor-bkeeps working and still round-trips through the form unchanged. - SMTP password. A saved password belongs to the server it was entered for. Changing
SMTP_HOSTorSMTP_PORTwithout typing the password again clears it, so the tool never offers your credential to a different mail server. Re-enter the password in the same save to keep email working. - ntfy access token.
NTFY_ACCESS_TOKENis sent as a bearer credential to whateverWEBHOOK_URLpoints at, so pointing the webhook at a different server clears it. Changing only the topic on the same server keeps it. Set the token again in your dotenv file and reload it withSIGHUP, or restart the tool.
In a container the server must bind to 0.0.0.0 so Docker can forward traffic. That value means every container network interface. It is not a browser destination. Use the published host address http://127.0.0.1:8000/ instead.
Key Features:
- Full Control Panel: Add or remove monitoring targets directly from the browser.
- Visual Analytics: Real-time display of tracked targets with number of followers, followings, posts, visibility and story status.
- Live Activity Log: A scrolling view of the last few events.
- Manual Trigger: A "Recheck" button to force an immediate update for specific or all users.
- Remote Management: Start or stop monitoring for specific or all targets with a single click.
- Synchronization: Saved setting and session changes wake active monitors then rebuild their monitoring context before the next check.
- Dynamic Configuration: Configure sessions and settings without touching the terminal or config files.
- Saved Targets: Targets added or removed in the browser live in memory only until you press Generate Config on the Settings page. That writes the current settings and the current target list to
TARGET_USERNAMESin a.conffile created in the working directory the tool was started from, and the toast reports the full path it wrote. Start the tool with--config-filepointing at that file to keep the targets across restarts.
Enable it with --web-dashboard or WEB_DASHBOARD_ENABLED = True.
Flexible Usage:
- Standard Monitoring: Provide targets on the CLI and the dashboard acts as a live mirror and remote management interface.
- Control Panel Mode: Start the tool with only the
--web-dashboardflag (no initial targets). The script will wait for you to add users through the browser.
# Starting with initial targets
instagram_monitor target1 target2 --web-dashboard
# Starting as a pure control panel
instagram_monitor --web-dashboard
The Web Dashboard requires flask, which is included in normal installations. If it is missing, Instagram Monitor disables the dashboard but keeps console monitoring active.
Docker Compose exposes the default dashboard only at 127.0.0.1 on the host. Use docker compose up --no-log-prefix if setup enabled the Web Dashboard. For a one-off Compose command, add --service-ports. A plain docker compose run --rm starts the server but does not publish the service port:
Compose declares its host port even when the saved configuration disables the Web Dashboard. If port 8000 is already used and you do not need the dashboard, use the plain docker compose run --rm instagram_monitor ... form without --service-ports.
For a custom dashboard port, set the same port in instagram_monitor.conf and in the project .env used by Compose:
The Compose mapping then becomes 127.0.0.1:9000:9000. One-off commands printed by the tool use an explicit matching -p mapping for nondefault ports.
For direct Docker, add -p 127.0.0.1:8000:8000 before the image name. Replace both occurrences of 8000 when WEB_DASHBOARD_PORT uses another value. The complete mount and port forms are under Monitoring Mode.
Dashboard View Modes¶
Both dashboards offer two views:
-
User Mode (
user):- Simple, minimal interface.
- Focuses on core stats and latest activity.
- Ideal for "always-on" monitoring.
-
Config Mode (
config):- Detailed view showing all internal settings.
- Displays User Agent strings, Hour Ranges, Jitter status and more.
- Useful for auditing your setup and verifying configuration.
Switch views with the 'm' key in the Terminal Dashboard or the view button in the Web Dashboard.