Docs / Getting Started / Installation

Installation

Get sh0 running on a clean server in under a minute. One command downloads the binary -- sh0 handles all dependencies automatically.

System Requirements

RequirementMinimumRecommended
OSLinux (any distro)Ubuntu 22.04+ / Debian 12+
RAM1 GB2 GB+
Disk10 GB20 GB+ (SSD)
CPU1 vCPU2 vCPUs+
DockerAuto-installed by sh0 if missing
Note
sh0 itself uses very little memory (around 30 MB). The RAM requirement is primarily for Docker and the applications you deploy. A 1 GB server can comfortably run sh0 plus 2-3 small apps.

Supported Platforms

sh0 provides pre-built binaries for the following architectures:

  • x86_64 (AMD64) -- Most cloud servers and VPS providers
  • aarch64 (ARM64) -- AWS Graviton, Oracle Ampere, Raspberry Pi 4+
Zero Dependencies
sh0 should be installed on a clean server. When you run sh0 serve as root, it automatically detects and installs Docker and Caddy if they are missing. No manual setup required.

Install sh0

Quick Install (Recommended)

The install script detects your architecture, downloads the latest binary, and sets up the systemd service automatically:

Terminal
curl -fsSL https://sh0.dev/install | sh
Terminal output showing the sh0 install script downloading the binary, setting permissions, and starting the service
The install script completes in a few seconds

The script performs these steps:

  1. Detects your CPU architecture (x86_64 or aarch64)
  2. Downloads the latest sh0 binary to /usr/local/bin/sh0
  3. Sets executable permissions
  4. Creates a systemd service unit
  5. Enables and starts the service

Manual Download

If you prefer to install manually, download the binary directly:

Terminal
# Download the binary (replace ARCH with amd64 or arm64)
curl -L -o /usr/local/bin/sh0 https://sh0.dev/download/latest/sh0-linux-ARCH

# Make it executable
chmod +x /usr/local/bin/sh0

# Start the server
sh0 serve

Verify Installation

Check that sh0 is installed and running:

Terminal
# Check the version
sh0 --version

# Check the service status
systemctl status sh0

# Verify the dashboard is accessible
curl -s http://localhost:9000/api/health
Terminal showing sh0 version output and systemctl status showing the service as active and running
A healthy sh0 installation

The health endpoint should return a JSON response confirming the server is operational:

Health Response
{"data": {"status": "ok", "version": "1.6.0", "uptime": 42}}

Systemd Service Setup

If you used the quick install script, the systemd service is already configured. For manual installations, create the service file:

/etc/systemd/system/sh0.service
[Unit]
Description=sh0 Deployment Platform
After=docker.service
Requires=docker.service

[Service]
Type=simple
ExecStart=/usr/local/bin/sh0 serve
Restart=always
RestartSec=5
Environment=SH0_DATA_DIR=/var/lib/sh0

[Install]
WantedBy=multi-user.target

Then enable and start the service:

Terminal
sudo systemctl daemon-reload
sudo systemctl enable sh0
sudo systemctl start sh0
Tip
The systemd service ensures sh0 starts automatically after a server reboot and restarts if it crashes. Logs are available via journalctl -u sh0 -f.

Firewall Configuration

sh0 requires the following ports to be accessible:

PortProtocolPurpose
80TCPHTTP traffic (redirects to HTTPS)
443TCPHTTPS traffic for your deployed applications
9000TCPsh0 dashboard and API

If you are using ufw (Ubuntu/Debian):

Terminal
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 9000/tcp
Dashboard Security
Port 9000 provides full access to your sh0 dashboard. In production, consider restricting access to trusted IPs or placing it behind a VPN. You can also configure sh0 to serve the dashboard through Caddy on a custom domain with SSL.

Updating sh0

Updating is as simple as replacing the binary and restarting the service. Your configuration, deployed apps, and data are preserved -- they live in the data directory, not inside the binary.

Terminal
# Download the latest version
curl -fsSL https://sh0.dev/install | sh

# Or manually:
curl -L -o /usr/local/bin/sh0 https://sh0.dev/download/latest/sh0-linux-amd64
sudo systemctl restart sh0
Note
sh0 automatically handles database migrations when it starts. After updating, any schema changes are applied seamlessly.