Universal deployment toolkit for managing multiple projects on a single server with GitHub webhook support — built with TypeScript/Node.js.
ODeply automates system setup, PM2 process management, Nginx reverse proxy, SSL certificates, firewall configuration, and GitHub webhook auto-deployment — all driven by simple Bash-style config files.
- Ubuntu / Debian server (apt-based)
- Node.js 18+ (installed automatically via nvm)
- Git
git clone <your-repo> odeploy && cd odeploy
./scripts/install.shThis installs odeploy as a global CLI command. You can then use it anywhere.
git clone <your-repo> odeploy && cd odeploy
# Use directly with node (after building)
node dist/cli.js <project> deploy# Server-wide settings
cp system.example.sh config/system.sh
nano config/system.sh
# Your project
cp config/example.sh config/apps/your-app.sh
nano config/apps/your-app.shsudo odeploy system installsudo odeploy your-app deployYour application is live. Subsequent deploy commands pull the latest code, rebuild, and restart services automatically.
- Create a config file:
cp config/example.sh config/apps/your-new-app.sh
nano config/apps/your-new-app.sh- Deploy:
sudo odeploy your-new-app deploy| Command | Description |
|---|---|
odeploy <app> deploy |
Deploy (auto-installs on first run) |
odeploy <app> status |
Show PM2 + Nginx status |
odeploy <app> logs |
Tail PM2 logs |
odeploy <app> logs --service web |
Logs for specific service |
odeploy <app> restart |
Restart PM2 services |
odeploy <app> stop |
Stop all services |
odeploy <app> rollback |
Restore previous backup |
odeploy <app> clean |
Remove project (destructive) |
| Command | Description |
|---|---|
sudo odeploy system install |
Install system dependencies |
sudo odeploy system webhook |
Install/configure webhook server |
odeploy list |
List all configured projects |
Each project has its own config file in config/apps/<name>.sh:
PROJECT_NAME="myapp"
INSTALL_DIR="/home/deployer/apps/myapp"
GIT_REPO="git@github.com:your-org/your-repo.git"
GIT_BRANCH="main"
RUNTIME="node" # node | python | go | rust | custom
PKG_MANAGER="pnpm" # pnpm | npm | yarn
BUILD_CMD="" # e.g. "pnpm build"
START_CMD="pnpm start" # required
SERVICES='[
{"name": "web", "port": 3000, "domain": "example.com", "extra_domains": ["www.example.com"]}
]'
declare -A ENV_VARS
ENV_VARS["NODE_ENV"]="production"
ENV_VARS["DATABASE_URL"]="postgresql://..."When system webhook is installed, you can trigger deployments via HTTP:
# Deploy a project
curl -X POST https://deploy.example.com/deploy/myapp \
-H "X-Hub-Signature-256: sha256=<your-secret>"Set up GitHub webhooks pointing to https://deploy.example.com/deploy/<project-name>.
odeploy (TypeScript CLI)
├── src/cli.ts # Commander-based entry point
├── src/commands/ # Per-project commands
│ ├── deploy.ts # First-time + update deploy
│ ├── status.ts # PM2 + Nginx status
│ ├── logs.ts # Log tailing
│ ├── restart.ts # Process restart
│ ├── stop.ts # Process stop
│ ├── rollback.ts # Backup restore
│ ├── clean.ts # Project removal
│ ├── system-install.ts # System setup
│ └── system-webhook.ts # Webhook server install
├── src/lib/ # Core libraries
│ ├── shell.ts # Shell exec + logging
│ ├── config/loader.ts # Bash config parser
│ ├── nginx.ts # Nginx config generation
│ ├── pm2.ts # PM2 process management
│ ├── git.ts # Git operations
│ ├── build.ts # Build + dependency install
│ └── firewall.ts # UFW management
└── src/webhook/server.ts # Express webhook server
- CLI: TypeScript + Node.js + Commander
- Webhook: Express.js
- Process Manager: PM2
- Reverse Proxy: Nginx
- SSL: Let's Encrypt (Certbot)
- Firewall: UFW