Deploy Script
GET /api/deploy
Downloads a shell script that bootstraps a new server for srvly management.
What It Does
The script automates server hardening and srvly setup in a single run:
- SSH hardening — disables password authentication, enforces key-only access
- UFW firewall — allows ports 22 (SSH), 80 (HTTP), 443 (HTTPS), denies everything else
- Fail2Ban — bans IPs after 3 failed SSH attempts (1h ban duration)
- Docker installation — installs Docker Engine and Compose plugin
- srvly deployment — clones the repository, generates
.env, starts the stack
Usage
Run this on a fresh Ubuntu 24.04 server as root:
curl -sL https://your-domain.com/api/deploy | bash
For non-root setups, you may need to prepend sudo:
curl -sL https://your-domain.com/api/deploy | sudo bash
Notes
- The script is idempotent — safe to re-run on an already-configured server
- It detects existing Docker and skips reinstallation if already present
- After completion, the server appears in your srvly dashboard
- This endpoint does not require authentication (it's a public setup script)