Monitor and auto-manage your RunPod instances with a simple web interface.
1.0: JSON based file 2.0: Data Migration + Hooks + Data compaction for graphs 2.1: Attempt to fix hanging code on startup server 2.2: Beta Version of Better Memory Management 2.3: Data Clean Up for non-existing pods
For a portable version where the pod monitors itself (rather than organization-level monitoring), check out:
📁 Directory: ./self-contained/
Inside your RunPod pod terminal, run:
apt-get update && apt-get install -y tmux curl && curl -sSL https://raw.githubusercontent.com/justinwlin/Runpod-Idle-Pod-Monitor/refs/heads/main/self-contained/quick_install.sh -o /tmp/quick_install.sh && chmod +x /tmp/quick_install.sh && /tmp/quick_install.shThis command will:
- Install tmux for persistent session management
- Download and run the monitoring script
- Guide you through configuration (CPU/GPU/Memory thresholds)
- Start monitoring in a tmux session that survives SSH disconnections
- Automatically stop your pod when idle (optional)
- ✅ No external dependencies - runs entirely within your pod
- ✅ Survives SSH disconnections using tmux
- ✅ Monitor-only mode for testing thresholds
- ✅ Auto-stop mode to save money
- ✅ Simple threshold configuration
- ✅ Real-time resource monitoring
- Detach from monitor:
Ctrl+BthenD - Reattach to monitor:
tmux attach -t monitor - Check status:
cat /tmp/monitor_counter.json - View help:
cat /tmp/TMUX_HELP.md
See self-contained README for detailed instructions.
Runpod Image: https://console.runpod.io/deploy?template=xe00ihiurd&ref=p1oqnqy1
Make sure to select CPU pod and not GPU pod, when deploying for the template to show up.
IF YOU DEPLOY THIS ON RUNPOD MAKE SURE TO EXCLUDE THE POD YOU ARE RUNNING THIS ON FROM THE MONITORING. There is an "Monitoring" Button on the home page for the pod, which when you click it will switch it to the exclude list.
Recommended: Run this on the cheapest CPU Pod Newest version: Nov 5th 2025
docker.io/justinrunpod/runpodidlemonitor:5
Just click the Runpod image template, and start it on the lowest CPU pod.
That's it! 🎉 The RUNPOD_API_KEY environment variable is pre-configured.
git clone <repository>
cd RunpodMonitor
echo "RUNPOD_API_KEY=your_api_key_here" > .envpython server.pyhttp://localhost:8080
Main dashboard showing pod status, actions, and real-time monitoring
Auto-stop settings, thresholds, and exclusion management
Historical data, usage graphs, and filterable pod metrics
Example of a network storage pod in paused state - data preserved, can be resumed
On the home page, you'll see if something is excluded or not. Click the "Monitor" button or the "Exclude" button to switch it to actually shut off or to exclude it from monitoring.
# Build
docker build -t runpod-monitor .
# Run with API key from environment
docker run -d \
-p 8080:8080 \
-e RUNPOD_API_KEY=your_api_key_here \
-v $(pwd)/data:/app/data \
runpod-monitorThe server starts with sensible defaults. To customize:
- Use the web interface - Go to Config page for real-time changes. The changes get persisted to the file on the server, so you can turn the server on and off, as long the file is not destroyed.
- Environment variables -
RUNPOD_API_KEYis auto-configured on RunPod when you start a container is already in the env. But you can also set it manually locally by creating a .env file with the key.
Just use the Web UI for configurations since it will autopersist into whatever file, and will create a starting configuration file if it doesn't exist based off the yaml template.
- CPU/GPU/Memory thresholds - Set limits (e.g., ≤5% usage)
- Duration - How long conditions must persist (e.g., 45 minutes)
- No-change detection - Stop completely idle pods
- Exclude pods - Protect critical workloads
pip install uv
uv pip install .
python server.py

