Skip to content

Custom Domains

Nix edited this page May 15, 2026 · 3 revisions

Custom Domains

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

Requirements

You need:

  • A Cloudflare account.
  • A zone managed by Cloudflare.
  • An 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.

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.

What GhostlyShare Creates

When setting up a custom URL, GhostlyShare can:

  • Create a Cloudflare tunnel.
  • Configure tunnel ingress.
  • Create a DNS record for your hostname.
  • 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.

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