Infrastructure
Web Addresses
Give apps and services web addresses with HTTPS, put them on the internet, and add one login for all.
The Web Addresses page gives an app or a service a name like cloud.example.com, with HTTPS. Caddy does the work. You do not edit a config file.
#Addresses for Any Service
Use an address for anything that is not a Bistro app: a service on this box, another machine, or a VM. Open Web Addresses, then Add an Address. Enter the address, where it goes, and optionally a user name and password.
bistro proxy add cloud.example.com 8080
bistro proxy add nas.home 192.168.1.20:5000 --lan
bistro proxy list
bistro proxy remove cloud.example.comThe target is a port on this box, HOST:PORT, or a full URL.
| Option | What it does |
|---|---|
--lan | Answers only devices on this network. Others get 403. |
--auth USER | Asks for a user name and password. Bistro asks for the password and stores a hash. |
--sso | Asks for the single sign-on login first. |
--insecure | The target uses HTTPS with a self-signed certificate. |
A public name gets a certificate from Let's Encrypt. A name ending in .lan, .home, .internal, .home.arpa or .local gets one from Caddy's own authority, for this network. Caddy checks the whole config first. If it fails, the old routes stay.
#Put an App on the Internet
Exposed Apps does it in one step: the domain with HTTPS, the router ports and the DNS record.
bistro expose jellyfin movies.example.com
bistro expose status
bistro expose remove jellyfinAdd --no-router to skip the router step. Bistro opens router ports 80 and 443 through UPnP. If it cannot do a step, it prints what to do, for example to forward the ports yourself.
#Domains and DNS Records
Connect a DNS provider once. Every app that gets a domain then gets its DNS record by itself. Providers are Cloudflare, Porkbun, Namecheap and deSEC. Bistro checks the credentials before it saves them. DuckDNS names use bistro ddns instead.
bistro domain connect cloudflare
bistro domain zones # domains at the provider
bistro domain records example.com
bistro domain add-record example.com A cloud 203.0.113.5
bistro domain ensure cloud.example.com # A record kept on your public IP
bistro domain check # does DNS point here
bistro domain disconnectKept names follow your public IP address when it changes. See Network for dynamic DNS.
#HTTPS Certificates
Caddy gets and renews certificates by itself, about 30 days before they expire. Open Monitoring to see every certificate and its expiry. See Monitoring.
bistro certs # every certificate, expiry and issuer
bistro certs check example.com:443 # the certificate a server sendsBistro warns once a day about a certificate with under 14 days left. That means renewal is failing.
#The Dashboard Certificate
The dashboard (port 2045) starts with a self-signed certificate. Replace it with a better one.
bistro tls status # name, issuer, days left
bistro tls caddy dash.example.com # use the certificate Caddy holds
bistro tls install cert.pem key.pem # your own PEM files
bistro tls selfsign nas.home # new self-signed certificate
bistro tls remove # back to the defaultA bad pair is refused before anything is written.
#Single Sign-On
One login for all apps behind Caddy, with Authelia or Authentik. Install the login app first.
bistro apps install authelia
bistro sso setup authelia example.com # address auth.example.com
bistro sso protect jellyfin # an app id or a route name
bistro sso unprotect jellyfin
bistro sso status
bistro sso user add anna anna@example.comThe dashboard stays outside single sign-on, so you cannot lock yourself out. Apps without a domain are not behind Caddy. They are protected once they get one. Authentik keeps users in its own web page.
#Protect a Busy Public Site
Edge Protection limits requests and caches static files. It never limits addresses on your own network.
bistro edge status
bistro edge limit cloud.example.com 20 # 20 requests a second per visitor
bistro edge cache cloud.example.com on
bistro edge flood on # cap open connections per address
bistro edge off # remove everything Edge madeBehind a CDN or tunnel, every visitor shares one address. Keep flood off there. bistro edge mirror NAME ORIGIN serves a name from this node as a cache of another site.
#AI Gateway on the Internet
bistro gateway publish on --domain D puts the AI gateway on the internet. It allows only /v1 and health paths, and every request still needs a gateway key. See Local AI.