Expose Aria2 JSON-RPC over HTTPS/WSS with Caddy

This note shows how to expose Aria2 JSON-RPC securely over HTTPS / WSS when using aria2-ariang-docker behind Caddy.

Setup

1. Docker Compose

Set the RPC port to 443:

1ARIA2RPCPORT=443

This setup is used inside a private VPN only, so there is no need to set RPC_SECRET.

2. Caddy Reverse Proxy

Configure Caddy normally for AriaNg:

 1ariang.example.com {
 2    reverse_proxy ariang:8080 {
 3        header_up Host {host}
 4        header_up X-Real-IP {remote}
 5
 6        transport http {
 7            read_timeout 1h
 8            write_timeout 1h
 9        }
10    }
11}

Caddy automatically handles TLS and WebSocket upgrades.

3. AriaNg WebUI Settings

In AriaNg Settings → RPC:

Notes

Comments

#aria2   #ariang   #caddy   #docker