Skip to content

Development Environment Setup: Debian

Maikel edited this page May 29, 2026 · 7 revisions

Debian setup

The Debian setup is very similar to Development Environment Setup: Ubuntu. Follow that guide and check here for additions specific to Debian. Otherwise, the following summary may be enough to get you started.

Container setup

We usually don't develop in containers. They are slow, cumbersome and some tests don't work. But if you want to use an AI agent in a safe environment, we would recommend that you install it in a safe container. Use whatever system you like (Docker, VirtualBox, LXD, ...). This guide uses Incus.

sudo apt install incus --yes
sudo incus admin init --auto
sudo usermod -aG incus "$USER"

newgrp incus incus launch "images:debian/13" ofn
newgrp incus incus exec ofn bash # and follow the steps of the next section

Setup the code and its dependencies

sudo apt update
sudo apt upgrade --yes
sudo apt install --yes\
     build-essential cmake pkg-config\
     git\
     libyaml-dev\
     libffi-dev\
     libgit2-dev\
     libpq-dev\
     libzstd-dev\
     zlib1g-dev\
     chromium\
     imagemagick\
     nginx\
     postgresql\
     redis\

sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'"

git clone https://github.com/openfoodfoundation/openfoodnetwork.git
cd openfoodnetwork

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
~/.rbenv/bin/rbenv init
. ~/.bash_profile

git clone https://github.com/nodenv/nodenv.git ~/.nodenv
git clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build
~/.nodenv/bin/nodenv init
. ~/.bash_profile

./script/setup

# You are ready to go:
#
# bundle exec rspec
#
# git remote add upstream git@github.com:openfoodfoundation/openfoodnetwork.git
# git remote set-url origin git@github.com:YOUR_GITHUB_USERNAME/openfoodnetwork.git

Clone this wiki locally