Coder workspace for a single DDEV project with full Traefik routing integration. Coder-aware routing rules are automatically configured so web, Mailpit, and optional Adminer are accessible via stable subdomains.
- Coder-Aware Traefik Routing: DDEV web server and Mailpit get stable subdomain URLs (no port numbers in links)
- VS Code for Web: Opens directly to your project directory
- Mailpit: Email testing UI available as a Coder app
- Optional Adminer: Database UI available when enabled via template variable
- Post-Start Hook: Traefik routes are refreshed after each
ddev startto pick up add-on services - Persistent Storage: Home directory and Docker layer cache survive restarts
The workspace name is the Coder app slug. After running ddev coder-setup and ddev start, routing rules are written automatically. URLs follow this pattern:
Web: https://{workspace}--{workspace}--{owner}.{coder-domain}
Mailpit: https://mailpit--{workspace}--{owner}.{coder-domain}
Adminer: https://adminer--{workspace}--{owner}.{coder-domain} (if enabled)
The DDEV project name does not need to match the workspace name — the routing script (ddev coder-routes) reads the actual DDEV project name from DDEV and maps it to the correct Coder subdomain.
# Create workspace
coder create --template freeform myworkspace
# SSH in
coder ssh myworkspace
# Clone your project (or create a new directory)
git clone git@github.com:your-org/your-project.git ~/myproject
cd ~/myproject
# Configure DDEV
ddev config --project-type=wordpress --docroot=web
# Install the Coder routing hook (once per project)
ddev coder-setup
# Start DDEV — routing activates automatically
ddev startThen click DDEV Web or Mailpit in the Coder dashboard.
~/myproject/— your project directory (any name, you create it).ddev/config.yaml— DDEV project configuration.ddev/config.coder.yaml— Coder post-start hook (written byddev coder-setup, gitignored)- your project files
~/WELCOME.txt~/.ddev/global_config.yaml— DDEV global settings~/.ddev/traefik/custom-global-config/coder-routes.yaml— Traefik routing rules (auto-generated)
ddev coder-setup is a one-time command run from your project directory after ddev config. It:
- Writes
.ddev/config.coder.yamlwith a post-start hook that runsddev coder-routesafter everyddev start - Adds
.ddev/config.coder.yamlto~/.config/git/ignoreso it stays out of your repo
After ddev coder-setup, routing updates are fully automatic — no need to run anything manually after adding add-ons or restarting.
Enable Adminer when creating or updating the workspace:
coder create --template freeform myworkspace
# Select: enable_adminer = trueThen install the DDEV add-on inside the workspace:
ddev get ddev/ddev-adminer
ddev restartAfter ddev restart, the post-start hook updates coder-routes.yaml to include the Adminer router. Click Adminer in the Coder dashboard.
ddev get ddev/ddev-redis
ddev get ddev/ddev-memcached
ddev get ddev/ddev-solr
ddev restartAfter restart, coder-routes runs automatically and adds any new service routes.
# Project lifecycle
ddev start # Start containers (refreshes Traefik routes)
ddev stop # Stop containers
ddev restart # Restart containers
ddev describe # Show URLs and service status
# Database
ddev import-db --file=dump.sql.gz # Import database
ddev export-db --file=dump.sql.gz # Export database
ddev mysql # Open MySQL CLI
# Running commands
ddev exec php --version # Run command in web container
ddev ssh # SSH into web container
ddev composer install # Run Composer
ddev npm install # Run npm
# Logs
ddev logs # View container logs
ddev logs -f # Follow logs| Variable | Default | Description |
|---|---|---|
cpu |
4 | CPU cores (1–32) |
memory |
8 | Memory in GB (2–128) |
enable_adminer |
false | Show Adminer app button (requires ddev get ddev/ddev-adminer) |
workspace_image_registry |
index.docker.io/ddev/coder-ddev |
Base image registry |
docker_gid |
988 | Docker group GID on host |
- Coder v2.13+
- Sysbox runtime enabled on the Docker host
VSCODE_PROXY_URIenvironment variable set (Coder sets this automatically)
- Minimum: 2 CPU cores, 4 GB RAM
- Recommended: 4 CPU cores, 8 GB RAM, 20 GB disk
Check that ddev coder-setup was run and routes were generated:
cat ~/.ddev/traefik/custom-global-config/coder-routes.yamlIf missing, run from your project directory:
ddev coder-setup
ddev startThe post-start hook updates routes automatically after ddev start. If routes are missing, verify ddev coder-setup was run, then:
ddev restart
# or manually:
ddev coder-routesdocker ps
cat /tmp/dockerd.log- DDEV Docs: https://ddev.readthedocs.io/
- Coder Docs: https://coder.com/docs
- Template Issues: File issues in this repository