Table of contents

  1. Requirements
  2. Build FarmPi From within FarmPi / Raspbian / Debian / Ubuntu
  3. Building FarmPi Variants
  4. Building Using Docker
  5. Building Using Vagrant
  6. Usage


  • qemu-arm-static
  • CustomPiOS
  • Downloaded Ubuntu image.
  • root privileges for chroot
  • Bash
  • git
  • sudo (the script itself calls it, running as root without sudo won’t work)

Build FarmPi From within FarmPi / Raspbian / Debian / Ubuntu

FarmPi can be built from Debian, Ubuntu, Raspbian, or even FarmPi. Build requires about 2.5 GB of free space available. You can build it by issuing the following commands:

sudo apt-get install gawk util-linux qemu-user-static git p7zip-full python3

git clone
git clone
cd FarmPi/src/image
wget -c --trust-server-names ''
cd ..
sudo modprobe loop
sudo bash -x ./build_dist

Building FarmPi Variants

FarmPi supports building variants, which are builds with changes from the main release build. An example and other variants are available in CustomPiOS, folder src/variants/example.

docker exec -it mydistro_builder:

sudo docker exec -it mydistro_builder build [Variant]

Or to build a variant inside a container:

sudo bash -x ./build_dist [Variant]

Building Using Docker

See Building with docker entry in wiki

Building Using Vagrant

There is a vagrant machine configuration to let build FarmPi in case your build environment behaves differently. Unless you do extra configuration, vagrant must run as root to have nfs folder sync working.

Make sure you have a version of vagrant later than 1.9!

If you are using older versions of Ubuntu/Debian and not using apt-get from the download page.

To use it:

sudo apt-get install vagrant nfs-kernel-server virtualbox
sudo vagrant plugin install vagrant-nfs_guest
sudo modprobe nfs
cd ../FarmPi
git clone
cd FarmPi/src
cd FarmPi/src/vagrant
sudo vagrant up

After provisioning the machine, its also possible to run a nightly build which updates from devel using:

cd FarmPi/src/vagrant

To build a variant on the machine simply run:

cd src/vagrant [Variant]


  • If needed, override existing config settings by creating a new file src/config.local. You can override all settings found in src/modules/farmpi/config. If you need to override the path to the Raspbian image to use for building FarmPi, override the path to be used in ZIP_IMG. By default the most recent file matching * found in src/image will be used.
  • Run src/build_dist as root.
  • The final image will be created at the src/workspace