HTTPS
Serve your station at its own domain over HTTPS, with a certificate that renews itself.
Auvyra comes with an optional HTTPS add-on. It runs Caddy beside Auvyra: Caddy answers on ports 80 and 443, gets a certificate from Let's Encrypt for your domain, renews it before it runs out, and passes visitors on to Auvyra.
The one-line installer sets this up for you when you give it a domain. To add it to a station you already have, follow the steps below.
Before you start
- Your domain, such as
radio.example.com, must point at this server's public IP address (anArecord, and anAAAArecord if the server has IPv6). - Ports 80 and 443 must be open to the internet, in the server's firewall and in your host's. Let's Encrypt checks both before it issues the certificate.
- Nothing else on the server may use ports 80 or 443. If you already run a web server such as nginx, use that as your reverse proxy instead: see Going to production.
Turn it on
Add these lines to .env in your Auvyra folder. Use your database's Compose file in the first line: docker-compose.yml for MongoDB, or docker-compose.postgres.yml, docker-compose.mysql.yml, docker-compose.mariadb.yml or docker-compose.sqlite.yml.
COMPOSE_FILE=docker-compose.yml:docker-compose.https.yml
AUVYRA_DOMAIN=radio.example.com
APP_URL=https://radio.example.com
TRUST_PROXY=true
AUVYRA_PORT=127.0.0.1:3000Then start it:
docker compose up -dCOMPOSE_FILE makes every docker compose command include the HTTPS add-on, so you don't have to name the files each time. AUVYRA_PORT=127.0.0.1:3000 keeps Auvyra itself reachable only through Caddy, so nobody can visit it over plain http by its IP address.
The certificate is fetched the first time someone visits. Open https://radio.example.com and it should load with a padlock within a few seconds.
If the page doesn't open
See what Caddy says:
docker compose logs caddy- "no such host" or a timeout from Let's Encrypt: the domain doesn't point at this server yet. DNS changes can take a while to spread.
- "connection refused" or a timeout on port 80: a firewall is blocking port 80 or 443.
- "too many certificates": Let's Encrypt limits how often one domain can get new certificates. Keep the
caddy-datavolume, which holds the certificate, rather than deleting it.
Turn it off
Remove the COMPOSE_FILE and AUVYRA_DOMAIN lines from .env, set APP_URL back, and run:
docker compose up -d --remove-orphans