Docker Simple Panel is a sleek web application that provides a REST API and intuitive UI for managing Docker containers. Built with a Go backend and Svelte frontend, it offers authentication, real-time monitoring, and comprehensive container operations.
| Feature | Description |
|---|---|
| π Authentication | Single-user JWT-based authentication with configurable session timeout |
| π¦ Container Management | List, start, stop, restart containers with health status |
| π Real-time Logs | WebSocket-powered log streaming with 30-minute history |
| πΎ Volume Management | View and manage Docker volumes with container associations |
| π± PWA Support | Install on iPhone, Android, and desktop with offline capabilities |
| βοΈ Configuration | YAML-based config with web UI updates |
| π³ Docker Integration | Direct Docker daemon access via socket |
- Go 1.21+ (for building from source)
- Docker daemon running
- Node.js 18+ (for frontend development)
The easiest way to run Docker Simple Panel is using the pre-built Docker image:
# Pull the latest image
docker pull ghcr.io/dev-zapi/docker-simple-panel:latest
# Run the container
docker run -d \
--name docker-simple-panel \
-p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./data:/app/data \
ghcr.io/dev-zapi/docker-simple-panel:latest
# Verify it's running
curl http://localhost:8080/api/health| Username | Password |
|---|---|
admin |
changeme |
β οΈ Important: Change the default password immediately! Edit/app/data/config.yamlinside the container.
- π‘οΈ Mount Docker socket only when necessary
- π Change default password on first use
- π Set a strong
JWT_SECRETin production
Use VS Code Dev Containers for a consistent development environment:
# Prerequisites: VS Code + Docker Desktop + Dev Containers extension
# Open project β Press F1 β "Dev Containers: Reopen in Container"See .devcontainer/README.md for details.
# Clone repository
git clone https://github.com/dev-zapi/docker-simple-panel.git
cd docker-simple-panel
# Install dependencies
go mod download
# Build
go build -o docker-simple-panel .docker build -t docker-simple-panel:local .
docker run -d \
--name docker-simple-panel \
-p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./data:/app/data \
docker-simple-panel:localConfiguration is managed via YAML file (default: ./config.yaml or CONFIG_PATH env var).
# Authentication
username: admin
password: changeme # Auto-hashed with bcrypt
# Server settings
server:
port: "8080"
jwt_secret: "your-secret-key-change-in-production"
session_max_timeout: 24 # hours
# Docker settings
docker:
socket: "/var/run/docker.sock"
volume_explorer_image: "ghcr.io/dev-zapi/docker-simple-panel:latest"
# Logging
logging:
level: "info" # error, warn, info, debug
# Static files (optional)
static_path: ""| Variable | Default | Description |
|---|---|---|
CONFIG_PATH |
./config.yaml |
Path to YAML config file |
STATIC_PATH |
(empty) | Frontend static files directory |
SERVER_PORT |
8080 |
Server port |
JWT_SECRET |
(required in prod) | JWT signing secret |
DOCKER_SOCKET |
/var/run/docker.sock |
Docker socket path |
DISABLE_REGISTRATION |
false |
Disable user registration |
LOG_LEVEL |
info |
Logging level |
VOLUME_EXPLORER_IMAGE |
(see above) | Volume explorer Docker image |
- First startup: Creates default config with
admin/changeme - Password auto-hashed with bcrypt on save
- Change via web UI Settings page or edit config file
- Critical: Always change default password in production!
# Default (uses ./config.yaml)
./docker-simple-panel
# Custom config
CONFIG_PATH=/path/to/config.yaml ./docker-simple-panel
# With static files
STATIC_PATH=/path/to/frontend/dist ./docker-simple-panelFull OpenAPI v3 specification available at GET /api/openapi.json. Import into Swagger UI for interactive documentation!
GET /api/healthPOST /api/auth/login
Content-Type: application/json
{
"username": "admin",
"password": "changeme"
}Response:
{
"success": true,
"message": "Login successful",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"username": "admin"
}
}Include header: Authorization: Bearer <token>
GET /api/containersReturns all containers with status and health info.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/containers/{id} |
Get container details |
POST |
/api/containers/{id}/start |
Start container |
POST |
/api/containers/{id}/stop |
Stop container |
POST |
/api/containers/{id}/restart |
Restart container |
GET |
/api/containers/{id}/logs/stream |
WebSocket log stream |
GET /api/containers/{id}/logs/streamReal-time log streaming with:
- β JWT authentication (header or query param)
- β 30-minute history
- β Timestamps included
- β stdout + stderr support
Example:
const ws = new WebSocket(
`ws://localhost:8080/api/containers/${containerId}/logs/stream`,
[],
{ headers: { Authorization: `Bearer ${token}` } }
);
ws.onmessage = (event) => {
console.log(event.data);
};GET /api/docker/health| Method | Endpoint | Description |
|---|---|---|
GET |
/api/volumes |
List volumes with containers |
DELETE |
/api/volumes/{name} |
Delete volume |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/config |
Get current config |
PUT |
/api/config |
Update config |
Update Example:
PUT /api/config
Content-Type: application/json
{
"docker_socket": "/custom/path/docker.sock",
"log_level": "debug",
"session_max_timeout": 48
}- π Bcrypt password hashing
- β° JWT tokens expire (default: 24h)
- π« Single-user authentication only
β οΈ Docker socket access grants full control- π Must change default password & JWT secret in production
go test ./....
βββ main.go # Entry point
βββ config/ # YAML config management
βββ database/ # SQLite operations
βββ docker/ # Docker client wrapper
βββ handlers/ # HTTP handlers
βββ middleware/ # Auth, CORS, logging
βββ models/ # Data models
βββ webui/ # Svelte frontend
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ services/
β β βββ stores/
β βββ package.json
βββ openapi.json # API specification
- Go to Actions tab
- Select "Build and Push Docker Image"
- Click "Run workflow"
- Optionally specify custom tag
- Builds multi-platform (amd64, arm64)
See .github/workflows/README.md for details.
MIT License - See LICENSE file for details.
Built with β€οΈ using Go and Svelte
Report Issue β’ Request Feature β’ Discussions