Skip to content

Installation 🔧

The app is available as PyPI package. Follow this guide to install.

You have seen the 3d printable photobooth box? Check out the photobooth box!

Prerequisites

  • Python 3.9 or later.
  • System: Raspberry Pi 4 or 5 recommended. Hardware more performant is fine also using a generic Debian/Windows. Raspberry Pi 3 could work also but might be slow.
  • Screen: Touchscreen highly recommended. Minimum resolution is 1024x600.
  • Camera, can be one or two (first camera for stills, second camera for live view)
    • DSLR: gphoto2 on Linux
    • RPI Camera Modules / Arducams: installed and working (test with libcamera-hello)
    • Webcamera: no additional prerequisites, ensure camera is working using native system apps

Reference Systems

The photobooth-app is written in python and itself platform independent. Nevertheless, depending on the camera backend or peripheral hardware the hardware-platform to use can be restricted to a specific one like a Raspberry Pi.

These are systems used productive or in automated testing and most likely to work without issues. Gphoto2 and the webcam backends support many different camera models but manufacturers might implement communication protocols slightly different. If you run into issues, create an issue or open a discussion. Also check the camera manufacturers manuals for their camera installation guides.

Hardware-Platform Software-Platform Cameras
Raspberry Pi 4/5 Raspberry Pi OS (64-bit, Bookworm) original camera module, gphoto2 dslr, Arducam IMX519 PDAF
Raspberry Pi 3 Raspberry Pi OS (64-bit, Bookworm) Will work, can be slow, not preferred.
Tinkerboard 2S Tinker Board 2 /2S Debian 11 (kernel 5.10) V3.0.11 gphoto2 dslr

If you have tested additional software/hardware-platform, please let me know and it will be added to the list.

DSLR known to work

In general all cameras supported by gphoto2 / digicamcontrol would work. Following ones were reported by users to work with the photobooth:

Camera Capture Liveview Video Remarks
Canon 600D ✅ ✅ ✅ try different modes
Canon 1100D ✅ ✅ ✅
Nikon D810 ✅ ✅ ✅ raw capture

System Preparation

RaspberryPi OS

On a fresh Raspberry Pi OS 64bit, run following commands:

Update System (RPi)

sudo apt update
sudo apt upgrade

Tweak system settings (RPi)

To use hardware input from keyboard or presenter, the current user needs to be added to tty and input group.

sudo usermod --append --groups tty,input $(whoami)

You also might want to check some display settings.

Install system dependencies (RPi)

Following dependencies to be installed for Raspberry Pi OS 64bit. Adjust for debian/ubuntu. Picamera2 is only available on Raspberry Pi.

sudo apt -y install ffmpeg libturbojpeg0 python3-pip libgl1 libgphoto2-dev fonts-noto-color-emoji rclone inotify-tools

Debian/Ubuntu

There are no dedicated installation instructions available by now. It should work similar to Raspberry Pi installation, please try these. Feel free to send a pull request to improve the instructions.

Windows

Windows is well supported, the software is developed on a Windows system. As of app version 1.0 Digicamcontrol is integrated to support DSLR on Windows platform.

Update System (Win)

Please ensure Windows is up to date.

Tweak system settings (Win)

Install system dependencies (Win)

To use the photobooth first install following system dependencies:

  • Latest stable Python Please use the link, the Microsoft Store version is not recommended.
  • Latest libjpeg-turbo-X.X.X-vc64: Ensure to use the -vc64 variant and unpack it to C: so it will be automatically detected.
  • Latest ffmpeg-release: Choose the windows releases from gyan.dev. Look for the release builds, for example ffmpeg-release-full.7z. Download the folder, unpack it to C: and add the path to the executable ffmpeg.exe to system path's. Check that in a CLI you can start ffmpeg. If it starts, photobooth can use it also. If you don't need the video feature, you don't need to install ffmpeg.

Once the dependencies are installed, continue with the installation of the app. On the Windows platform Method C is recommended currently.

Install photobooth app

Several ways to install:

  1. Method A: Install using pipx (easiest, recommended for Bookworm)
  2. Method B: Install using venv
  3. Method C: Install globally (recommended for Windows)

It's preferred nowadays to install pypi packages in virtual environments. Latest Linux OS' start implementing externally managed base environments now. The easiest solution to install is using pipx.

Method A: Install using pipx

Use the following commands to install with pipx in an virtual environment: Install pipx from repo - if not avail check pipx website

sudo apt -y install pipx

Following command to ensure path is registered and app globally available. Might need to restart console or logout/login gain also to reread environment paths variable.

pipx ensurepath

Start photobooth pipx installation. Allow import of system-site-packages as picamera2 is globally installed via apt in system-site.

pipx install --system-site-packages photobooth-app --pip-args='--prefer-binary'

Method B: Install using venv

Use the following commands to install in a virtual environment:

Create empty directory & change to new dir:

mkdir ~/photobooth-app && cd ~/photobooth-app

Initialize a new venv called myenv. Allow import of system-site-packages as picamera2 is globally installed via apt in system-site:

python -m venv --system-site-packages myenv

Activate the newly created env

source myenv/bin/activate

Install photobooth-app

python -m pip install --prefer-binary photobooth-app

Note: --prefer-binary is added to avoid compiling opencv and instead prefer the wheel which installs within minutes instead hours.

Method C: Install globally

This method was default in the past. Install photobooth-app

pip install --prefer-binary photobooth-app

First start

Create data folder

The photobooth-app automatically uses the current folder as data folder. All images, logs and config files will be stored in this folder.

mkdir ~/photobooth-data

Start the app

cd ~/photobooth-data

Following only if installed via venv method

source ~/photobooth-app/myenv/bin/activate

Start app. Current dir will be used as working-directory!

photobooth

Browse to http://localhost:8000 and see if the app is working properly. Per default the app uses a generated image and displays a timer only. No camera is started at this point. You need to continue setting up the cameras.

Info

Have issues accessing the website or see error messages during installation and app startup? Check the troubleshooting guide.

Setup system service

To automatically start the photobooth-app it shall be installed as a service.

Automatic service setup

Once the photobooth-app was started the service can be installed automatically on Linux systems. Choose in the Admin Center -> Dashboard -> Server Control -> Install Service. After confirmation the service is installed as described below for manual setup. If the setup fails, please install manually.

Manual service setup

Now that you ensured, the photobooth app is working properly, it's time to setup the app as a service. If you installed the app according to above instructions, the template .service file works for you.

Create the following file at the given location:

~/.local/share/systemd/user/photobooth-app.service
[Unit]
Description=photobooth-app
After=default.target

[Service]
Type=simple
Restart=always
#you might want to adjust following lines
WorkingDirectory=%h/photobooth-data/
ExecStart=python -O -m photobooth

[Install]
WantedBy=default.target

Now enable the service and start it:

systemctl --user daemon-reload
systemctl --user enable photobooth-app.service
systemctl --user start photobooth-app.service

Info

The service does not start? Check the troubleshooting guide. Following commands might be helpful:

systemctl --user status photobooth-app.service
journalctl --user --unit photobooth-app.service

Desktop shortcut and autostart

Desktop Icon (Bookworm)

Create the following file at the given location:

~/Desktop/photobooth-app.desktop
[Desktop Entry]
Version=1.3
Terminal=false
Type=Application
Name=Photobooth-App
Exec=chromium-browser --kiosk --disable-features=Translate --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized http://localhost:8000/
StartupNotify=false

Autostart on system startup (Bookworm)

Modify the file below as stated. If there is a section [autostart] already, just add the line chromium = ... otherwise insert the complete section.

~/.config/wayfire.ini
[autostart]
chromium = chromium-browser --kiosk --disable-features=Translate --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized http://localhost:8000/ 

After reboot chromium will start automatically.