Skip to content

Docs / Getting started

Domain & HTTPS

CloudZH gives every app its own HTTPS address under your domain, with one wildcard certificate.

On this page example.com stands for your own domain and <server-ip> for the address of the server at home, for example 192.168.1.200. No domain? Then CloudZH runs in LAN mode, see Domain or home network.

DNS records

Create one wildcard record that points to your public IP address. Your root domain and mail can stay where they are.

TypeNameValueProxy
A*your public IPDNS only

Your public IP: on the server, curl -4 -s https://ifconfig.me.

Addresses you get

AddressUse
app.example.comDashboard. The installer asks for the subdomain and suggests dash.
plex.example.comPlex, for apps and friends outside your home
sonarr.example.com and othersAdmin apps, behind the dashboard login
vpn.example.comWireGuard endpoint. Must point straight to your IP, never through the Cloudflare proxy.

Your main domain

Without further setup, example.com itself forwards to the dashboard, and it may as well keep pointing to your existing website or mail host. To serve a static website from the server instead, point the root record to your IP and publish a folder with an index.html:

zh website deploy /home/<user>/my-site
zh website on
zh website status   # shows whether the DNS records already point here

www.example.com then forwards to example.com, and zh website rollback brings back the previous version.

For a server that is only meant for you and your friends, zh website private on keeps the main domain closed: example.com, www and every subdomain that is neither the dashboard nor an app get no answer at all, and nobody is forwarded to your dashboard. zh website private off restores the forwarding.

Certificate

Caddy requests the wildcard certificate through your DNS provider's check (DNS-01), so no port 80 is needed. Enter your API token when the installer asks for it; zh cloudflare-token checks and replaces a Cloudflare token later, and zh ssl provider switches to another provider. Without DNS access, CloudZH uses HTTP validation on port 80. System Health shows when the certificate is valid.

Inside your home network

From home, app.example.com resolves to your public IP and travels through the router and back. Many routers handle this slowly. Add a hosts entry on your computer so it goes straight to the server:

<server-ip>  app.example.com

For example 192.168.1.200 app.example.com. Windows: C:\Windows\System32\drivers\etc\hosts. macOS and Linux: /etc/hosts. The performance diagnosis tells you when this applies.