First Deployment
Step 1: Create a Project
Section titled “Step 1: Create a Project”- Log into the VPS Deployer web UI
- Navigate to Projects → Create
- Fill in the form:
| Field | Description |
|---|---|
| Name | A friendly name for your project |
| GitHub URL | Your repository URL (HTTPS or SSH) |
| Branch | The branch to deploy from (e.g., main) |
| Auto Deploy | Enable to deploy automatically on push |
| Email Notifications | Enable to receive deployment alerts |
- Click Create
After creation, you’ll see the project details page with your unique webhook URL and secret.
Step 2: Add Build Commands
Section titled “Step 2: Add Build Commands”On the project details page, add your deployment commands in order. For example:
1. git pull origin main2. npm install3. npm run build4. pm2 restart appStep 3: Configure the GitHub Webhook
Section titled “Step 3: Configure the GitHub Webhook”- Copy the webhook URL and webhook secret from the project details page
- Go to your GitHub repo: Settings → Webhooks → Add webhook
- Configure:
| Setting | Value |
|---|---|
| Payload URL | Your webhook URL (e.g., http://your-vps:3000/webhook/<project-id>) |
| Content type | application/json |
| Secret | The webhook secret from VPS Deployer |
| Events | Just the push event |
- Click Add webhook
Step 4: Deploy
Section titled “Step 4: Deploy”Automatic (with webhook)
Section titled “Automatic (with webhook)”Push to your configured branch:
git push origin mainVPS Deployer will receive the webhook, verify the signature, and start deploying.
Manual
Section titled “Manual”Click the Deploy button on the project details page in the web UI. This triggers a deployment immediately without waiting for a webhook.
Step 5: Monitor
Section titled “Step 5: Monitor”Navigate to Deployments to see:
- Deployment status (running, success, failed)
- Duration
- Real-time log output
- Command-by-command results
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| Webhook not firing | Check GitHub webhook delivery logs for errors |
| Deployment stuck | Check journalctl --user -u vps-deployer -f for server logs |
| Command fails | Review deployment logs — each command’s output is captured |
| Permission denied | See Privileged Commands for sudoers setup |
Next Steps
Section titled “Next Steps”- Managing Projects — full CRUD operations
- GitHub Webhook Setup — detailed webhook configuration
- Viewing Logs — understanding deployment output