Browse documentation

Pharos / Docs / v1.4.2

Custom domain and HTTPS

Updated 2026-12-04 · Pharos 1.4.2

Pharos does not set up DNS records or certificates. Your hosting panel or your reverse proxy does that; Pharos only needs to know the address people use. That address is APP_URL in .env. Every link Pharos builds comes from it: in mails to subscribers, in the feed, the badges, the widget and the notifications to your team. An install left on http://localhost sends links that work for nobody.

  • The main address is APP_URL. The admin, the API and the default status page live there. Other pages are at /status/{slug} on the same address.
  • A custom domain is optional, per status page. It serves only the public page of that one status page. The admin and the API stay on the main address, and a host name Pharos does not know answers 404.

On cPanel or DirectAdmin

  1. Point the DNS of the status domain at the hosting server, usually with an A record. Where your host also runs your DNS, creating the domain or subdomain in the panel does this for you.
  2. Get the certificate. cPanel: SSL/TLS Status, then Run AutoSSL. DirectAdmin: SSL Certificates, the free and automatic certificate from Let's Encrypt. Both renew by themselves, but only once the DNS points at the server.
  3. Send plain HTTP to HTTPS: Force HTTPS Redirect under Domains in cPanel, Force SSL with https redirect under Domain Setup in DirectAdmin.
  4. Make sure APP_URL is the https:// address. The web installer takes the address from the page you opened it on, so install over HTTPS if you can. To change it later, edit .env; run php artisan optimize:clear when the configuration is cached, as after a manual install.

For a custom domain of a second status page, add that domain to the same hosting account with the same document root as the status domain (an alias in cPanel, a domain pointer in DirectAdmin), let AutoSSL cover it, and then tell Pharos, as described below.

Docker behind a reverse proxy

The container speaks plain HTTP on port 8080. Let a reverse proxy on the same host hold the certificate and pass requests on. Publish the port on the loopback address only, so nothing but the proxy reaches the container:

APP_URL=https://status.example.com
PHAROS_PORT=127.0.0.1:8080
TRUSTED_PROXIES=172.18.0.1

TRUSTED_PROXIES is the address the proxy connects from, as the container sees it: one address, a CIDR, or several separated by commas. For a proxy on the same host that is the gateway of the Docker network; docker network inspect shows it. Only then does Pharos believe the forwarded headers, see the visitor's IP address for its rate limits, and build https:// links. Leave it empty when no proxy is in front. Run docker compose up -d again after a change so the containers get the new values.

Caddy gets and renews the certificate by itself and sends the forwarded headers Pharos needs:

status.example.com {
    reverse_proxy 127.0.0.1:8080
}

With nginx, bring your own certificate (for example from certbot) and pass the host and scheme on:

server {
    listen 443 ssl;
    server_name status.example.com;
    ssl_certificate     /etc/letsencrypt/live/status.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/status.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port 443;
    }
}

The HTTPS proxy guide lists what to test afterwards: signing in, saving a component and the live preview, all through the public address.

A custom domain for a status page

  1. Point the domain at the same server and the same site as the main address, with a valid certificate. Opening https://status.customer.example must reach this installation.
  2. Under Installation → Status pages, open Edit on the page, type the host name only in Custom domain, tick DNS and TLS verified and press Save page. Only an administrator of the installation can do this.

From then on the page's address on the main domain sends visitors to the custom domain, always over https://. Confirmation and unsubscribe links in mails keep using the main address, so they survive a later change of domain. Do not use the main address itself as a custom domain.

Why passkeys need HTTPS

A browser only offers passkeys on a secure address with a host name, and a passkey belongs to that host name. Pharos takes the host name from APP_URL, and the admin only answers on that address. So passkeys work when APP_URL is an https:// address with a name, such as https://status.example.com. On plain HTTP or an IP address, people sign in with their password and the passkey buttons stay off. See Passkeys.