weechat-radio:$
UTC --:--:--
LCL --:--

docs › For developers and hub operators › Deploy the hub

weechat-radio:$ Deploy the hub

For people running the public server. Most users never need this page.

What you need

  • A DigitalOcean account
  • Domainweechatradio.com (already owned for the public hub)
  • A 2 GB Ubuntu LTS droplet
  • A GitHub repowith Actions secrets: DROPLET_HOST, DROPLET_USER, DROPLET_SSH_KEY
One droplet serving the site and the hub Traffic arrives on port 443. Caddy terminates HTTPS and serves the static site for weechatradio.com, and proxies hub.weechatradio.com to the wcr hub container. internet visitors + nodes one droplet · ubuntu + docker compose 443 Caddy certs, one config weechatradio.com static files from web/ hub.weechatradio.com wcr hub · /ws and /api pushing to main rebuilds the image and restarts compose on the droplet
One droplet. Caddy serves the website and proxies the hub.

DNS

Create A records, all pointing at the droplet IP:

  • weechatradio.com
  • www.weechatradio.com
  • hub.weechatradio.com
  • api.weechatradio.com

Steps

Steps 1 to 5 set up a new droplet once. After that, each push to main redeploys.

  1. Create the droplet

    Create a 2 GB Ubuntu droplet in a region close to you. Allow ports 22, 80, 443.

  2. Copy the deploy files

    Copy deploy/ to the droplet (or clone this repo).

  3. Set the domain

    Copy deploy/.env.example to /opt/wcr/.env and set WCR_DOMAIN=weechatradio.com.

  4. Start the stack

    Point cloud-init at deploy/cloud-init.yaml on first boot, or run:

    cd /opt/wcr
    docker compose -f deploy/docker-compose.yml up -d
  5. Wait for certificates

    Caddy issues certificates for the three names. Wait a minute.

  6. Push to redeploy

    GitHub Actions workflow .github/workflows/deploy.yml rebuilds the hub and path images and runs docker compose pull && up -d on each push to main. The path helper answers /api/path on the main site.

App version vs website

The website and hub image update on every push to main. That does not bump the app version and does not make wcr update download anything.

Bump Cargo.toml, the README badge, OpenAPI version, the numbered changelog, and a v* tag only when wcr / wcr-gui behaviour (or the bits inside the binary) change. wcr update follows those tags.

Backups

Production uses SQLite in the hub container (/data/hub.db and telemetry DB). Optional nightly copy:

docker compose -f deploy/docker-compose.yml exec -T hub \
  sh -c 'tar -czf - /data/*.db' > /var/backups/wcr-sqlite-$(date +%F).tar.gz

How you know it worked

  • https://weechatradio.com shows the homepage, and /map.html the map
  • https://hub.weechatradio.com/healthz prints ok
  • https://hub.weechatradio.com/version shows the commit you just pushed
  • wcr node on a laptop connects to wss://hub.weechatradio.com/ws