The official ayon-docker repository focuses on AYON Server deployment and omits additional configurations which can vary based on studios’ specific requirements, such as setting up a reverse proxy (such as NGINX, Traefik, or Caddy) for serving AYON over HTTPS.
Serving AYON over plain HTTP works, but users may hit a limit when browsers restrict some web features over plain HTTP, even inside a local network: clipboard copy and paste, for example, and some features addons like AYON Review rely on.
So, here I’m sharing my personal setup and exploration which is helpful to get more insights about setting it up with AYON as well as replicating some of the known reports on the community.
Requirements
- A DNS record for the server, for example
ayon.yourstudio.com. (since this is my local setup, I skipped this and replaced it by simply modifying the hosts file on my machine, not beautiful but I don’t need more than this. With a hosts file, every machine that connects to the server needs the entry, including the workstations running the AYON launcher) - Ports 80 and 443 free on the host machine.
Setup
I went with Caddy because the config is minimal and simple.
You can find my exact setup here which I run on my machine. Note that the worker service in it falls back to the public default API key, so make sure to set your own AYON_API_KEY.
In short the setup goes like this:
-
In
docker-compose.yml, theportslines of theserverservice are removed, so the server is reached only through Caddy.expose: [5000]stays. -
A
caddyservice and its two volumes are added todocker-compose.yml:services: # postgres, redis and server unchanged, apart from step 1 caddy: image: caddy:2-alpine restart: unless-stopped ports: - "80:80" - "443:443" volumes: - "./Caddyfile:/etc/caddy/Caddyfile:ro" - "caddy_data:/data" - "caddy_config:/config" volumes: db: {} caddy_data: {} caddy_config: {} -
A
Caddyfileis created in theayon-dockerdirectory, with the server’s DNS name:ayon.yourstudio.com { tls internal # remove this line for a public domain reverse_proxy server:5000 } -
The containers are rebuilt:
docker compose up -d
From then on, the web app, the AYON launcher, services and tools connect to https://ayon.yourstudio.com instead of http://<host>:5000.
With a public domain, Caddy gets a certificate from a public certificate authority (Let’s Encrypt) and nothing else is needed. The rest of this page only applies to a local server name (like mine).
Trust Caddy’s CA Bundle
Requires AYON launcher 1.6.4 or newer. For older launchers, see the note at the end of this section.
This is needed when using a local server name.
A local server name is one that public certificate authorities cannot verify: an internal-only DNS entry, an unregistered domain, a router host entry or ahostsfile entry.
For such a name,tls internalstays in theCaddyfile.
For this to work you need to extract Caddy’s own root certificate and tell browsers and the AYON launcher to trust it.
Steps:
- Extract Caddy’s auto-generated Root CA certificate from inside the container:
# Replace ayon-docker-caddy-1 with your container name if different (check via `docker ps`) docker cp ayon-docker-caddy-1:/data/caddy/pki/authorities/local/root.crt ./caddy-root.crt - Set
AYON_CA_FILEto the path ofcaddy-root.crtas a user or system environment variable, then start the AYON launcher. A variable set only in a terminal doesn’t reach web actions.
OS/Browser Tip: Import
caddy-root.crtinto your OS or Web Browser’s Trusted Root Certification Authorities store to prevent browser warnings on client workstations.
For launchers older than 1.6.4, you’d need to set
REQUESTS_CA_BUNDLEandSSL_CERT_FILEinstead ofAYON_CA_FILEto a merged certificate (shipped certifi and Caddy’s CA file). See AYON - HTTPS Connection not functioning from Ayon Launcher for details.
If you run AYON behind another proxy or found a cleaner way, please share it below!