Share on your domain
With your own domain, a shared site keeps the same address every time, for example shop.dev.example.com. You need a domain whose DNS is on Cloudflare (a free plan works).
Set it up
Section titled “Set it up”In Settings › Sharing, choose Your domain, then:
-
Create a Cloudflare API token. In Cloudflare, choose Create Custom Token and add three permissions:
Scope Permission Access Account Cloudflare Tunnel Edit Zone DNS Edit Zone Zone Read Under Zone Resources, choose Include › Specific zone › the domain you’ll share on.
-
Paste it and check it. DevKit lists the domains the token can see.
-
Choose the domain and address, then connect. The address pattern uses
{site}for the site’s name, like{site}.example.comor{site}-dev.example.com.
Keep the pattern one level below the domain: Cloudflare’s free certificate covers *.example.com but not *.dev.example.com.
Connecting switches sharing to your domain; you can go back to random addresses in the same place, and DevKit remembers which you chose. It creates one tunnel for this computer, named devkit-<computer name>, and a DNS record for each site you share. Stopping sharing removes that site’s record.
Where the token is kept
Section titled “Where the token is kept”DevKit stores the token in a file in its settings folder that only your user account can read (~/Library/Application Support/DevKit/secrets/sharing.json, permissions 0600). It’s sent only to Cloudflare’s API.
Disconnect
Section titled “Disconnect”Disconnect stops sharing on your domain, deletes the tunnel and its DNS records from your Cloudflare account, and forgets the token. You can also revoke the token in Cloudflare.