Slim down systemd for LXC container

I’m not a fan of Docker container and the microservice approach. Application containers limit me too much - especially only one process to be started. In contrast, I have too many unnecessary processes active in the system-container LXC with systemd. Unfortunately, more and more Debian packages require systemd.

Can we slim down systemd for LXC container so that only systemctl service start / stop works and the other (useless for a container) components are deactivated? Deactivation of the network manager is a known tweak. And the rest?


This is a container image question, which means that you should be able to achieve what you need by creating a minimal container image. The tool that builds the container images found at the ubuntu: and images: repositories is distrobuilder, The configuration files for each container image can be found at

I do not know the exact changes you have in mind. I suggest to give it a try and produce such a minimal container image for Debian so that it is possible to evaluate the benefits of the simplifications.

1 Like

Hi, I am curious if you got this to work?

I’d like to have arch flavored systemd inside arch, many times, so this topic is quite interesting to me.

Basically syststemd inside lxc.