configuring Traefik that is lxc container to seperate lxc containers on the network

jpfeifer90

New Member
Dec 9, 2024
10
0
1
good evening,

i have 3 lxc containers that are seperated in my proxmox and one of them is Traefik. i ran the proxmox helper scripts from the link below and from what i read. i need to add the labels in each container so traefik can route them. im also trying to understand how i configure traefik when i installed it as a container. or should i install traefik as a vm instead.


https://community-scripts.github.io/ProxmoxVE/scripts?id=traefik
 
To use Traefik in LXC, you need to add labels to each container and modify the Traefik configuration to recognize the LXC network, but if you need more flexibility, consider switching to a VM.
 
To use Traefik in LXC, you need to add labels to each container and modify the Traefik configuration to recognize the LXC network, but if you need more flexibility, consider switching to a VM.
so i done this on a raspberry pi with docker. using docker compose file, config file, yml file and so on. but with lxc im not sure exactly how or where would i set those up at in the file. and when you say to modify traefik network to reconzie the lxc network. how do i go about doing that.
 
so i done this on a raspberry pi with docker. using docker compose file, config file, yml file and so on. but with lxc im not sure exactly how or where would i set those up at in the file. and when you say to modify traefik network to reconzie the lxc network. how do i go about doing that.
Define LXC services manually in dynamic_conf.yml, ensure static IPs, and modify traefik.yml to use the file provider.
 
Define LXC services manually in dynamic_conf.yml, ensure static IPs, and modify traefik.yml to use the file provider.
im new to the lxc. i havent done much with them. is there a guide i can follow or basic instructions to get me started in the right directijon. i would assume i would need to go into shell into the node and nano the file dynamic_cconf.yml and thats where i would add labels for each container.

would the traefik.yml file be in the same place.

my biggest thing right now is im not sure where to even access these files.
 
im new to the lxc. i havent done much with them. is there a guide i can follow or basic instructions to get me started in the right directijon. i would assume i would need to go into shell into the node and nano the file dynamic_cconf.yml and thats where i would add labels for each container.

would the traefik.yml file be in the same place.

my biggest thing right now is im not sure where to even access these files.
Traefik configuration files are usually located in /etc/traefik/ on your LXC container, and you can edit them using:

bash
Code:
nano /etc/traefik/traefik.yml<br>nano /etc/traefik/conf/dynamic_conf.yml
Code:
mkdir -p /etc/traefik/conf

Then, restart Traefik to apply changes:
Code:
systemctl restart traefik

Traefik Official Documentation: https://doc.traefik.io/traefik/