lxc config device add web01 www proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80

Category: Kubernetes & Containers

lxc config device add web01 www proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80

Add a proxy device to an instance

Forwards host port 8080 to port 80 inside web01 via a proxy device, the LXD way to publish services without touching iptables. The device survives restarts and is managed with lxc config device. Remove it with lxc config device remove web01 www.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.