LXC container does not autostart

Using turris MOX, version 5.1.4

I followed this guide:

Pi-hole works. However the LXC container does not automatically start on router reboot. The container name is Pihole and I can start it manually using lxc-start -n Pihole

These are the entire contents of /etc/config/lxc-auto

config container
    option name Pihole
    option timeout 60

What did I do wrong, and how can I fix it?

Shooting from the side

/etc/config/lxc-auto enable
/etc/config/lxc-auto start

or dtto in Luci-System- Startup … similarly like

read the LXC documentation properly

et cetera

I read through all that documentation.


/etc/config/lxc-auto enable
/etc/config/lxc-auto start

are not script files, therefore they cannot be executed. They only contain the configuration that I linked in the first post.

However, you were correct to look in luci startup in, it had lxc-auto disabled. This is not covered in any of the documentation.


Alternatively, running these commands works too (which is what you probably meant).

/etc/init.d/lxc-auto enable
/etc/init.d/lxc-auto start
1 Like

Maybe I’m out of… It was waist-high gunfire. I’m sorry

My old config files


#lxc.lxcpath = /srv/lxc
#lxc.lxcpath = /mnt/sda1/lxc
lxc.lxcpath = /mnt/sda1/Pihole 


#config container
	#option name container1
	# How long to give container to shutdown gracefully before killing it
	# Default 300s
	#option timeout 30
	# Commnads to run before starting container
	#list command '/bin/command --option'

config container
	option name Pihole
	option timeout 60
	#lxc-start -P /mnt/sda1 -n Pihole

I am having similar setup like @JardaB , while i am using option delay_start 10 for my lxc with pihole and for others i have it set to 30. When i was having all without delay sometimes services within lxc container were having issues when trying to comunicate outside the container (znc, ngircd, eggdrop ).
Also i had issue with assigned IP (i’ve put wanted ip/mac in lxc config),but somehow it also gets ip from dhcp range. Once i created static lease, it worked fine (only one and wanted IP was used by pihole container).