Skip to content

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.

  • 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:

Terminal window
docker --version
docker compose version
Terminal window
git clone https://github.com/easyshell-ai/easyshell.git
cd easyshell
cp .env.example .env # Edit if needed
docker compose up -d

No local build required — pre-built images are pulled automatically from Docker Hub.

Open http://localhost:18880 → login with easyshell / easyshell@changeme.

docker-compose.yml defines all four services:

ServiceImagePortDescription
easyshell-serverlaolupaojiao/easyshell-server:latest18080Java Spring Boot backend + built-in Agent binaries
easyshell-weblaolupaojiao/easyshell-web:latest18880React frontend (served by Nginx)
easyshell-mysqlmysql:8.013306Database
easyshell-redisredis:7-alpine16379Cache

Service dependencies: web → server → mysql + redis. Docker Compose uses health checks to ensure correct startup order.

.env.example contains all configurable options. Copy it to .env and modify:

Terminal window
# MySQL
MYSQL_PASSWORD=18923ce29fdab04e
MYSQL_DATABASE=easyshell
MYSQL_PORT=13306
# Redis
REDIS_PORT=16379
# Server
SERVER_PORT=18080
JAVA_OPTS=-Xms256m -Xmx512m
# Agent connection URL (change to your server's external IP when deploying agents)
# PROVISION_SERVER_URL=http://your-server-ip:18080
# Web
WEB_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:latest
Terminal window
docker compose ps
docker compose logs easyshell-server
docker compose logs easyshell-web

All services should show healthy status within 1–2 minutes.

To build from source (for development and debugging), use the development compose file:

Terminal window
docker compose -f docker-compose.build.yml up -d

This builds images locally using Dockerfile.server and Dockerfile.web instead of pulling pre-built images.

Required configuration for production deployments:

  1. Change all default passwordsMYSQL_PASSWORD, JWT_SECRET, ENCRYPTION_KEY
  2. Set PROVISION_SERVER_URL — change to your server’s externally reachable address
  3. Restrict port exposure — MySQL (13306) and Redis (16379) ports are for debugging only; restrict via firewall or remove port mappings in production
  4. Configure reverse proxy — use Nginx for TLS termination. See Production Deployment

Recommended resource limits for production:

ServiceMemory LimitCPU Limit
Server1 GB2.0
Web256 MB0.5
MySQL1 GB1.0
Redis256 MB0.5

All data is stored in named Docker volumes:

  • easyshell_mysql_data — Database files
  • easyshell_redis_data — Redis AOF persistence

Back up these volumes regularly in production. See the backup guide for automated backup scripts.

To upgrade EasyShell to a new version:

Terminal window
docker compose pull
docker compose up -d

The server handles database migrations automatically on startup.