Page 5 of 5

Troubleshooting & FAQ

Find solutions for common installation errors, script failures, permission problems, and architectural edge cases.

Common Issues & Solutions

1

Permission Denied / EACCES Errors

Symptom: Build logs show failures like npm error EACCES: permission denied, open 'package-lock.json', or Permission denied to write to .cicdlog/app.pid.

Cause: The codebase directory or logs folder belongs to a different user, or the deployment was run with root but the application is dropping privileges to the sandboxed service account user.

Solution: CICD has a built-in recursive ownership alignment mechanism. It forces all repository and configuration files to belong to the service account. If things are stuck, trigger a clean reinstall using the CLI:

cicd reinstall <service-name>

This wipes the system caching, resets file ownership recursively, resets permissions, and restarts from scratch.

2

PM2 Deployments Get User 'root'

Symptom: You run PM2 in run.sh, but PM2 processes are registered under the root user instead of the sandboxed service user.

Cause: PM2 stores configuration inside the home folder (~/.pm2). If the HOME and USER environment variables are not dropped correctly by the runner, PM2 defaults to root's directory.

Solution: CICD dynamically overrides HOME, USER, and utilizes credential drops during daemon fork execution. In your run.sh, make sure you write the PM2 PID into $CICD_PID_FILE:

# Inside .cicd/run.sh
pm2 delete "$CICD_SERVICE_NAME" 2>/dev/null || true
pm2 start index.js --name "$CICD_SERVICE_NAME"
pm2 pid "$CICD_SERVICE_NAME" > "$CICD_PID_FILE"
3

Webhook Triggers but Nothing Deploys

Symptom: Git push is made, GitHub webhook status returns success (200 OK), but the server shows no deployment logs.

Cause: The commit was pushed to a branch other than the one configured (e.g. pushed to develop while CICD monitors main), or the service is pinned to an active commit.

Solution: Check the orchestrator dashboard or list services with cicd list to check if the project is pinned. Unpin with:

cicd unpin <service-name>
4

No Magic Link Emails Arrive

Symptom: You set an admin email, but you do not receive magic link emails to log in to the dashboard.

Cause: Passing --admin-email requires active SMTP credentials flags (--smtp-host, --smtp-port, --smtp-user, --smtp-pass). Without them, the server cannot transmit emails.

Solution: If you do not want to configure SMTP, you can retrieve the login token directly from the server CLI. Run:

cicd token

If you want to force regenerate a new secure onboarding token, run:

cicd token --force

Alternatively, print full configuration parameters and links with cicd info.

5

WSL Errors: Permission denied to app.pid

Symptom: On WSL (Windows Subsystem for Linux), deployments fail on launch showing permission denied on the app.pid file.

Cause: WSL handles file permissions and user mapping differently from native Linux. Ownership synchronization during startup can cause a race condition.

Solution: Ensure your WSL user is added to the sudoers list, or run the orchestrator with --public-ip 127.0.0.1 to test locally without daemon privileges.

Frequently Asked Questions

Can I deploy multiple apps on one VPS?
Yes. The orchestrator is always running in multi-project mode. You can register projects by passing their details via CLI flags (e.g. running sudo ./cicd --repo-url ... for each repository) or by clicking "New Project" in the web dashboard UI at port 9641.
Where is the SQLite database stored?
To ensure persistence regardless of which system user executes commands, the database is stored at the hardcoded path:
/etc/cicd/data/cicd.db
This path is protected and owned by the root account.
How does the auto-rollback work?
When a deployment completes, CICD starts a 15-second stabilization timer. It then runs .cicd/health.sh (or tests the process port and restarts). If the app crashes or fails the check, CICD marks the deploy as failed, looks up the last successful commit in SQLite, and performs an automatic rollback deployment.
How do I access logs for my app?
You can tail live deployment logs using the CLI:
cicd log <service-name>
Global system orchestration logs can be checked with:
cicd log
Alternatively, you can view, search, and download full historical logs directly inside the project cards on the web dashboard.
How do I update the CICD binary?
To update the orchestrator daemon to the latest release, run the universal script:
curl -fsSL https://cicd.rf.gd/install.sh | sh
cicd restart
The background systemd service will reload and apply the update without interrupting your running applications.
← CLI Reference All Documentation Hub