Coder workspace for one or more DDEV projects in a single workspace. Each project gets its own stable subdomain URL via ddev-router (Traefik) Host-header routing — no port numbers in links, no conflicts between projects.
- Multi-Project Support: Run multiple DDEV projects in one workspace; each gets its own Coder app button and URL
- Coder-Aware Routing: DDEV web server and Mailpit get stable subdomain URLs via ddev-router Host-header dispatch
- 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 web URL always uses the workspace name as its subdomain prefix regardless of what the DDEV project is named internally. ddev coder-routes reads the running DDEV project from DDEV and writes a Traefik rule that maps the Coder subdomain to the correct container.
# Create workspace
coder create --template freeform myworkspace
# SSH in
coder ssh myworkspace
# Clone your project into any directory you choose
git clone git@github.com:your-org/your-project.git <yourdir>
cd <yourdir>
# 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.
<yourdir>/— your project directory (any name, any location).ddev/config.yaml— DDEV project configuration.ddev/config.coder.yaml— Coder post-start hook (written byddev coder-setup, gitignored).ddev/docker-compose.coder-describe.yaml— Coder URLs forddev describe(written byddev coder-routes, gitignored)- your project files
~/WELCOME.txt~/.ddev/global_config.yaml— DDEV global settings~/.ddev/traefik/custom-global-config/coder-routes-<project>.yaml— Traefik routing rules (auto-generated per project)
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