We will create a systemd.timer to rotate Postfix’s log files created by the postlogd. Timers can be triggered by systemd dependencies or based on different events. Jobs triggered by timers can be configured to run in specific environments and their configuration files end on “.timer”. Each timer file requires a matching unit file. Our timer […]
Debian
Interface unavailable at Linux boot
Multiple services entered a failed state upon Linux boot. It is unclear whether some services started too early. Looking at the systemd journal the problem can be narrowed down to IPv6 addresses – which were not up when the service started. This affected multiple daemons such as Bind, Nginx and Postfix. postfix[1445]: postfix: fatal: parameter […]
Build custom Debian packages
We will install a current Debian release to a build environment which will spawn in an isolated light-weight namespace container. mount /var/lib/machines/build debootstrap –arch amd64 bookworm /var/lib/machines/build/ http://ftp.de.debian.org/debian/ Create a start script to spawn the container. cat << EOF > ~/bin/c-buildstart.sh #!/bin/sh mount /var/lib/machines/build systemd-nspawn -D /var/lib/machines/build EOF Copy custom shell configuration to the container. […]
Namespace containers using systemd-nspawn
We will use systemd-nspawn to create a container that will use a fully isolated environment. This environment will use a virtualized filesystem and process hierarchy. It will allow us to install Linux-based operating systems on our host. We can change to our container to compile packages or to launch a virtual OS image. Create a […]
Allow SFTP to chrooted directories
Accessing files inside the directory of a virtual host, e.g. to troubleshoot code issues, is classically a domain of FTP. Since we don’t want to introduce the detriments of FTP in our setup, we will be using internal-sftp, a subsystem of the ssh-daemon. We will want to allow sftp-Access to our server only when required and jail the […]
Custom Debian apt repository
Let’s set up a local repository that will host our custom Debian packages using reprepro. We can configure multiple release trees if we want to support multiple distributions. These will be specified in the following file: /var/www/leuxner.net/apt/debian/conf/distributions Origin: edi.leuxner.net Label: Edi-Builds Suite: edi-bookworm Codename: bookworm Architectures: amd64 Components: main Description: Apt repository edi.leuxner.net SignWith: 5BAFE291B480790324E60B1E58C127953C5EB05E […]