Skip to main content
Configure Docker, Traefik, and local HTTPS for Overdeck workspaces.

Overview

Overdeck uses Docker for isolated development environments and Traefik as a reverse proxy for local HTTPS. This enables:
  • Isolated workspaces - Each feature branch runs in its own containers
  • Local HTTPS - Trusted certificates for .localhost or custom domains
  • Automatic routing - Traefik routes traffic based on container labels

Prerequisites

  • Docker Desktop (macOS/Windows) or Docker Engine (Linux)
  • Docker Compose v2.x
  • mkcert for local certificates (pan install installs it if it’s missing)

Quick Setup

pan install installs mkcert when it’s missing (Homebrew on macOS, a download to ~/.local/bin on Linux), runs mkcert -install, creates the overdeck Docker network and writes ~/.overdeck/traefik/. --minimal skips Traefik and mkcert, --skip-mkcert skips only the certificates, and --skip-docker skips the network.

Traefik Configuration

Overdeck manages Traefik configuration in ~/.overdeck/traefik/:

Port Binding

Traefik publishes ports 80, 443 and 8080 on 127.0.0.1 only, so other machines on your network cannot reach the dashboard or the Traefik API through it. To publish on every interface, opt in through ~/.overdeck/config.toml:
With bind = "all", anyone who can reach this machine can connect to Traefik and to every workspace it routes. The dashboard still answers 401 to a forwarded LAN client that has no credential. Overdeck writes the 80, 443 and 8080 lines with the IPv4 host address 0.0.0.0, which requests no IPv6 [::] listener for those ports; a port line you add without a host address publishes on IPv6 as well. Unset or unknown values mean loopback. pan install, pan sync, pan up, pan dev and pan restart --traefik (or --full) rewrite the port lines of an existing ~/.overdeck/traefik/docker-compose.yml to the configured address. pan sync only rewrites the file, so run pan restart --traefik afterward to recreate the container. pan doctor reports Traefik port binding as an error when the running container still publishes on 0.0.0.0 or [::].

Static Configuration

The main Traefik config (~/.overdeck/traefik/traefik.yml):
Certificates aren’t in this file: Traefik v3 reads them from dynamic/tls.yml. pan install copies traefik.yml and docker-compose.yml only when ~/.overdeck/traefik/docker-compose.yml doesn’t exist yet, so your edits to them are kept.

Dynamic Configuration

Overdeck writes three files in dynamic/. overdeck.yml routes https://overdeck.localhost (the traefik.domain value in ~/.overdeck/config.toml) to the dashboard, and tls.yml lists every certificate and key pair in certs/. workspace-wake.yml is a lowest-priority router that sends a stopped workspace app’s host to the dashboard’s wake page, which starts the app’s containers again for a browser or script on this machine. Any other caller, such as a LAN client when Traefik binds to all interfaces, gets 404 and starts nothing. pan install, pan up and pan dev regenerate all three, and the dashboard also writes workspace-wake.yml when it starts. Overdeck doesn’t write a dynamic file per workspace: route workspace containers with Docker labels, as in the Docker Compose Template below. Traefik also picks up any file you add to dynamic/ yourself.

Certificate Generation

pan install writes _wildcard.overdeck.localhost.pem and its key to ~/.overdeck/traefik/certs/. The certificate covers overdeck.localhost, *.overdeck.localhost, *.localhost, localhost, 127.0.0.1 and ::1. pan install, pan up and pan dev also create _wildcard.<domain>.pem for each project whose workspace.dns.domain is set and has no certificate yet, then rewrite dynamic/tls.yml. You don’t need to run mkcert yourself. To add a certificate by hand, write the pair into the same folder with the key named <name>-key.pem. The next pan up adds it to tls.yml:

DNS Configuration

Modern browsers resolve *.localhost to 127.0.0.1 automatically, so .localhost hostnames need no workspace.dns block. Without one, templates get {{DOMAIN}} set to localhost.

Option 2: /etc/hosts

For a custom domain, add a workspace.dns block to the project in ~/.overdeck/projects.yaml:
When it creates a workspace, Overdeck adds each entry as a 127.0.0.1 line inside a # BEGIN overdeck managed entries block in /etc/hosts, and removes it when the workspace is removed. The Overdeck process must be able to write /etc/hosts. If it can’t, the entry is skipped without an error, so add the lines by hand:
sync_method: dnsmasq writes address=/<host>/127.0.0.1 lines to overdeck.conf in /etc/dnsmasq.d (Homebrew’s etc/dnsmasq.d on macOS) instead. When sync_method is unset, Overdeck uses wsl2hosts.

Option 3: WSL2 Hosts Sync (Windows)

For WSL2, use the wsl2hosts sync method (also the default when sync_method is unset):
Overdeck appends each hostname to ~/.wsl2hosts and starts the Windows scheduled task OverdeckWsl2HostsSync, which copies the entries into the Windows hosts file. Register that task once, from an Administrator PowerShell, with the scripts in infra/wsl2hosts.

Starting Traefik

With pan up

pan up starts Traefik when traefik.enabled is true in ~/.overdeck/config.toml. pan install sets it unless you pass --minimal, and pan up --skip-traefik skips the start:

Manually

pan restart --traefik recreates the container with the current compose file.

Workspace Container Setup

Docker Compose Template

Point workspace.docker.compose_template in ~/.overdeck/projects.yaml at a template folder in your project. When Overdeck creates a workspace, it renders every *.template file in that folder into <workspace>/.devcontainer/ (replacing placeholders such as {{FEATURE_FOLDER}}) and copies the other files as they are. It starts the stack only when asked, for example with pan workspace create <issueId> --docker. Re-render with pan workspace render-devcontainer <featureName>, or tear down, re-render and restart one stack with pan workspace rebuild <issueId>.

Network Setup

pan install creates the shared overdeck network. To create it by hand:
All workspaces and Traefik connect to this network for routing.

Troubleshooting

”Connection refused” on HTTPS

  1. Check Traefik is running:
  2. Check Traefik logs:
  3. Verify certificates exist:

“Certificate not trusted” warnings

  1. Install mkcert’s CA:
  2. Restart your browser

Workspace containers not routable

  1. Verify containers are on the overdeck network:
  2. Check container labels:
  3. Check Traefik dashboard at http://localhost:8080

Port conflicts

If ports 80/443 are in use:

WSL2-specific issues

See Troubleshooting for WSL2-specific networking and performance issues. Still stuck? Ask on the Overdeck Discord or file a GitHub Issue.

Best Practices

Resource Management

  • Limit concurrent workspaces - Each workspace uses memory
  • Use shared volumes - Cache npm/maven dependencies across workspaces
  • Clean up old containers - Run docker system prune periodically

Security

  • Don’t expose Traefik externally - Keep it bound to localhost
  • Use unique certificates per environment - Don’t share between machines
  • Regenerate certificates periodically - mkcert certs expire after ~1 year

Performance

  • Use Docker volumes for node_modules - Avoid mounting from host
  • Adjust Vite polling interval: see Troubleshooting
  • Monitor container resources - Use docker stats