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=443This 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:
- Aria2 RPC Address
orhttps://ariang.example.com:443/jsonrpcwss://ariang.example.com:443/jsonrpc
Notes
wss://is recommended for better WebSocket stability.- No extra Caddy configuration is required for WebSockets.
- Access is restricted to the VPN, so disabling
RPC_SECRETis acceptable in this case.
Comments