Skip to content

Custom Domains

Nix edited this page May 25, 2026 · 3 revisions

Custom Domains

Custom Domains let you share a local app through a hostname you control, such as demo.example.com.

Random public URLs work without an account, custom domain, DNS setup, or Cloudflare token. Custom domains are for users who want to use their own hostname.

Requirements

You need:

  • A Cloudflare account.
  • Your own domain or zone managed by Cloudflare.
  • Your own API token with permissions for tunnel and DNS management.
  • A local app detected by GhostlyShare.
  • A working desktop secret store for saving the token.

Token Storage

GhostlyShare stores your Cloudflare API token in the operating system's secure user storage. Do not paste the token into public issues, logs, or support requests.

Platform Storage
Windows Windows DPAPI current-user protection
Linux Desktop Secret Service through secret-tool / libsecret

On Ubuntu and Debian, the .deb package depends on libsecret-tools.

Check whether secret-tool is installed:

command -v secret-tool

Install it if needed:

sudo apt update
sudo apt install libsecret-tools

What If secret-tool Is Missing

Random URLs still work.

Custom-domain token saving will fail because GhostlyShare cannot securely store the Cloudflare token. You may see an error similar to:

Secure credential storage command 'secret-tool' is not available.

If secret-tool exists but the desktop keyring is unavailable or locked, you may see:

Secure credential storage command 'secret-tool' failed.

On normal Ubuntu GNOME sessions this usually works automatically because the desktop keyring is started and unlocked during login.

Removing Token or Local Data

If GhostlyShare offers a token or local-data cleanup option in app settings, use that first. You can also remove GhostlyShare local data manually if needed, but only remove files that belong to GhostlyShare.

Uninstalling the app package does not always remove settings, logs, cached tunnel files, or secure token entries from your user profile.

What GhostlyShare Creates

When setting up a custom URL, GhostlyShare can:

  • Create a Cloudflare tunnel.
  • Configure tunnel ingress.
  • Create a proxied CNAME DNS record for your hostname with Cloudflare automatic TTL.
  • Start a managed cloudflared tunnel process.
  • Save a reusable session entry for the selected app and hostname.

Why Custom Domains Can Take Longer

Custom domains involve more than starting a tunnel:

  • DNS records must exist.
  • Cloudflare has to route the hostname to the tunnel.
  • DNS caches may still remember old results.
  • The first request may arrive before every edge location is fully ready.

If a custom URL does not answer immediately after setup, wait and refresh. This is especially normal right after changing DNS.

Running and Password Protection

Your local app, GhostlyShare, and your computer must keep running while the custom link should work.

Custom domains can also use optional password protection when it is enabled before going public. Visitors must enter the password before GhostlyShare forwards traffic to the local app.

The custom-domain resources are temporary for the current GhostlyShare run. When sharing stops normally, GhostlyShare attempts to remove the managed DNS record and Cloudflare tunnel. If GhostlyShare is force-killed, cleanup may not finish.

Cleanup

When GhostlyShare closes normally, it attempts to clean up managed tunnel sessions and stop managed tunnel processes.

If the app is killed forcefully, cleanup may not run. You can inspect or remove leftover DNS records and tunnels in Cloudflare if needed.

Clone this wiki locally