Sharing
Your sites answer only on your computer until you say otherwise. When you want someone else to see one, or to open it on your phone, there are three ways.
- A public link, for a client or a colleague anywhere: cove share.
- Your local network, for a phone or tablet on the same Wi-Fi: cove lan.
- Your Tailscale network, for your own devices wherever they are: cove tailscale.
A public link#
cove share mysiteCove opens a Cloudflare Quick Tunnel and prints a random address like https://random-words.trycloudflare.com. Anyone with the link can open the site until you press Ctrl+C. Each visit is printed as it happens.
The first time, Cove installs cloudflared, after asking. You need no Cloudflare account. It also needs Python 3, which runs the small proxy in between.
That proxy rewrites your site's own address, https://mysite.localhost, to the public one in pages, stylesheets, scripts, JSON and redirects, so links, images and logins work for the visitor without changing anything in the site's database.
In the background#
To keep the link up without a terminal open:
cove share mysite --background # prints the link and returns
cove share mysite stop # ends it--format=json prints the result as one line of JSON, for scripts and agents. Running cove share with no site asks which one.
The link is public for as long as it runs. Visitors get plain error pages, never Cove's detailed ones, but anything the site itself shows, they see.
Your local network#
For a phone or tablet on the same network, or an iOS app that syncs with a local site:
cove lan enable mysite # gives the site a port on your network
cove lan status # your address, and each shared site's
cove lan disable mysiteEach site gets a port of its own, from 8443 up, and answers at your computer's address on it, for example https://192.168.1.20:8443. On macOS, Cove also advertises the site over Bonjour so apps on the network can find it.
The device has to trust Cove's certificate authority before it accepts the certificate. cove lan trust shows where the certificate is and how to install it: on an iPhone or iPad, AirDrop it over, install the profile, then turn on full trust under Settings → General → About → Certificate Trust Settings.
Your Tailscale network#
With Tailscale on your computer and your other devices, every site is reachable from them, at home or not:
cove tailscale enable # finds your Tailscale name
cove tailscale status # each site's address
cove tailscale disableEach site answers on a port of its own at your computer's Tailscale name, starting at 9001, such as https://laptop.tail1234.ts.net:9001, and the mail inbox on 9901. Only devices on your tailnet get an answer. Your devices need to trust Cove's certificate authority here too.
The dashboard and Adminer stay off the tailnet unless you ask for them with cove tailscale enable --dashboard. They can run commands on your computer, so only do that on a tailnet you alone use.
WordPress on another address#
WordPress stores its own address and normally sends every visitor back to it. On a LAN or Tailscale address, Cove has WordPress take its address from the one the request arrived on, so pages and links stay on the address you opened. The site's stored address doesn't change.
From Windows, under WSL2#
A site running in WSL2 lives on WSL's own virtual network, so a browser on Windows may not find mysite.localhost. Run cove wsl-hosts inside WSL: it prints the lines to add to the Windows hosts file, and the PowerShell to add them.
Something wrong or missing here? Open an issue ↗ Every command also explains itself: cove help <command>.