Start
Troubleshooting
The complete upstream guide to troubleshooting, synchronized with the product repository.
Product v0.22.0 · Complete source guide
Operational Troubleshooting & Diagnostics
Common operational edge cases, recovery steps, and diagnostic procedures for NineDeploy.
🔁 0. Nothing Comes Back After a Host Reboot
Symptoms:
- After rebooting the server, NineDeploy, Traefik and deployed containers are all down.
Resolution:
- Check whether the Docker daemon is running and boot-enabled — every container's restart policy depends on it, and the
ninedeployunit requires it:If Docker is disabled, re-running the installer fixes it permanently (bashsystemctl status docker ninedeploy --no-pager systemctl is-enabled docker ninedeploysudo systemctl enable dockeris the immediate repair). - Containers stopped manually before the reboot stay stopped (
unless-stoppedsemantics). List and start them:bashdocker ps -a docker start <container> - Bare-metal (PM2) deployments are restored at boot by the
ninedeploy-pm2systemd unit from the dump the panel refreshes after each start/stop. If the unit is missing or the dump is stale, re-run the installer or redeploy the service:bashsystemctl status ninedeploy-pm2 --no-pager
The panel says "running" but nothing is actually running:
The service status used to record the last lifecycle result, so a reboot or daemon outage left stale running rows. The panel now self-heals: at startup and every 60 seconds it compares each local service's desired state with the live runtime and revives anything the panel believes should be running — stopped containers are docker started (Compose sidecars come along), a dead PM2 daemon is resurrected from the dump and stopped processes restarted. Only a runtime that was deleted (needs a redeploy) is downgraded to error. Lifecycle actions also report the truth: starting/restarting a runtime that no longer exists returns 409 (redeploy required), and a Docker daemon that cannot be reached returns 503 instead of a fake success.
🛑 1. Docker Daemon / Socket Permission Denied
Symptoms:
- Deployment logs show
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. - Service container creation fails with
permission denied.
Resolution:
- If running under bare-metal:bash
sudo usermod -aG docker ninedeploy sudo systemctl restart ninedeploy - If running under Docker:
Ensure the host's docker group GID is passed via
--group-add:bashdocker run ... --group-add $(getent group docker | cut -d: -f3) ...
🔒 2. Database Locked (SQLITE_BUSY)
Symptoms:
- API responses return
database is lockedduring concurrent high-throughput operations.
Resolution:
- Check for long-running backup processes holding locks.
- Ensure WAL (Write-Ahead Logging) mode is active:bash
sqlite3 .data/ninedeploy.db "PRAGMA journal_mode=WAL;" - Restart the systemd service to flush pending transactions.
🩺 3. Healthcheck Flapping & Deployment Timeouts
Symptoms:
- Blue-green deployment times out and rolls back after container boot.
Resolution:
- Check the service's internal health check path (
/health,/api/health, or custom port). - Inspect new container logs before teardown:bash
ninedeploy services logs <service-id> - Increase
healthCheckTimeoutin service configuration if the application has a long cold-start initialization phase.
🌐 4. Let's Encrypt Certificate Issuance Failures
Symptoms:
- Service routes return self-signed Traefik default certificate instead of valid Let's Encrypt certificate.
Resolution:
- Verify DNS records: Ensure both apex and subdomains point directly to your server's public IP address (
Arecord). - Ensure port
80and443are open and not blocked by cloud provider firewalls / security groups (AWS Security Groups, Hetzner Firewall, UFW). - If using Cloudflare proxy (orange cloud), ensure SSL mode is set to Full (Strict).
🔌 5. CLI Connection & Server Discovery Failures
Symptoms:
- Running
ninedeploy services listorninedeploy initprintsfetch failedorECONNREFUSED.
Resolution:
- Run
ninedeploy doctorto test network and socket connectivity. - Check configured target server URL:bash
ninedeploy config - If connecting to a remote server, update the base URL:bash
ninedeploy config --server https://panel.yourdomain.com - If connecting locally, check if the Docker container is active:bash
ninedeploy server status ninedeploy server start
🐳 6. Local Server Container Conflicts & Port Collisions
Symptoms:
ninedeploy server startfails withport is already allocatedorConflict. The container name "/ninedeploy" is already in use.
Resolution:
- Port in use: If another service occupies port 3000, specify a custom port:bash
ninedeploy server start --port 3001 ninedeploy config --server http://localhost:3001 - Container conflict: Remove stale or orphaned containers:bash
docker rm -f ninedeploy ninedeploy server start
🩺 7. Running Full Health Diagnostics
Whenever encountering unexpected behavior, run the built-in doctor utility:
ninedeploy doctorThis inspects:
- Node.js runtime and architecture
- Docker daemon status and server container state
- NineDeploy HTTP API response and latency
- Local session token validity and user roles
🛑 8. Docker Pull Exits with Code 143 (SIGTERM)
Symptoms:
- Pulling or deploying large Docker images/templates (e.g.
n8nio/n8n,supabase,postgres) fails with:code✗ Deployment failed: `docker pull n8nio/n8n` exited with code 143
Cause:
- Exit code 143 is
128 + SIGTERM (15): an external supervisor terminated the Docker CLI. Older NineDeploy units usedType=notifywithWatchdogSec=90; unreliable watchdog notification could terminate the server cgroup during a long pull. - Linux OOM termination normally uses
SIGKILLand surfaces as exit code 137, not 143.
Resolution:
- Run the current installer over the existing installation. It replaces the unit, installs a migration safety override and refuses to start unless effective systemd policy is
Type=simplewith the watchdog disabled:bashcurl -fsSL https://ninedeploy.com/install.sh | bash - Verify the installed policy:Expected values arebash
systemctl show ninedeploy -p Type -p WatchdogUSecType=simpleandWatchdogUSec=0.
For exit code 137 or kernel OOM records, add swap or memory separately; the installer provisions swap automatically on low-memory supported Linux hosts.
🔐 9. Private Repository 401 or 404 on Clone
Symptoms:
- First deploy of a private repo logs
remote: Repository not foundorfatal: Authentication failed for 'https://github.com/…'. - The build stage exits non-zero before any
docker build/nixpacksline appears.
Cause:
- The credential attached to the service cannot reach the repository. Most often a stale or under-scoped PAT, an SSH key without write-access to the repo, or a credential bound to a different GitHub user than the repo owner.
Resolution:
- Live-test the credential before debugging the deploy:The response isbash
ninedeploy sources test <id> # or curl -fsS -H "Authorization: Bearer $ND_TOKEN" https://your-ninedeploy.example.com/v1/sources/<id>/test{ ok: true, login: "<your-handle>" }on success, or{ ok: false, status: 401, error: "Bad credentials" }(or 404) on failure. - Re-issue the PAT with the right scopes. The minimum working scopes are:
- Fine-grained PAT:
Contents: Read-only(on the specific repo) +Metadata: Read-only(always required). - Classic PAT:
repo.
- Fine-grained PAT:
- For GitHub org repos, the PAT must be issued by a user who has access to the org, OR you must enable "Allow access via fine-grained personal access tokens" in the org's third-party application settings.
- For SSH: ensure the public key is added as a Deploy key on the repo with read access; the matching private key is what you paste into the Source.
- If the repo was renamed or transferred, the Source still works (it stores only the token), but the service's
repoUrlis stale — update it under Service → Settings → Repository URL and re-trigger a deploy. - GitHub App source (
gh-app:<account>, 0.13+): the fix is the installation, not a token. Add the repository to the installation's repository access (GitHub → Settings → Installed GitHub Apps → Configure) and check that the installation is not suspended; for a submodule in a sibling repository set the service's token scope toinstallation. See GITHUB_APP.md §8. - If the credential passes the test but the clone still fails, the panel server cannot reach
github.com(or your self-hosted Gitea/GitLab host). From the host:bashcurl -fsS -I https://github.com
See PRIVATE_REPO_GUIDE.md for a full step-by-step.
🪝 10. Webhook Signature Rejected (401)
Symptoms:
- A
git pushdoes not trigger a new deploy row. - GitHub's webhook delivery page shows the request returning HTTP 401 with body
{"error":{"code":"unauthorized","message":"Invalid webhook signature"}}.
Cause:
- The secret on the GitHub side does not match the secret NineDeploy stored. Most often caused by: copying a trailing space / newline, regenerating the secret in NineDeploy but forgetting to update GitHub, or registering the webhook on the wrong repo.
Resolution:
- Cross-check the secret byte-for-byte:
- In NineDeploy: Service → Webhooks → the secret was returned only once, at creation. If you don't have it, delete the webhook in both places and re-add it.
- In GitHub: Repo → Settings → Webhooks → the webhook → Secret (latest "Update" overrides earlier ones; there's no "show me what I set" — re-paste it).
- Test locally with the same secret:bash
SECRET='paste-the-secret-here' BODY='{"ref":"refs/heads/main","head_commit":{"id":"abc1234","message":"hi","author":{"username":"x"}},"repository":{"clone_url":"https://github.com/owner/repo.git"}}' SIG="sha256=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')" curl -i -X POST "https://your-ninedeploy.example.com/v1/hooks/<id>" \ -H "Content-Type: application/json" \ -H "X-GitHub-Event: push" \ -H "X-Hub-Signature-256: $SIG" \ --data "$BODY" # → expect 200 { "ok": true, "deploymentId": ... } - Make sure the URL is reachable from GitHub (i.e. your panel has a public HTTPS address). If you are testing locally, GitHub cannot reach
http://localhost:3000— use a tunnel (ngrok,cloudflared) or test with the curl above. - Re-save the secret: if the original secret in NineDeploy was lost, the only recovery is delete + re-add on both sides. The new secret is shown exactly once.
- Service linked to a GitHub App (0.13+)? Its per-service webhook answers
{"ok":"skipped","reason":"github_app_linked"}on purpose — the App webhook deploys it. Check the App's Advanced → Recent deliveries on GitHub instead; for a401there, run Sources → GitHub Apps → Webhook sync. See GITHUB_APP.md §4.
🛠️ 11. Nixpacks CLI Not Found
Symptoms:
- A Dockerfile-less repo's deploy fails immediately with:code
✗ Deployment failed: Nixpacks CLI is unavailable. Re-run the NineDeploy installer to provision the checksum-verified source build tool.
Cause:
- The
nixpacksbinary is not on the panel server'sPATH. This is normally installed byinstall.sh, but a manually-installed or Docker-only install may not have provisioned it.
Resolution:
- Bare-metal install: re-run the installer — it skips already-installed components and only provisions the missing ones:The installer fetches a pinned Nixpacks release, verifies its SHA-256 against the table insidebash
curl -fsSL https://ninedeploy.com/install.sh | bashinstall.sh, and only then puts it onPATH. - Docker install: the
ninedeployimage bundles the binary at/usr/local/bin/nixpacks. If you built the image yourself and the binary is missing, rebuild from the officialDockerfile(it has the checksum-verifiedARG NIXPACKS_VERSIONstep) or setNINEDEPLOY_NIXPACKS_VERSIONand rebuild:bashdocker compose -f docker-compose.prod.yml build --no-cache - Verify:bash
nixpacks --version # bare-metal docker exec ninedeploy nixpacks --version # Docker install - Don't want Nixpacks? Switch the service to
buildPack: "dockerfile"and provide a Dockerfile — the panel will not invoke Nixpacks.
📁 12. Dockerfile Not Found (Monorepo With a Subdirectory Dockerfile)
Symptoms:
- A repo that has a
Dockerfile(e.g.apps/api/Dockerfile) silently uses Nixpacks instead ofdocker build. The build output shows Nixpacks detection logs, and your custom Dockerfile is never read.
Cause:
- For backward compatibility with single-Dockerfile-at-root repos, the old behavior was "if
/Dockerfiledoes not exist at the configuredbaseDir, use Nixpacks". That misses monorepos.
Resolution:
- If you can re-deploy without changing anything: the current
autobuild pack walks the repo up to 2 directory levels deep and picks the closest Dockerfile to the root.apps/api/Dockerfilewill now be detected automatically. - If you want to be explicit (recommended for any non-trivial repo): set either
Service → Settings → Build → Base directory: /apps/api, orService → Settings → Build → Dockerfile path: apps/api/Dockerfile.
- If you want Nixpacks regardless of the Dockerfile: set
buildPack: "nixpacks"(or"auto"won't help — explicit override wins). - If your Dockerfile is more than 2 levels deep (e.g.
services/payments/api/Dockerfile): setbaseDirto the directory containing it, or setdockerfilePathto the full path.
The deploy log prints the path it picked: 📁 Auto-detected Dockerfile at apps/api/Dockerfile (depth 1).
🔑 13. ninedeploy sources keygen Fails With "ssh-keygen: command not found"
Symptoms:
- The CLI/Web generate-deploy-key flow returns a 500 with
ssh-keygen: command not found(or similar) in the error message. - Server log shows the same error originating from
lib/sshKey.ts.
Cause:
- The bare-metal installer's
apt-get install -y ...step pulls inopenssh-client(thesshbinary) on Debian/Ubuntu but not on every minimal container image. TheDockerfileprovided by this repo installsopenssh-clientexplicitly; if you built a custom image without it, server-side key generation is unavailable.
Resolution:
- Bare-metal:
sudo apt-get install -y openssh-client, then re-run the keygen. - Docker: rebuild the panel image with
apt-get install -y openssh-clientin your customDockerfile, or fall back to the manual workflow (§4.3 inPRIVATE_REPO_GUIDE.md) — generate a key on your workstation withssh-keygen -t ed25519, paste the private key into the source's "SSH deploy key" field. - Verify the binary is on
PATHinside the container:bashdocker exec ninedeploy ssh-keygen -V
🚪 14. Locked Out by the Panel IP Allow-List
Symptoms:
- Signing in, or any page after it, answers
403 panel_access_denied: "This panel only accepts sign-ins from its listed addresses".
Cause:
- Settings → Security → Panel access is on and your current address is not in the list. This happens, for example, after your ISP changed your IP, or when you connect through a VPN.
Resolution:
- Bare metal: loopback is always allowed, so you can open an SSH tunnel and sign in through it:
ssh -L 3000:127.0.0.1:3000 you@panel-host, then go tohttp://localhost:3000. Alternatively, addNINEDEPLOY_PANEL_ACCESS=offto the panel's.envand runsudo systemctl restart ninedeploy. - Docker: add
NINEDEPLOY_PANEL_ACCESS=offto/opt/ninedeploy-docker/.env, then rundocker compose up -dthere. Check thatdocker-compose.ymlpasses the variable: it should listNINEDEPLOY_PANEL_ACCESS: ${NINEDEPLOY_PANEL_ACCESS:-on}underenvironment. A compose file from a release older than this feature does not; add that line, or re-run the installer, which writes the current file. In Docker mode, a browser on the host reaches the panel through the Docker bridge, not loopback. - Sign in, fix the list, then remove the variable and restart once more so the list applies again.
Source guide (installer links and live inventory counts are normalized for this site): docs/TROUBLESHOOTING.md.