Server Setup
Requirements
- Ubuntu 20.04 or 22.04 LTS (recommended)
- Root or a user with
sudoaccess - A static IP address
- Port 22 open for inbound SSH connections
Other Linux distributions work but are not officially tested.
Initialization Script
When you add a server in the DeployShip dashboard, you will be instructed to run a one-time initialization script. Run this on your server as root. You must provide your Public SSH Key as an argument:
curl -sSL https://api.deployship.app/servers/init.sh | sudo bash -s "YOUR_PUBLIC_SSH_KEY"
The script installs and configures the following on your server:
- Git — for cloning and pulling repositories
- Node.js (LTS) — runtime for Node.js applications
- PM2 — process manager for keeping applications alive and restarting them after server reboots
- Caddy — reverse proxy that handles domain routing and automatic SSL certificate provisioning via Let's Encrypt
- Docker Engine — required for deploying projects using a
docker-compose.ymlfile - A
deploy_usersystem user — a dedicated user that DeployShip uses for all SSH connections. This user is added to the Docker group.
The script also automatically configures your firewall (UFW) to allow SSH, HTTP, and HTTPS traffic.
Was this page helpful?