This guide provides instructions for installing and configuring Sysbox, which is required for running CTFBox in the recommended secure mode.
Sysbox is a container runtime that enables Docker containers to act more like virtual machines, allowing for enhanced isolation and security. CTFBox uses Sysbox to provide a secure environment for running team VMs.
This is the officially supported installation method.
- Download the latest Sysbox release from the official GitHub repository
- Install the packages:
# Install dependencies apt-get update apt-get install -y fuse jq wget # Update with the correct version you downloaded dpkg -i sysbox-ce_0.6.6-0.linux_amd64.deb
# Using an AUR helper like yay
yay -S sysbox
# Or manually from the AUR
git clone https://aur.archlinux.org/sysbox.git
cd sysbox
makepkg -si# Enable the Karellen COPR repository
dnf copr enable karellen/karellen-sysbox
# Install sysbox
dnf install sysboxFor systemd-based systems:
systemctl enable --now sysboxVerify the service is running:
systemctl status sysboxAdd Sysbox as a runtime in Docker's configuration:
# Create or edit the Docker daemon configuration file
mkdir -p /etc/docker
nano /etc/docker/daemon.jsonAdd the following content to the file:
{
"runtimes": {
"sysbox-runc": {
"path": "/usr/bin/sysbox-runc"
}
}
}If you already have content in your daemon.json file, make sure to merge the configuration properly without overwriting existing settings.
systemctl restart dockerTest if Sysbox is correctly installed and configured:
docker run --runtime=sysbox-runc --rm -it nestybox/alpine-dockerIf the container starts successfully, Sysbox is properly configured.
-
Docker Can't Find Sysbox Runtime:
- Ensure the path in
daemon.jsonis correct - Check if sysbox-runc is actually installed at that location
- Ensure the path in
-
Permission Errors:
- Sysbox requires specific kernel capabilities; ensure your system meets the requirements
-
Kernel Version Incompatibility:
- Sysbox requires a recent Linux kernel (5.5+)
- Check your kernel version with
uname -r
If you encounter issues with Sysbox installation:
- Check the Sysbox documentation
- Search for similar issues in the Sysbox GitHub issues
- Reach out to the CTFBox community for help
While not recommended for security reasons, you can run CTFBox without Sysbox using the privileged mode:
# Edit your config.json and set:
"vm-mode": "privileged"Note: Privileged mode gives VMs access to host functionality, making container escape possible. Only use this option in trusted environments or for testing purposes.