deployship
Docs
Server Setup

Server Setup

Requirements

  • Ubuntu 20.04 or 22.04 LTS (recommended)
  • Root or a user with sudo access
  • 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/v1/servers/init.sh | sudo bash -s "YOUR_PUBLIC_SSH_KEY"

The script installs and configures the following on your server:

  • 2GB Swap Space — protects against Linux Out-Of-Memory (OOM) crashes during heavy build or compilation tasks
  • Git — for cloning and pulling repositories
  • Node.js (LTS) — runtime for Node.js applications
  • PM2 with Systemd Boot Persistence — process manager configured with systemd startup so your applications automatically resurrect after server reboots
  • PM2 Logrotate — automated log compression and rotation to prevent logs from filling your disk
  • Caddy — reverse proxy that handles domain routing and automatic SSL certificate provisioning via Let's Encrypt
  • Docker Engine — container runtime with systemd boot auto-start enabled
  • A deploy_user system user — a dedicated user with session lingering enabled 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?