Comprehensive technical research and local implementation guide for Coder (coder/coder): the open-source platform for self-hosted Cloud Development Environments (CDEs) and isolated AI Coding Agent sandboxes.
Coder is a self-hosted developer platform that shifts development off local physical laptops onto isolated, disposable workspaces running on your private infrastructure (Docker, Colima, Kubernetes, or Cloud VMs). Rather than paying GitHub Codespaces or Gitpod $50/month per seat, Coder lets you provision full-fidelity Linux development environments on your own Apple Silicon M4 hardware with zero egress costs.
Runs autonomous agents (Claude Code, Hermes, Codex, OpenCode) in sandboxed workspaces. The agent loop runs in the control plane—zero API keys exist inside the workspace container.
Templates are written in standard Terraform. CPU, RAM, disk, network access, and pre-installed packages are version-controlled in Git and identical for every run.
Connect seamlessly via browser (code-server / VS Code Web), local desktop VS Code, JetBrains, or direct SSH over an encrypted peer-to-peer WireGuard tunnel (tailnet).
Workspaces automatically shut down when idle, preserving CPU/RAM on your Mac Mini and instantly spinning back up with persistent volume state intact.
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CONTROL PLANE (Host / Coder Daemon) │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ [Viral (iPad / Laptop / Web)] [Hermes Multi-Agent Fleet] [Claude Code / Codex CLI] │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌───────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ coder server (Port 3000 / Zero Trust) │ │
│ │ - Auth & RBAC (GitHub OAuth / Local Admin) - WireGuard Encrypted Tailnet Hub │ │
│ │ - Terraform Provisioner Daemon (provisionerd) - Control Plane AI Proxy (Stateless) │ │
│ └──────────────────────────────────────────┬────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────┼───────────────────────────────────────────────────┘
│ (DOCKER_HOST unix://~/.colima/default/docker.sock)
▼
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ISOLATED WORKSPACES RUNTIME (Colima Docker) │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────┐ ┌─────────────────────────────┐ ┌───────────────────────┐ │
│ │ WORKSPACE 1: ToFrom Core │ │ WORKSPACE 2: Hermes Agent │ │ WORKSPACE 3: Sandbox │ │
│ │ - Ubuntu 24.04 ARM64 │ │ - Python 3.11 / venv │ │ - Disposable Temp Env │ │
│ │ - PAS Spooler Interceptor │ │ - Safe Bash Execution │ │ - Zero Host Access │ │
│ │ - code-server (Browser IDE) │ │ - Isolated Git Worktree │ │ - Auto-stop after 30m │ │
│ │ - Persistent Volume Mount │ │ - Resource Capped (4GB RAM) │ │ - Auto-destroy on exit│ │
│ └─────────────────────────────┘ └─────────────────────────────┘ └───────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
Install the standalone Coder CLI via Homebrew or official shell script.
# Install via Homebrew
brew install coder/coder/coder
# Or via official curl installer
curl -L https://coder.com/install.sh | sh
# Verify installation
coder --version
Viral's Mac Mini is already running Colima Docker (context: colima). Point Coder to Colima's socket:
# Export Colima Docker socket for Coder
export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
# Verify Docker socket is responding
docker info
Start the server. On initial run, Coder uses embedded SQLite and generates a local access URL:
# Start Coder server locally
coder server --http-address 127.0.0.1:3000
# Open browser at http://localhost:3000 and create initial admin credentials
Create a reusable template for isolated development environments:
# Initialize built-in Docker template
coder templates init
# Select 'docker' from list, then push template
cd docker
coder template create tofrom-dev-env
Route traffic securely through Cloudflare Access to reach Coder on your iPad at coder.vdesai.com:
cloudflared tunnel route dns vdesai-tunnel coder.vdesai.com
Test custom AFP/IPDS print spoolers, Guidewire XML feeds, and PDF statutory generation engines in sterile containers without polluting host macOS with print drivers or Java dependencies.
When Hermes or an autonomous coding subagent clones untrusted repos or runs complex package installations, execute inside an ephemeral Coder workspace. Total isolation from host credentials.
Connect to coder.vdesai.com from an iPad Pro. Access full desktop VS Code in the browser with terminal, zsh, Git, and extensions running natively on the M4 Mac Mini in Nashua.
Spin up dedicated multi-core ffmpeg rendering containers for vertical video mastering without locking up host CPU threads.
Drop-in Terraform blueprint configured for Apple Silicon Colima Docker with Python 3.11, Node.js, and web-based VS Code (code-server):
terraform {
required_providers {
coder = {
source = "coder/coder"
version = "~> 2.11"
}
docker = {
source = "kreuzwerker/docker"
version = "~> 3.0"
}
}
}
provider "docker" {
host = "unix://${pathexpand("~")}/.colima/default/docker.sock"
}
data "coder_workspace" "me" {}
resource "coder_agent" "main" {
arch = "arm64"
os = "linux"
startup_script = <<-EOT
set -e
# Start code-server IDE in the background
code-server --auth none --port 13337 &
EOT
}
resource "coder_app" "code_server" {
agent_id = coder_agent.main.id
slug = "code-server"
display_name = "VS Code Web"
url = "http://localhost:13337/"
icon = "/icon/code.svg"
subdomain = false
share = "owner"
}
resource "docker_volume" "home_volume" {
name = "coder-${data.coder_workspace.me.id}-home"
}
resource "docker_container" "workspace" {
count = data.coder_workspace.me.start_count
image = "codercom/enterprise-base:ubuntu"
name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
hostname = data.coder_workspace.me.name
entrypoint = ["sh", "-c", coder_agent.main.init_script]
env = [
"CODER_AGENT_TOKEN=${coder_agent.main.token}",
]
volumes {
container_path = "/home/coder"
volume_name = docker_volume.home_volume.name
read_only = false
}
}