Docs / Getting Started / Server Setup

Server Setup

Before starting sh0, you only need to do two things: set your server's hostname and point your DNS to it. sh0 handles everything else.

Start with a Clean Server

sh0 is designed to be installed on a fresh server. It manages Docker, Caddy, and all networking automatically. Using a clean server avoids conflicts with existing services on ports 80 and 443.

Note
You do not need to install Docker or Caddy manually. When you run sh0 serve as root, it detects missing dependencies and installs them for you.

Set the Hostname

Set your server's hostname to match the domain you will use for the sh0 dashboard. This ensures SSL certificates and reverse proxy routing work correctly.

Terminal
# Set the hostname (replace with your actual domain)
sudo hostnamectl set-hostname panel.example.com

Then update /etc/hosts so the server can resolve its own hostname:

/etc/hosts
# Add this line (use your server's public IP)
203.0.113.10    panel.example.com

Verify the hostname is set:

Terminal
hostname -f
# Should output: panel.example.com

Configure DNS

In your DNS provider (Cloudflare, Namecheap, Route 53, etc.), create two A records pointing to your server's IP address:

TypeNameValuePurpose
Apanel.example.comYour server IPsh0 dashboard
A (wildcard)*.example.comYour server IPDeployed apps get automatic subdomains
Wildcard DNS
The wildcard record (*.example.com) lets sh0 automatically assign subdomains like myapp.example.com to each deployed app. Without it, you will need to create individual DNS records for each app.

Start sh0

Once your hostname and DNS are configured, start sh0 with your domain:

Terminal
sh0 serve --panel-domain panel.example.com --base-domain example.com

On first run, sh0 will:

  1. Detect and install Docker Engine if missing
  2. Detect and install Caddy (reverse proxy) if missing
  3. Initialize the database and generate encryption keys
  4. Start the dashboard on port 9000
  5. Provision SSL certificates via Let's Encrypt
Note
DNS propagation can take a few minutes. If SSL provisioning fails on the first attempt, wait a moment and restart sh0. Caddy will retry automatically.

What sh0 Installs Automatically

When running as root on Linux, sh0 serve automatically provisions these dependencies if they are not already present:

DependencyInstall MethodPurpose
Docker Engineget.docker.comContainer runtime for deployed apps
CaddyOfficial APT repo or binary downloadReverse proxy with automatic SSL

You can also run the provisioning checks without starting the server:

Terminal
sh0 setup