Skip to content
CloudZH

Docs / Getting started

Installation

About 15 minutes from a fresh Ubuntu to the first login.

First time?

The Customer guide explains every step, from your account and license email to Ubuntu and the first login.

<user> is the Linux user you created while installing Ubuntu, <server-ip> the address of the server in your home network, for example 192.168.1.200. On the server, ip -4 -br addr shows it in the line of the network adapter. More in Placeholders.

CloudZH Setup in the browser

The quickest way, no file copying and no questions in the terminal:

  1. Copy your command

    In your customer account under My licenses → CloudZH Setup, click Create command and copy it. It is personal, valid for 24 hours and works for up to 3 downloads.

  2. Paste it on the server

    Over SSH or directly at the server's screen. It downloads the installer, checks its SHA-256 checksum and starts the setup assistant:

    curl -fsSL https://account.cloudzh.app/i/<your-code> | sudo bash
  3. Continue in the browser

    Open the address shown in the terminal on a PC, laptop or phone in the same network, for example http://192.168.1.200:8000. The assistant checks the system, asks for LAN or domain, the data folder and your license keys, installs with a live progress bar and gives you the backup key as a download. Open dashboard fills in the setup token for you.

    It only answers devices in your home network, needs the access code from the terminal and keeps running if you close the SSH window. Already copied the installer file? sudo bash install.sh --web starts the same assistant.

Install in the terminal

For experts, or to answer the questions on the command line.

  1. Update Ubuntu

    sudo apt update && sudo apt full-upgrade -y
    sudo reboot
  2. Copy the installer to the server

    Download the installer in your customer account under My licenses → Download installer, a file named like cloudzh-0.77.5-stable-customer.tar.gz. The page also shows its SHA-256 checksum. Copy it over from your computer, then unpack it on the server. <file> is the name of the installer file:

    scp <file> <user>@<server-ip>:~
    ssh <user>@<server-ip>
    mkdir -p ~/cloudzh && tar xzf ~/<file> -C ~/cloudzh --strip-components=1
    cd ~/cloudzh
  3. Run the installer

    sudo bash install.sh

    The installer asks for your domain (leave it empty for LAN mode), the Cloudflare token and your license key. Then confirm the new server in the email we send you, or in your customer account under Licenses; the server activates by itself. To pass the key without questions:

    sudo CZH_LICENSE_KEY=CZL-XXXXX-XXXXX-XXXXX-XXXXX bash install.sh

    At the end it prints the dashboard address, a setup token and, on a new server, where the backup key is. Save the backup key in your password manager; without it, backups cannot be opened:

    sudo cat /etc/cloudzh/backup.key
  4. Sign in and check

    Open the dashboard address, enter the setup token and create your administrator. Lost the token? zh token shows it again. Then, on the server:

    zh status
    zh doctor

    Continue with Domain & HTTPS and First steps.

What the installer sets up

  • Docker, Caddy, the dashboard and the agent as systemd services
  • The data tree under /srv/data (see Data layout)
  • Fail2Ban and the SSH greeting with a short status
  • The diagnostics kit: speed test, mtr, iperf3, dig, smartctl, sensors, ethtool, iw, htop, ncdu
  • The zh command for every user with sudo rights
Already installed?

Activate a license on an existing server with sudo zh license activate CZL-… or in the dashboard under My account → Subscription.