The officially official Devuan Forum!

You are not logged in.

#1 2026-03-23 14:19:56

bigbenaugust
Member
From: the 919
Registered: 2017-06-15
Posts: 13  

Devuan LXC container usage?

Am I the only one crazy enough to use the Devuan LXC container template in Proxmox for my home workloads?
I assume they were included in Proxmox for a reason and not just decoration. big_smile

I have used the templates for Devuan 4 and 5, and dist-upgraded a 5 template into a 6 template this week.

Offline

#2 2026-06-07 12:55:46

kajko
Member
Registered: 2026-05-01
Posts: 3  

Re: Devuan LXC container usage?

I started to use Devuan lxc containers as well. I have prepared pct template of Devuan6 in the same way. I think much better experience in relation to LXC containers provide Incus, so recently I was thinking if would be better to start Proxmox VM and install INcus there just for LXC

Offline

#3 2026-11-14 15:41:40

danuan
Member
Registered: 2020-08-30
Posts: 17  

Re: Devuan LXC container usage?

Basic lxc has a container template for devuan5-6 (devuan host)
(does basic minimal config like /etc/inittab config for proper shutdown and disables consoles,
but leaves all the unneeded init services intact that will error and not run proper in containers)

lxc-create --name devuan6 --template download -- --dist devuan --release excalibur --arch amd64

Use this method to create the containers till you figure out how to customize the lxc and container configs!

I prefer to roll my own (privileged lxc) by debootstrap(ing) a minbase variant and going from there
(Ignore zfs commands if you do not use it, and my paths are custom lxc locations/configs)

=============== debootstrap ===============

debootstrap --arch=amd64 --variant=minbase \
--include=ifupdown,iputils-ping,isc-dhcp-client,locales,nano,netbase,procps,whiptail \
excalibur /srv/lxc_images/devuan6 http://us.deb.devuan.org/merged

zfs snapshot m92p-sata/srv/lxc_images/devuan6@debootstrap

-------------------- basicstrap1 --------------------

lxc-attach devuan6

# Fix container shutdown
sed -i "s#^pf::powerwait.*#pf::powerwait:/sbin/poweroff#" /etc/inittab

# Disable getty (or not if you use lxc-console instead of lxc-attach)
sed -i '/tty[1-6]/s/^/#/' /etc/inittab

echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
locale-gen en_US.UTF-8 UTF-8
update-locale LANG=en_US.UTF-8

echo 'US/Eastern' > /etc/timezone
ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime

zfs snapshot m92p-sata/srv/lxc_images/devuan6@basicstrap1

-------------------- basicstrap2 --------------------
#here we remove all init services that error on boot and are not functional in containers!
lxc-start -F devuan6 (should show a clean startup and a clean shutdown after these steps)

lxc-attach devuan6

cd /etc/rcS.d/
update-rc.d mountkernfs.sh disable            (/proc, /sys)
update-rc.d mountdevsubfs.sh disable            (/dev/some, /dev/pts)
update-rc.d hwclock.sh disable                (save hwclock)
update-rc.d checkroot.sh disable                (fsk /, swap)
update-rc.d checkfs.sh disable                (fsk, others)
update-rc.d kmod disable                    (kern modules)
update-rc.d mount-configfs disable            (/sys/kernel/config)
update-rc.d procps disable                    (. /etc/sysctl.conf)
update-rc.d urandom disable                    (/dev/urandom)
update-rc.d brightness disable                (brightnes laptop)
update-rc.d udev disable                    (/dev)
update-rc.d bootlogd disable                    (startup bootlog)
update-rc.d stop-bootlogd-single disable        (startup bootlog single)
update-rc.d checkroot-bootclean.sh disable        (clear /tmp files)

cd /etc/rc0.d/ (numbering here might be different, just disabling stop services on shutdown)
mv K01udev D01udev
mv K01urandom D01urandom
mv K01hwclock.sh D01hwclock.sh
mv K01brightness D01brightness
mv K04umountfs D04umountfs
mv K05umountroot D05umountroot

zfs snapshot m92p-sata/srv/lxc_images/devuan6@basicstrap2

-------------------- provision1 --------------------
(functioning, very slim/basic container with just init running at this point)

lxc-attach devuan6

echo devuan6 > /etc/hostname

groupadd user
useradd --shell /bin/bash -m user

passwd root
passwd user

edit /etc/network/interfaces
and any other config file you need

zfs snapshot m92p-sata/srv/lxc_images/devuan6@provision1

-------------------- provision2 --------------------
(basic utils and services to support whatever services/apps you decide to run)

apt update

apt install man vim bash-completion whiptail less
apt install rsync htop nmon ncdu ethtool psmisc tree wget

apt install dma bsd-mailx
apt install cron rsyslog logrotate

zfs snapshot m92p-sata/srv/lxc_images/devuan6@provision2

-------------------- base --------------------

check that everything works as intended
and use this as a base for all following containers
changing passwords etc... on next steps

apt install openssh-server --no-install-recommends

install openssh-server once inside new container (not before) unless you want to reset the hosts keys

=============== cgroups2 on devuan host (optional) ===============

update-rc.d cgroupfs-mount disable
echo 'cgroup2 /sys/fs/cgroup cgroup2 defaults,nsdelegate 0 0' >> /etc/fstab

dan

Last edited by danuan (2026-11-15 10:35:29)

Offline

Board footer