Skip to main content

Custom Domain Setup

Your PCS comes with a .nsl.sh domain that works automatically. But if you own a domain (e.g. mycloud.com), you can point it to your PCS so your apps are accessible at photos.mycloud.com, files.mycloud.com, etc.

Before You Start​

What You Need​

  • A registered domain name (from any registrar: Namecheap, Google Domains, GoDaddy, OVH, etc.)
  • Access to your domain's DNS settings
  • Your PCS's public IP address (find it in Admin Panel → System Information)
  • Your PCS's sslip.io address (shown in Admin Panel → Domain)

Understanding Your Options​

MethodProsCons
Cloudflare (recommended)DDoS protection, hides your IP, automatic HTTPS, CDN, free plan availableTraffic passes through Cloudflare
Direct DNSFull control, true end-to-end encryptionYour IP is exposed, you manage HTTPS yourself, no DDoS protection

Cloudflare is the recommended method. It handles HTTPS termination, hides your origin IP, and provides DDoS protection — all on a free plan.

Step 1: Add Your Domain to Cloudflare​

  1. Go to cloudflare.com and create a free account.
  2. Click Add a site and enter your domain (e.g. mycloud.com).
  3. Select the Free plan.
  4. Cloudflare will scan your existing DNS records.
  5. Review the records and click Continue.

Step 2: Update Your Nameservers​

  1. Cloudflare will show you two nameservers (e.g. ada.ns.cloudflare.com and bob.ns.cloudflare.com).
  2. Go to your domain registrar (where you bought the domain).
  3. Find the Nameservers or DNS settings.
  4. Replace the existing nameservers with the two Cloudflare nameservers.
  5. Save. Nameserver changes can take up to 24 hours to propagate, but usually complete within 1–2 hours.

Step 3: Create DNS Records​

Once Cloudflare is managing your domain:

  1. Go to DNS → Records in the Cloudflare dashboard.
  2. Click Add record.

For a Subdomain (e.g. cloud.mycloud.com)​

FieldValue
TypeCNAME
Namecloud (or whatever subdomain you want)
TargetYour sslip.io address (e.g. 203-0-113-42.sslip.io)
Proxy statusProxied (orange cloud ON)

For the Root Domain (e.g. mycloud.com)​

FieldValue
TypeCNAME
Name@
TargetYour sslip.io address (e.g. 203-0-113-42.sslip.io)
Proxy statusProxied (orange cloud ON)

For Wildcard (All Subdomains)​

To make all subdomains (like photos.mycloud.com, files.mycloud.com) point to your PCS:

FieldValue
TypeCNAME
Name*
TargetYour sslip.io address
Proxy statusProxied (orange cloud ON)
tip

Using a wildcard record means any new app you install on your PCS will automatically be accessible at <app>.mycloud.com without adding more DNS records.

Step 4: Configure SSL/TLS​

  1. In Cloudflare, go to SSL/TLS → Overview.
  2. Set the encryption mode to Full or Full (strict).
    • Full — Encrypts traffic between Cloudflare and your PCS (recommended)
    • Full (strict) — Also validates the PCS certificate (requires a valid certificate on your PCS)
  3. Do NOT use Flexible — this would leave the connection between Cloudflare and your PCS unencrypted.

Step 5: Configure Your PCS​

  1. Go to Admin Panel → Domain.
  2. Enter your custom domain in the domain settings.
  3. The PCS will configure Caddy to accept requests for your custom domain.

Verify It Works​

  1. Open your custom domain in a browser (e.g. https://cloud.mycloud.com).
  2. You should see your PCS default application.
  3. Try accessing an app (e.g. https://immich.mycloud.com or https://immich-cloud.mycloud.com depending on your subdomain setup).

Option 2 — Direct DNS (No Cloudflare)​

If you prefer not to use Cloudflare and want full control:

Step 1: Create DNS Records​

At your domain registrar or DNS provider:

FieldValue
TypeA
Name@ (or your subdomain)
ValueYour PCS's public IP address
TTL300 (5 minutes, for quick updates if IP changes)

For a wildcard:

FieldValue
TypeA
Name*
ValueYour PCS's public IP address

Step 2: HTTPS Certificates​

Without Cloudflare, you need to handle HTTPS yourself:

  • Caddy on your PCS can automatically obtain Let's Encrypt certificates if:
    • Port 80 and 443 are accessible from the internet
    • Your domain's DNS correctly points to your PCS
  • If your ISP blocks ports, this method won't work — use Cloudflare instead.

Step 3: Dynamic IP Handling​

If your IP changes (common with residential internet):

  • With Cloudflare, you can use the Cloudflare API to automatically update the DNS record when your IP changes.
  • With direct DNS, you'll need to manually update the A record each time your IP changes, or set up a dynamic DNS (DDNS) service.

Once your domain is set up on Cloudflare, these additional settings are recommended:

Security​

  • SSL/TLS → Always Use HTTPS: ON
  • SSL/TLS → Minimum TLS Version: TLS 1.2
  • Security → Bot Fight Mode: ON (helps block automated attacks)

Performance​

  • Speed → Auto Minify: Enable for JavaScript, CSS, and HTML
  • Caching → Browser Cache TTL: 4 hours
  • Caching → Always Online: ON (shows cached version if your PCS is temporarily down)

Page Rules (Optional)​

Create a page rule for http://*mycloud.com/* → Always Use HTTPS to force all traffic to HTTPS.

Troubleshooting​

IssueSolution
"Too many redirects" errorSet SSL/TLS mode to Full, not Flexible.
502 Bad GatewayYour PCS is down or Caddy isn't running. Check from Admin Panel → Health.
DNS not resolvingWait for propagation (up to 24 hours). Verify records with nslookup yourdomain.com.
Certificate errorIf using direct DNS, ensure ports 80 and 443 are open. If using Cloudflare, ensure Proxy is enabled.
Apps not accessible on custom domainVerify the PCS is configured to accept the custom domain in Admin Panel → Domain.

Privacy Note​

With the Cloudflare option, Cloudflare's edge terminates HTTPS and can see your traffic in transit. For strict end-to-end encryption, use your sslip.io address directly.

See TLS & Privacy for the full comparison.

tip

Your PCS's sslip.io address and public IP are shown in Admin Panel → System Information. The examples on this page (203-0-113-42, mycloud.com) are placeholders — use your actual values.