How to disable auto start for all containers


How to disable auto start for all containers as default

1 Like


If this is a LXC question and not an LXD question (see, then you can set to 0. See more at

If instead you use LXD, you can get a list with all your containers with the following command.

lxc list --format=json | jq --raw-output '.[].name'

Then, for each container, you can run

lxc config set mycontainer boot.autostart false

so there is no default setting

You are asking how to change the default setting in LXD so that any newly created container does not autostart.

In that case, you set boot.autostart to false in your default profile.

$ lxc profile set default boot.autostart=false
$ lxc profile get default boot.autostart
$ lxc launch ubuntu:18.04 mycontainer
$ lxc config show mycontainer --expanded
architecture: x86_64
  boot.autostart: "false"


Hi, I’m trying to do this on lxd 4.0.9, but it doesn’t seem to be working. I have set the boot.autostart key to false in the default profile, and verified this with lxc profile get. However, when I launch a new container, it doesn’t seem to respect this change:

$ lxc launch ubuntu:20.04 mycontainer
$ lxc config get mycontainer boot.autostart
<no output>

That’s normal, look at lxc config get --expanded to get the config with profiles applied, otherwise it just queries the instance specific config.