Overview
The local development environment uses a simplified HTTP-only setup without SSL/TLS certificates. This configuration is perfect for testing and development on your local machine.The stack uses a production-first approach. The base
docker-compose.yml is production-ready, and local development uses an override file to simplify the configuration.Prerequisites
- Docker and Docker Compose installed
- At least 2GB of available RAM
- 5GB of free disk space
Quick Start
Create Development Override
Copy the example override file to enable local development mode:This override file makes the following changes:
The
docker-compose.override.yml file is gitignored and won’t be committed to version control.- Uses
nginx.dev.confinstead ofnginx.conf(no SSL) - Exposes HTTP on port 8000 instead of 80/443
- Disables the certbot service (not needed for dev)
Configure Environment Variables
Copy the environment template and configure for local development:Set these values for development:
.env
Start the Stack
Start all services using Docker Compose:Check the status of all services:View logs to ensure everything is running:
Access Points
Once the stack is running, you can access the following services:| Service | URL | Description |
|---|---|---|
| Headscale API | http://localhost:8000 | Main API endpoint |
| Headplane UI | http://localhost:3001/admin/ | Web management interface |
| Health Check | http://localhost:8000/health | Service health status |
| Metrics | http://localhost:9090/metrics | Prometheus metrics (localhost only) |
The Headplane UI requires a trailing slash:
http://localhost:3001/admin/Initial Configuration
Generate API Key
Create an API key for Headplane and CLI access:.env file:
Generate Cookie Secret
Create a random cookie secret for Headplane sessions:.env file:
Restart Headplane
Restart Headplane to apply the new configuration:Development Workflow
Managing Services
- Start/Stop
- View Logs
- Helper Scripts
Create Your First User
Create a user for managing devices:Generate Pre-Auth Keys
Create a reusable pre-auth key for connecting devices:Save the generated key - you’ll need it to connect devices to your Headscale server.
Connecting a Device
Connect a device to your local Headscale server:- Linux/macOS
- Windows
- Docker Container
Configuration Files
Docker Compose Override
Thedocker-compose.override.yml file contains development-specific settings:
docker-compose.override.yml
nginx Development Config
Key differences innginx.dev.conf:
- Listens on port 8080 (HTTP only)
- No SSL/TLS configuration
- Simplified security headers
- No rate limiting for easier testing
- Direct proxy to Headscale on port 8080
Troubleshooting
Port Already in Use
If port 8000 is already in use:nginx Won’t Start
Test the nginx configuration:Headscale Connection Issues
Check if Headscale is running:Database Password Mismatch
If you see database connection errors, verify the passwords match:Headplane Won’t Load
Common issues:- Missing API Key: Generate an API key and add it to
.env - Wrong URL: Access
http://localhost:3001/admin/with trailing slash - Cookie Secret Length: Must be exactly 32 characters
Cleanup
Stop and Remove All Services
Reset to Clean State
Next Steps
Production Deployment
Deploy to production with SSL/TLS
Docker Compose Reference
Learn about all Docker Compose services
