Skip to content

Base and Module Configuration

davidzwa edited this page Jan 17, 2026 · 1 revision

This page documents all overridable configuration variables available in CustomPiOS modules. These variables can be set in your src/config or src/config.local files to customize your distribution build.

How to Use These Variables

Add any of these variables to your src/config file:

export VARIABLE_NAME=value

Or create a src/config.local file for local overrides (this file should be gitignored):

echo"export VARIABLE_NAME=value"> src/config.local

Configuration Hierarchy

CustomPiOS loads configuration in this order (later sources override earlier ones):

  1. CustomPiOS/src/modules/*/config - Module defaults
  2. src/config - Your distribution config
  3. src/config.local - Local overrides (gitignored)
  4. src/variants/*/config - Variant-specific config
  5. Environment variables set in CI/CD

For more information about modules and how they work, see the CustomPiOS Modules documentation.


Common Configuration Examples

Minimal Configuration

export DIST_NAME=MyDistro
export DIST_VERSION=1.0.0
export MODULES="base(network)"

Standard ARM Configuration with Docker

export DIST_NAME=MyDistro
export DIST_VERSION=1.0.0
export MODULES="base(network, docker)"# Base image configurationexport BASE_IMAGE_ENLARGEROOT=2000
export BASE_IMAGE_RESIZEROOT=500
export BASE_SSH_ENABLE=yes

Example base board: Raspberry Pi OS 64 bits (Lite)

This now requires the image to be present in src/image-NAMEHERE (NAMEHERE=raspberrypiarm64 in this case):

export DIST_NAME=MyDistro
export DIST_VERSION=1.0.0
export MODULES="base(network, docker)"# ARM64-specific settingsexport BASE_DISTRO=raspios64
export BASE_ARCH=aarch64
export BASE_BOARD=raspberrypiarm64
export BASE_IGNORE_VARIANT_NAME=yes
export BASE_IMAGE_RASPBIAN=no
export BASE_SSH_ENABLE=yes
# Build settingsexport BASE_IMAGE_ENLARGEROOT=2000
export BASE_IMAGE_RESIZEROOT=500

For more base board selection options and architecture configurations, see Base Board Selection.


Module: base

Core CustomPiOS module providing fundamental image building capabilities and base system configuration.

Last Updated:23fcc0c (2024-12-14)

VariableDescriptionDefault
BASE_VERSIONCustomPiOS version.2.0.0
BASE_PRESCRIPTPre-build script execution.(empty)
BASE_POSTSCRIPTPost-build script execution.(empty)
BASE_BOARDTarget board type: "raspberrypiarmhf", "raspberrypiarm64", or other Armbian boards.raspberrypiarmhf
BASE_OSOperating system target.debian_bookworm
BASE_IMAGE_PATHPath to the base image for the board.${DIST_PATH}/image or ${DIST_PATH}/image-${BASE_BOARD}
BASE_IMAGE_RASPBIANWhether this is a Raspbian image.yes
BASE_DISTROLinux distribution: "raspbian", "raspios64", or "ubuntu".raspbian
BASE_ZIP_IMGCustom or already-extracted image file path (.img, .zip, .7z, .xz).Auto-detected
BASE_USERDefault user for the image.pi (raspbian) / ubuntu (ubuntu)
BASE_ADD_USERAdd base user if it doesn't exist.yes
BASE_USER_PASSWORDPassword for the base user.raspberry (raspbian) / ubuntu (ubuntu)
BASE_RELEASE_COMPRESSCompress the final release image.yes
BASE_RELEASE_IMG_NAMEName for the released image.default
BASE_RELEASE_ZIP_NAMEName for the released zip file.default
BASE_WORKSPACEBuild workspace directory.${DIST_PATH}/workspace${WORKSPACE_POSTFIX}
BASE_MOUNT_PATHMount path for image manipulation.${BASE_WORKSPACE}/mount
BASE_BOOT_MOUNT_PATHBoot partition mount path in image.boot/firmware
BASE_ROOT_PARTITIONRoot partition number in the image.2
BASE_IMAGE_ENLARGEROOTPre-build root partition enlargement in MB.200
BASE_IMAGE_RESIZEROOTPost-build root partition resize in MB (minimum size + value).200
BASE_APT_CACHELocal directory for APT cache bind mount.${BASE_WORKSPACE}/aptcache
BASE_APT_PROXYAPT proxy server (host:port format, e.g., apt-cacher-ng).(empty)
BASE_APT_MIRRORAlternative APT mirror URL.(empty)
BASE_PYPI_INDEXAlternative PyPI index URL (e.g., devpi proxy).(empty)
BASE_OVERRIDE_HOSTNAMEOverride the system hostname.${DIST_NAME,,}
BASE_USE_ALT_DNSAlternative DNS servers during build (space-separated).(empty)
BASE_BUILD_REPO_MIRRORGit mirror for clones instead of original remotes.(empty)
BASE_SSH_ENABLEEnable SSH daemon.yes
BASE_COMMITGit commit hash of CustomPiOS used in build.Auto-detected
BASE_CONFIG_MEMSPLITMemory split configuration.default
BASE_CONFIG_TIMEZONESystem timezone.default
BASE_CONFIG_LOCALESystem locale.default
BASE_CONFIG_KEYBOARDKeyboard layout.default
BASE_ARCHArchitecture: "armv7l", "arm64", or "aarch64".armv7l
BASE_IGNORE_VARIANT_NAMEDisable variant name appending to image name.no
BASE_ENABLE_UARTEnable UART console on boot.no
BASE_APT_CLEANClean APT cache after build completion.yes

Raspberry Pi Imager Integration

These distribution-level variables configure metadata for Raspberry Pi Imager JSON generation:

VariableDescriptionDefault
RPI_IMAGER_NAMEDisplay name in Raspberry Pi Imager.${DIST_NAME}
RPI_IMAGER_DESCRIPTIONDescription shown in Raspberry Pi Imager.(required)
RPI_IMAGER_WEBSITEProject website URL.(required)
RPI_IMAGER_ICONIcon image URL (PNG format recommended).(required)

Module: network

Configures network settings including WiFi power save and network management.

VariableDescriptionDefault
NETWORK_DISABLE_PWRSAVEDisable power save for WiFi module.yes
NETWORK_PWRSAVE_TYPEPower save implementation type: "rclocal", "service", or "udev".udev
NETWORK_WPA_SUPPLICANTEnable WPA-Supplicant boot folder support (pre-Bookworm).no
NETWORK_NETWORK_MANAGEREnable Network Manager boot folder support (Bookworm).yes

Module: admin-toolkit

Provides administrative tools for user management, SSH configuration, firewall setup, and system administration tasks.

VariableDescriptionDefault
ADMIN_TOOLKIT_NAMEUsername for the new admin user to add. If left "default", no user will be added.default
ADMIN_TOOLKIT_FULLNAMEGECOS field (full name) of the new account. If left "default", this is skipped.default
ADMIN_TOOLKIT_PASSWORDOverride password for the new user, otherwise uses image default (raspberry).default
ADMIN_TOOLKIT_PI_NO_SUDORemove pi from the sudoers file. Set to "yes" to configure.no
ADMIN_TOOLKIT_HOSTNAME_CHANGE_SCRIPTInclude a hostname change script. Set to "yes" to include.no
ADMIN_TOOLKIT_SSHPublic SSH key for user connections. Format: "ssh-rsa SzYtCpyRUU1fvLXvWlezJw...=="default
ADMIN_TOOLKIT_SSH_NO_PASSDisable SSH password logins (only if SSH key is set). Set to "yes" to configure.no
ADMIN_TOOLKIT_SSH_ALLOW_ONLY_CREATED_USERAllow only the newly created user to SSH. Set to "yes" to configure.no
ADMIN_TOOLKIT_UPDATE_PACKAGESUpdate all packages (apt-get update && apt-get upgrade). Set to "yes" to configure.no
ADMIN_TOOLKIT_INSTALL_LISTPackage list to install. Use quotes for multiple packages (space-separated).no
ADMIN_TOOLKIT_UFW_INSTALLInstall UFW firewall. Unless other ports are specified, only SSH port 22 will be open.no
ADMIN_TOOLKIT_UFW_PORTS_TCPTCP ports to allow through UFW firewall (comma-separated list).no
ADMIN_TOOLKIT_UFW_PORTS_UDPUDP ports to allow through UFW firewall (comma-separated list).no
ADMIN_TOOLKIT_UFW_ENABLE_LOGGINGEnable UFW logging. Set to "yes" to configure.no
ADMIN_TOOLKIT_REMOVE_NETWORK_MANAGERRemove Network Manager (causes different MAC on wifi devices). Set to "yes" to configure.no
ADMIN_TOOLKIT_HDMI_SCRIPTSInstall FullPageOS HDMI scripts for turning TV on/off. Set to "yes" to configure.no
ADMIN_TOOLKIT_CRON_JOBInstall a cron job. Set to "yes" to configure.no
ADMIN_TOOLKIT_CRON_USERCron jobs username. Default is 'pi'.pi
ADMIN_TOOLKIT_SYSTEM_CRONInstall root user cron jobs (for auto-reboot, etc.). Set to "yes" to configure.no
ADMIN_TOOLKIT_USER_SCRIPTSAdd custom scripts to user's home directory. Set to "yes" to configure.no
ADMIN_TOOLKIT_USER_SCRIPTS_NAMEUsername for user-defined scripts. Default is 'pi'.pi
ADMIN_TOOLKIT_SCREEN_ROTATIONScreen rotation value. Requires GUI module and Pi 4. Options: "normal", "inverted", "left", "right".normal

Module: auto-hotspot

Creates a WiFi hotspot automatically when no known networks are available.

VariableDescriptionDefault
AUTO_HOTSPOT_NAMEName of the hotspot network.${DIST_NAME,,}
AUTO_HOTSPOT_PASSWORDHotspot WiFi password.raspberry
AUTO_HOTSPOT_CHANNELWiFi channel for hotspot.6

Module: cockpit-install

Installs Cockpit web-based system administration interface.

VariableDescriptionDefault
COCKPIT_INSTALL_DISABLE_COCKPIT_SOCKETDisable the Cockpit web socket. Useful if you have an existing Cockpit server.no

Module: docker

Installs Docker and Docker Compose with optional auto-start configuration.

VariableDescriptionDefault
DOCKER_COMPOSEInstall Docker Compose.yes
DOCKER_ADD_USER_TO_GROUPAdd the default user to the docker group.no
DOCKER_COMPOSE_BOOTStart Docker Compose on boot.yes
DOCKER_COMPOSE_BOOT_PATHPath to docker-compose.yml for startup.default

Module: ffmpeg

Compiles and installs FFmpeg from source with hardware acceleration support.

VariableDescriptionDefault
FFMPEG_CLEANUPClean up FFmpeg build artifacts after installation.yes

Module: gui

Provides graphical user interface with X11 and GPU acceleration support.

VariableDescriptionDefault
GUI_INCLUDE_ACCELERATIONInclude GPU acceleration for GUI.yes
GUI_STARTUP_SCRIPTScript that starts in the session. Session closes if this script ends.xterm

Module: kernel

Compiles custom Linux kernel from source for Raspberry Pi.

VariableDescriptionDefault
KERNEL_TYPEKernel type to build: "all" or specific types.all
KERNEL_CONFIG_APPENDAdditional kernel configuration to append.(empty)
KERNEL_COMMITGit commit/branch for kernel source.rpi-4.19.y
KERNEL_URLURL to fetch kernel source from.https://github.com/raspberrypi/linux/archive
KERNEL_SOURCE_CLEANUPClean up kernel source after compilation.no
KERNEL_EXPORTExport compiled kernel artifacts.yes
KERNEL_EXPORT_NAMEName prefix for exported kernel.kernel-${KERNEL_COMMIT}

Module: mysql

Installs and configures MySQL/MariaDB database server.

VariableDescriptionDefault
MYSQL_USERMySQL user account (not root, as root is CLI-only).pi
MYSQL_USER_PASSWORDPassword for the MySQL user.raspberry

Module: pkgupgrade

Performs system package upgrades during image build.

VariableDescriptionDefault
PKGUPGRADE_DISTUPGRADEPerform distribution upgrade. Options: "y" or "n".y
PKGUPGRADE_DISTUPGRADE_METHODUpgrade method: "upgrade" or "full-upgrade".full-upgrade
PKGUPGRADE_USE_PREINSTALLERUse preinstaller for package upgrades. Options: "y" or "n".n
PKGUPGRADE_PRE_INSTALL_PKGSPackages to pre-install before upgrade.(empty)
PKGUPGRADE_CLEANUPClean up APT cache after upgrade. Options: "y" or "n".y

Module: raspicam

Enables Raspberry Pi Camera support in the kernel.

This module has no configurable variables.


Module: readonly

Configures the root filesystem as read-only for SD card longevity.

This module has no configurable variables.


Module: usage-statistics

Collects anonymous usage statistics for CustomPiOS distributions.

VariableDescriptionDefault
USAGE_STATISTICS_URLURL of the tracking server for anonymous statistics.https://custompios-tracking.gnethomelinux.com
USAGE_STATISTICS_VERSION_FILEFile path that stores the distro version./etc/${DIST_NAME,,}_version
USAGE_STATISTICS_VARIANT_FILEFile path that stores the distro variant./etc/dist_variant

Module: usbconsole

Enables USB serial console for headless debugging.

This module has no configurable variables.


Note: This table represents the latest devel branch of CustomPiOS. Variable availability and defaults may change between versions. Always refer to the specific CustomPiOS commit SHA you're using in your builds.

Last Updated: 2026-01-17 CustomPiOS Version: 2.0.0 (devel)