Docker Deployment
Docker Compose is the recommended way to deploy EasyShell. All services (Server, Web, MySQL, Redis) are fully containerized — pre-built images are automatically published to Docker Hub and GHCR via GitHub Actions.
Prerequisites
Section titled “Prerequisites”- Docker 24.0 or later
- Docker Compose v2 (included with Docker Desktop)
- At least 4 GB RAM for the full stack
- 10 GB free disk space
Verify your installation:
docker --versiondocker compose versionQuick Deploy
Section titled “Quick Deploy”git clone https://github.com/easyshell-ai/easyshell.gitcd easyshellcp .env.example .env # Edit if neededdocker compose up -dNo local build required — pre-built images are pulled automatically from Docker Hub.
Open http://localhost:18880 → login with easyshell / easyshell@changeme.
Service Architecture
Section titled “Service Architecture”docker-compose.yml defines all four services:
| Service | Image | Port | Description |
|---|---|---|---|
| easyshell-server | laolupaojiao/easyshell-server:latest | 18080 | Java Spring Boot backend + built-in Agent binaries |
| easyshell-web | laolupaojiao/easyshell-web:latest | 18880 | React frontend (served by Nginx) |
| easyshell-mysql | mysql:8.0 | 13306 | Database |
| easyshell-redis | redis:7-alpine | 16379 | Cache |
Service dependencies: web → server → mysql + redis. Docker Compose uses health checks to ensure correct startup order.
Environment Configuration
Section titled “Environment Configuration”.env.example contains all configurable options. Copy it to .env and modify:
# MySQLMYSQL_PASSWORD=18923ce29fdab04eMYSQL_DATABASE=easyshellMYSQL_PORT=13306
# RedisREDIS_PORT=16379
# ServerSERVER_PORT=18080JAVA_OPTS=-Xms256m -Xmx512m
# Agent connection URL (change to your server's external IP when deploying agents)# PROVISION_SERVER_URL=http://your-server-ip:18080
# WebWEB_PORT=18880
# Security (MUST change in production!)# JWT_SECRET=your-production-jwt-secret-key-must-be-at-least-64-characters-long-change-me# ENCRYPTION_KEY=your-production-aes256-key!!
# Docker image source (default: Docker Hub; uncomment to use GHCR)# EASYSHELL_SERVER_IMAGE=ghcr.io/easyshell-ai/easyshell/easyshell-server:latest# EASYSHELL_WEB_IMAGE=ghcr.io/easyshell-ai/easyshell/easyshell-web:latestVerify Services
Section titled “Verify Services”docker compose psdocker compose logs easyshell-serverdocker compose logs easyshell-webAll services should show healthy status within 1–2 minutes.
Development Setup
Section titled “Development Setup”To build from source (for development and debugging), use the development compose file:
docker compose -f docker-compose.build.yml up -dThis builds images locally using Dockerfile.server and Dockerfile.web instead of pulling pre-built images.
Production Setup
Section titled “Production Setup”Security Hardening
Section titled “Security Hardening”Required configuration for production deployments:
- Change all default passwords —
MYSQL_PASSWORD,JWT_SECRET,ENCRYPTION_KEY - Set
PROVISION_SERVER_URL— change to your server’s externally reachable address - Restrict port exposure — MySQL (
13306) and Redis (16379) ports are for debugging only; restrict via firewall or remove port mappings in production - Configure reverse proxy — use Nginx for TLS termination. See Production Deployment
Resource Limits
Section titled “Resource Limits”Recommended resource limits for production:
| Service | Memory Limit | CPU Limit |
|---|---|---|
| Server | 1 GB | 2.0 |
| Web | 256 MB | 0.5 |
| MySQL | 1 GB | 1.0 |
| Redis | 256 MB | 0.5 |
Data Persistence
Section titled “Data Persistence”All data is stored in named Docker volumes:
easyshell_mysql_data— Database fileseasyshell_redis_data— Redis AOF persistence
Back up these volumes regularly in production. See the backup guide for automated backup scripts.
Upgrading
Section titled “Upgrading”To upgrade EasyShell to a new version:
docker compose pulldocker compose up -dThe server handles database migrations automatically on startup.