- Home
- Dev Container
- Troubleshooting
Troubleshooting
Container Won’t Start
Section titled “Container Won’t Start””Conflict. The container name is already in use”
Section titled “”Conflict. The container name is already in use””docker rm -f devcontainerdocker compose up -dpodman rm -f devcontainerpodman-compose up -dAI Tools Not Working
Section titled “AI Tools Not Working””claude: command not found”
Section titled “”claude: command not found””The image may be outdated. Pull the latest and restart:
docker compose pulldocker compose up -dpodman-compose pullpodman-compose up -dClaude shows “Not logged in”
Section titled “Claude shows “Not logged in””The entrypoint seeds ~/.claude.json with onboarding flags. If missing:
echo '{"hasCompletedOnboarding": true}' > ~/.claude.jsonClaude shows “Invalid API key”
Section titled “Claude shows “Invalid API key””Check which value is actually set:
echo "$ANTHROPIC_API_KEY"Common causes:
- LiteLLM proxy key missing or invalid — if you’re using proxy mode, make sure
LITELLM_API_KEYin.envcontains the correct proxy credential, then restart the container so the entrypoint can deriveANTHROPIC_API_KEY. - OAuth token or proxy mode mismatch — use exactly one auth mode. If
CLAUDE_CODE_OAUTH_TOKENis set, it takes precedence over LiteLLM proxy mode.
OpenCode shows “Model not found”
Section titled “OpenCode shows “Model not found””If using Claude Max OAuth, check that the auth credentials were seeded:
cat ~/.local/share/opencode/auth.jsonThe file should contain an "anthropic" key with your OAuth token. If missing, verify CLAUDE_CODE_OAUTH_TOKEN is set in .env and restart the container.
To reset OpenCode config: delete ~/.config/opencode/opencode.json and ~/.local/share/opencode/auth.json, then restart.
API requests fail with 401
Section titled “API requests fail with 401”Check that your API key is set correctly:
echo "$ANTHROPIC_API_KEY"Verify it works by making a direct call to your provider.
Claude says “model not found”
Section titled “Claude says “model not found””The model is determined by your provider and API key. Check your provider’s documentation for available models.
GitHub CLI
Section titled “GitHub CLI””gh: not authenticated”
Section titled “”gh: not authenticated””The gh CLI requires a GH_TOKEN environment variable. Add it to your .env file:
GH_TOKEN=ghp_your-token-hereCreate a token at github.com/settings/tokens. Fine-grained tokens (recommended) or classic tokens with repo scope both work. Restart the container after updating .env.
HTTPS git clone fails with 401
Section titled “HTTPS git clone fails with 401”When GH_TOKEN is set, the entrypoint runs gh auth setup-git to configure the git credential helper for HTTPS. If HTTPS operations fail:
- Verify the token is valid:
gh auth status - Check the credential helper is configured:
git config --global credential.helper - Restart the container to re-run the entrypoint
SSH vs HTTPS
Section titled “SSH vs HTTPS”Both authentication methods can coexist in the container:
- SSH (
SSH_PRIVATE_KEYin.env) — usesgit@github.com:URLs. Required if your organization enforces SSH. - HTTPS (
GH_TOKENin.env) — useshttps://github.com/URLs. Simpler setup, no key management.
If both are configured, git uses whichever protocol matches the remote URL. To switch an existing clone:
# SSH to HTTPSgit remote set-url origin https://github.com/owner/repo.git
# HTTPS to SSHgit remote set-url origin git@github.com:owner/repo.gitPermission Issues
Section titled “Permission Issues””Permission denied” on /workspace or /home
Section titled “”Permission denied” on /workspace or /home”sudo chown -R $(id -u):$(id -g) /workspace ~npm install fails with EACCES
Section titled “npm install fails with EACCES”The entrypoint automatically configures a user-writable npm global prefix at ~/.npm-global, so runtime npm install -g commands should work without sudo. If you still see EACCES errors, re-apply the fix manually:
mkdir -p ~/.npm-globalnpm config set prefix ~/.npm-globalexport PATH="$HOME/.npm-global/bin:$PATH"Build Issues
Section titled “Build Issues”Build takes a very long time
Section titled “Build takes a very long time”The first build downloads the base image (~1 GB). Subsequent builds use cache. If slow every time:
docker builder prunepodman builder prune“No space left on device”
Section titled ““No space left on device””docker system prune -a --volumespodman system prune -a --volumesWarning: This removes all unused containers, images, and volumes — not just this project’s.
Networking
Section titled “Networking”Can’t reach the internet from inside the container
Section titled “Can’t reach the internet from inside the container”ping -c 1 8.8.8.8nslookup google.comcurl -I https://github.comIf DNS fails, add to /etc/docker/daemon.json on the host:
{ "dns": ["8.8.8.8", "8.8.4.4"]}Then restart Docker.
If DNS fails, configure DNS inside the Podman machine:
podman machine sshsudo sh -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'exitOr add DNS settings to ~/.config/containers/containers.conf on the host:
[containers]dns_servers = ["8.8.8.8", "8.8.4.4"]Then restart Podman: podman machine stop && podman machine start.
Remote Display (noVNC)
Section titled “Remote Display (noVNC)”Black screen in noVNC
Section titled “Black screen in noVNC”Xvfb may not have started. Check inside the container:
ps aux | grep XvfbIf not running, check that ENABLE_VNC is not set to false and restart the container.
”Cannot open display” or “No display” error
Section titled “”Cannot open display” or “No display” error”The DISPLAY environment variable may not be set. Verify:
echo "$DISPLAY"It should be :99. If empty, add DISPLAY=:99 to your .env or devcontainer.json and restart.
Port 6080 connection refused
Section titled “Port 6080 connection refused”noVNC may not be running. Check inside the container:
ps aux | grep -E 'novnc|websockify'If not running, verify ENABLE_VNC is true (the default) and check container logs:
docker compose logs dev | grep -i vncpodman-compose logs dev | grep -i vncPort 6080 already in use
Section titled “Port 6080 already in use”Change the host port in docker-compose.yml:
ports: - "127.0.0.1:16080:6080"Chrome DevTools MCP
Section titled “Chrome DevTools MCP”Chrome remote debugging not responding
Section titled “Chrome remote debugging not responding”The shared Chrome instance should be running on port 9222. Check inside the container:
# Is Chrome running?curl http://localhost:9222/json/version
# Check Chrome logscat ~/.local/share/chrome-browser/chrome.log
# Verify the symlinkls -la /opt/google/chrome/chrome
# Restart Chrome manually. /usr/local/lib/chrome-browser.shstart_chrome_browserIf the symlink is missing, pull the latest image and restart the container.
Browser profile lock error
Section titled “Browser profile lock error”With the shared browser architecture, profile lock errors should not occur. If you see one, a stale Chrome process may be holding the lock:
# Kill any stale Chrome processespkill -f 'chrome.*remote-debugging-port' || true
# Remove the lock filerm -f ~/.cache/chrome-devtools-mcp/chrome-profile/SingletonLock
# Restart Chrome. /usr/local/lib/chrome-browser.shstart_chrome_browserDuplicate chrome-devtools-mcp tools
Section titled “Duplicate chrome-devtools-mcp tools”The chrome-devtools-mcp server is now registered globally in ~/.claude/settings.json. If you have a per-repo .mcp.json that also registers it, you will see duplicate tools. Remove the chrome-devtools-mcp entry from per-repo .mcp.json files:
# Check for per-repo configcat .mcp.jsonRemove the chrome-devtools-mcp key from any per-repo .mcp.json to use the global registration.
Reset Everything
Section titled “Reset Everything”docker compose down -vdocker rm -f devcontainer 2>/dev/nulldocker compose pulldocker compose up -dpodman-compose down -vpodman rm -f devcontainer 2>/dev/nullpodman-compose pullpodman-compose up -dThis destroys all data in volumes. You’ll need to re-clone repos and reconfigure tools.