Move the Hub to a new domain
Use this when your domain is expiring or you want a new one. The old domain keeps working until the last step, so nothing goes down while you move.
1. Point the new domain at the Hub
Section titled “1. Point the new domain at the Hub”Create the same DNS records on the new domain that the old one has: an A
record for the Hub (e.g. hub.new.example → 203.0.113.10) and one for every
app domain. Wait until they resolve:
dig +short hub.new.example2. Move the Hub’s own address
Section titled “2. Move the Hub’s own address”On the Hub’s server, edit /opt/asdl-hub/.env:
PUBLIC_URL=https://hub.new.exampleOIDC_EXTRA_AUDIENCES=https://hub.old.exampleWG_ENDPOINT=hub.new.example:51821OIDC_EXTRA_AUDIENCESkeeps GitHub deploys working from workflows that still sayhub: https://hub.old.example. Remove it once every workflow uses the new address.WG_ENDPOINTis where nodes dial the Hub’s WireGuard tunnel. Keep the same port. Nodes pick up the new address on their next heartbeat: each agent checks that it resolves, then updates its tunnel and its WireGuard config. Agents older than December 2026 don’t, so update them first, or change theEndpointline in/etc/wireguard/asdl-*.confon those nodes by hand.
Add the new name to the dashboard’s nginx site
(/etc/nginx/sites-available/asdl-hub) next to the old one, get a
certificate for it, and restart:
sudo certbot --nginx -d hub.new.examplesudo systemctl restart asdl-hubCheck every node still shows online with asdl-hub nodes.
3. Move the apps
Section titled “3. Move the apps”Set each app’s domain to its new name. The Hub writes the route and gets a certificate:
asdl-hub app set myapp domain=myapp.new.exampleThen update the hub: address in each repository’s deploy workflow.
4. Keep old links working
Section titled “4. Keep old links working”Until the old domain expires, redirect it to the new one so bookmarks and
links still work. In nginx, a 308 keeps the method and body, so API calls
are redirected correctly too:
server { listen 443 ssl; server_name myapp.old.example; ssl_certificate /etc/letsencrypt/live/myapp.old.example/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/myapp.old.example/privkey.pem; return 308 https://myapp.new.example$request_uri;}Don’t forget things outside the Hub that store the address: OAuth redirect URLs, webhooks, phones or laptops with a WireGuard profile for the Hub, and email addresses on the old domain.