cd <your-clone-dir> # the directory you cloned MagesticAI into
# Build and start (clean)
sudo docker compose down -v && sudo docker compose build && sudo docker compose up -d
# Start (no rebuild)
sudo docker compose up -d- URL:
http://${INSTANCE_IP}:3101(from.env) — orhttp://localhost:3101if not using macvlan - Token: Auto-generated on first run, retrieve with:
sudo docker exec magesticai cat /home/magesticai/.magestic-ai/.token# Check container status
sudo docker compose ps
# View logs (last 30 lines)
sudo docker logs magesticai --tail 30
# Follow logs in real time
sudo docker logs magesticai -f
# Shell into container (as magesticai user)
sudo docker exec -it magesticai bash
# Shell as root
sudo docker exec -it -u root magesticai bash
# Check Claude Code CLI inside container
sudo docker exec magesticai bash -l -c "claude --version"# Stop container (keeps volumes)
sudo docker compose down
# Stop and remove volumes (full reset)
sudo docker compose down -v
# Remove image too
sudo docker compose down -v --rmi allSet in docker-compose.yml or .env file. Key vars:
| Variable | Default | Description |
|---|---|---|
APP_HOST |
0.0.0.0 |
Listen address |
APP_PORT |
3101 |
Server port |
APP_API_TOKEN |
(auto-generated) | Auth token for login |
APP_DEBUG |
false |
Enable Swagger docs at /docs |
APP_DEFAULT_SHELL |
/bin/bash |
Default terminal shell |
APP_MAX_TERMINALS |
20 |
Max concurrent terminals |
- Base image: Ubuntu 24.04
- Runtime user:
magesticai(non-root) - Python venv:
/home/projects/MagesticAI/.venv - Node.js: Copied from build stage (for frontend build + npm available at runtime)
- Frontend: Pre-built static files served from
apps/web-server/static/ - Data directory:
/home/magesticai/.magestic-ai/(persisted via Docker volume)
- Login with token
- Onboarding wizard launches automatically
- Install Claude Code CLI (installs Node.js via fnm if needed, then
npm install -g @anthropic-ai/claude-code) - Configure OAuth: runs
claude setup-tokenin embedded terminal, auto-detects token from output - Add a project (default browse path:
/home)