Appearance
Docker Setup
Run Coleo in containers for isolation and reproducibility.
Quick Start
bash
# Copy environment template
cp .env.example .env
# Edit with your API keys
nano .env
# Build and start
docker compose up -d
# Check status
docker compose psServices
The Docker Compose stack includes:
| Service | Port | Description |
|---|---|---|
coleo | 2222 (SSH) | Main Coleo container |
gitea | 3000 (HTTP), 2223 (SSH) | Git forge for collaboration |
Connecting
SSH Access
bash
ssh -p 2222 coleo@localhost
# Password: coleoOnce connected:
bash
# Check status
coleo status
# Start the API server (required for harness-based arms)
coleo serve
# Start the brain
coleo brain run
# In another SSH session, spawn an arm
coleo arm spawn -n explorer --terminal tmux --workdir /home/coleo/projects/your-projectDirect Execution
Without SSH:
bash
docker exec -it coleo coleo status
docker exec -it coleo coleo serve
docker exec -it coleo coleo brain runEnvironment Variables
Configure via .env file:
bash
# Required: API keys for AI agents
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
# Optional: Mount your projects
PROJECTS_DIR=~/projects
# Optional: Use your SSH keys for git
SSH_KEYS_DIR=~/.sshVolume Mounts
| Volume | Container Path | Purpose |
|---|---|---|
coleo-data | /home/coleo/.coleo | Persistent state |
$PROJECTS_DIR | /home/coleo/projects | Your projects |
$SSH_KEYS_DIR | /home/coleo/.ssh | SSH keys (read-only) |
Harness Modes
Inside the container, you can run arms in a visible terminal session (tmux) or headless via the API harness:
- tmux (opencode-tui):
coleo arm spawn -n explorer --terminal tmux - headless (opencode-api):
coleo arm spawn -n explorer --harness opencode-api
Viewing Arm Output
bash
# If using tmux
tmux list-sessions
tmux attach -t coleo_explorer
# If headless (background process)
tail -f ~/.coleo/logs/coleo_explorer.logGitea Setup
Gitea provides a local Git forge for arm collaboration.
First Run
- Open http://localhost:3000
- Complete the installation wizard
- Create an admin account
- Create a repository for your project
Configure Coleo
toml
# ~/.coleo/config.toml
[gitea]
url = "http://gitea:3000"
token = "your-access-token"
default_org = "coleo"Git SSH
For git operations via SSH:
bash
git clone ssh://git@localhost:2223/coleo/my-project.gitCustom Docker Build
Building the Image
bash
docker compose build coleoDockerfile Customization
The Dockerfile installs:
- Bun runtime
- SSH server
- Git, curl, vim
- tmux (for arm sessions)
- Python (for some AI tools)
Add your own tools:
dockerfile
# In Dockerfile
RUN apt-get update && apt-get install -y \
your-custom-tool \
&& rm -rf /var/lib/apt/lists/*Production Deployment
Security Hardening
- Change default password:
dockerfile
RUN echo 'coleo:your-secure-password' | chpasswd- Use SSH keys instead of password:
dockerfile
RUN mkdir -p /home/coleo/.ssh \
&& echo "your-public-key" >> /home/coleo/.ssh/authorized_keys \
&& chmod 600 /home/coleo/.ssh/authorized_keys \
&& sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config- Generate unique API key:
bash
openssl rand -base64 32Resource Limits
yaml
# docker-compose.yml
services:
coleo:
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '1'
memory: 2GHealth Checks
yaml
services:
coleo:
healthcheck:
test: ["CMD", "coleo", "status"]
interval: 30s
timeout: 10s
retries: 3Troubleshooting
Container Won't Start
bash
# Check logs
docker compose logs coleo
# Common issues:
# - Port 2222 already in use
# - Missing .env file
# - Invalid API keysCan't SSH In
bash
# Check SSH is running
docker exec coleo ps aux | grep sshd
# Check port mapping
docker compose port coleo 22Gitea Not Healthy
bash
# Check Gitea logs
docker compose logs gitea
# Gitea needs time to initialize on first run
# Wait for health check to pass (may take 30-60 seconds)Arms Not Spawning
bash
# Check if tmux is available
docker exec coleo which tmux
# Try explicit headless mode
docker exec -it coleo coleo arm spawn -n test --headlessUpdating
bash
# Pull latest changes
git pull
# Rebuild
docker compose build
# Restart with new image
docker compose up -dCleanup
bash
# Stop containers
docker compose down
# Remove volumes (WARNING: deletes all data)
docker compose down -v
# Remove images
docker compose down --rmi all