Install
npx skillscat add eltmon/overdeck/pan-down Install via the SkillsCat registry.
Stop Overdeck Services
Overview
This skill guides you through gracefully stopping all Overdeck services, including the dashboard, API server, Traefik, and optionally workspace containers.
When to Use
- User wants to stop Overdeck services
- User needs to free up ports 3001/3002
- User wants to restart services (stop then start)
- System is shutting down or rebooting
- User asks "how do I stop overdeck?"
What Gets Stopped
When you run pan down, the following services stop:
- Dashboard Frontend (port 3001)
- API Server (port 3002)
- Traefik (if enabled)
- Workspace Containers (optional)
Basic Usage
# Stop all Overdeck services
pan down
# Stop dashboard and Traefik
pan down
# Stop dashboard but keep Traefik running
pan down --skip-traefikStep-by-Step Workflow
Step 1: Check What's Running
Before stopping, see what's currently running:
# Check Overdeck status
pan status
# Check running agents
pan status
# Check dashboard and API processes
ps aux | grep overdeck
lsof -i :3001
lsof -i :3002Step 2: Save Any Pending Work
If agents are running, consider what to do with them:
# Check for agents
pan status
# Option 1: Let them finish
# Wait for agents to complete their work
# Option 2: Send message to agents
pan tell <id> "Saving work before shutdown"
# Option 3: Stop agents explicitly
pan kill <id>Step 3: Stop Services
pan downWhat happens:
- Gracefully stops API server
- Gracefully stops dashboard frontend
- Stops Traefik (if enabled)
- Removes PID files
- Cleans up log handles
Expected output:
✓ Stopping API server (PID 12345)
✓ Stopping dashboard (PID 12346)
✓ Stopping Traefik (if enabled)
✓ Services stopped successfully
Use 'pan up' to restart servicesStep 4: Verify Services Stopped
# Check nothing is listening on ports
lsof -i :3001 # Should return nothing
lsof -i :3002 # Should return nothing
# Verify pan status shows no services
pan statusConfiguration Options
Edit ~/.overdeck.env to customize shutdown behavior:
# Graceful shutdown timeout (seconds)
SHUTDOWN_TIMEOUT=30
# Stop workspace containers on pan down
STOP_WORKSPACES_ON_DOWN=false
# Keep Traefik running even when dashboard stops
KEEP_TRAEFIK_RUNNING=falseAdvanced Usage
Stop Specific Services
# Stop only dashboard (keep API running)
# (No built-in command, use process management)
ps aux | grep "dashboard" | grep -v grep
kill <PID>
# Stop only API (keep dashboard running)
ps aux | grep "api-server" | grep -v grep
kill <PID>
# Stop only Traefik
docker-compose -f ~/.overdeck/traefik/docker-compose.yml downStop and Clean Up Workspaces
# Stop dashboard and Traefik
pan down
# Remove a workspace separately when needed
pan workspace list
pan workspace destroy <id>
# Nuclear option: stop all Docker containers
docker stop $(docker ps -q)Force Stop
If services won't stop gracefully:
# Force kill all processes
pan down
# Or manually force kill
pkill -9 -f overdeck
pkill -9 -f "dashboard"
pkill -9 -f "api-server"Troubleshooting
Services won't stop
Problem: pan down completes but processes still running
Solutions:
# Check for orphaned processes
ps aux | grep overdeck | grep -v grep
# Force kill by PID
kill -9 <PID>
# Or kill all Node.js processes (careful!)
pkill -9 node
# Check for stuck Docker containers
docker ps
docker stop $(docker ps -q)Ports still in use after shutdown
Problem: lsof -i :3001 still shows process after pan down
Solutions:
# Find what's using the port
lsof -i :3001
# Kill the specific process
kill -9 <PID>
# Check for zombie processes
ps aux | grep "<defunct>"
# Restart Docker if containers are stuck
sudo systemctl restart docker # Linux
# Or restart Docker Desktop (macOS/Windows)Can't stop Traefik
Problem: Traefik container won't stop
Solutions:
# Check Traefik status
docker ps | grep traefik
# Stop Traefik directly
docker stop traefik
# Or use Docker Compose
cd ~/.overdeck/traefik/
docker-compose down
# Force remove if stuck
docker rm -f traefikAgent sessions remain after shutdown
Problem: tmux sessions still exist after pan down
Solutions:
# List tmux sessions
tmux list-sessions
# Kill specific agent session
tmux kill-session -t agent-<id>
# Kill all agent sessions
tmux list-sessions | grep agent | cut -d: -f1 | xargs -n1 tmux kill-session -t
# Or kill tmux server entirely
tmux kill-serverPID file exists but process doesn't
Problem: pan up fails saying services already running, but they're not
Solutions:
# Remove stale PID files
rm ~/.overdeck/pids/*.pid
# Clean up lock files
rm ~/.overdeck/locks/*.lock
# Try starting again
pan upRestart Workflow
To restart services:
# Method 1: Separate commands
pan down
sleep 2 # Give services time to fully stop
pan up
# Method 2: Restart command (if available)
pan restart
# Method 3: Explicit stop/start
pan down && pan upGraceful vs Forceful Shutdown
Graceful Shutdown (default)
pan downWhat happens:
- Sends SIGTERM to processes
- Waits for graceful shutdown (up to SHUTDOWN_TIMEOUT)
- Allows agents to save state
- Flushes logs to disk
- Closes database connections cleanly
When to use: Normal shutdown, routine maintenance
Hung Shutdown
pan down does not expose a force flag. If services hang, inspect the failing process and fix the underlying startup/shutdown problem instead of relying on a force-stop shortcut.
Cleanup After Shutdown
After stopping services, you may want to clean up:
# Clean up log files
rm ~/.overdeck/logs/*.log
# Clean up temporary files
rm -rf ~/.overdeck/tmp/*
# Clean up old workspaces (careful!)
pan workspace list
pan workspace destroy <id>
# Clean up Docker resources
docker system prune -fMonitoring Shutdown
Watch shutdown progress:
# Monitor in one terminal
watch -n 1 'lsof -i :3001; lsof -i :3002'
# Run shutdown in another terminal
pan downAuto-Shutdown
On System Shutdown (systemd)
If using systemd service, it will stop automatically on shutdown.
Manual Triggers
# Stop on user logout
# Add to ~/.bash_logout or ~/.zsh_logout
pan down
# Stop after idle timeout (using systemd timer)
# Create /etc/systemd/system/overdeck-idle.timerRecovery After Ungraceful Shutdown
If services were killed ungracefully (power loss, crash):
# Clean up stale resources
rm ~/.overdeck/pids/*.pid
rm ~/.overdeck/locks/*.lock
# Check for orphaned Docker containers
docker ps -a | grep overdeck
docker rm -f <container-id>
# Clean up tmux sessions
tmux kill-server
# Restart services
pan up
# Check health
pan doctorSafe Shutdown Checklist
Before shutting down:
- Check for running agents:
pan status - Save any pending work
- Stop or notify agents:
pan tell <id> "Shutting down" - Run graceful shutdown:
pan down - Verify ports are free:
lsof -i :3001 :3002 - Check no orphaned processes:
ps aux | grep overdeck - Verify tmux sessions stopped:
tmux list-sessions
Next Steps
After stopping services:
- Restart: Use
pan upto start again - Configuration: Edit
~/.overdeck.envwhile services are down - Updates: Run
pan updateto update Overdeck - Cleanup: Clean up logs and old workspaces
Related Skills
/pan-up- Start services/pan-status- Check running services and agents/pan-help- Command reference/session-health- Clean up stuck sessions
More Information
- Configuration:
~/.overdeck.env - Logs:
~/.overdeck/logs/ - PID files:
~/.overdeck/pids/ - Run
pan down --helpfor more options