CocktailPi installation

Preamble

The following instructions have been tested on a RaspberryPi 3, a RaspberryPi 4 and a RaspberryPi 5 with Raspberry Pi OS Lite 64 bit! If you want to use the software in combination with a local touchscreen, it is recommended to use a Raspberry Pi 4 or 5 for performance reasons.

Table of contents:

Install the OS

The first step is to install the operating system. For this you need a SD-card, that you can put into your Raspberry Pi. Before the raspberry Pi is able to start, we need to flash the operating system on the SD-card. To flash the OS we can use the official Raspberry Pi Imager.

When selecting the operating system click on:
Choose OS -> Raspberry Pi OS (other) -> Raspberry Pi OS Lite (64-bit)

Next, click on the “gears” symbol located in the bottom right corner. This will bring up a menu. Within this menu, you should select a hostname, enable SSH, and create a user along with a password. The user needs to be named “pi”. This is required, as the automatic installer refers to that user later.

Once you have entered the specified options, click on the “save” button. This will close the menu. Now, select your SD card and initiate the flashing process by clicking on “write/flash.”

Afterwards put the flashed SD-Card into your Pi, connect it to your network and start it.

Automatic installation

After a while the Pi should become reachable through the network. To connect to your PI you need an SSH-Client. I personally use PuTTy for that, but you can use any SSH-client that you like. Open your SSH-client and type in your raspberrys hostname or IP address. Click on “open” to open the connection. Enter the credentials that you’ve selected during the flashing progress (pi-user).

Install the application

After logging in as the pi user, you need to get root-privileges. You can become root using:

Run with user: pi
sudo -i

Next, download and launch the installation script:

Run with user: root
wget https://raw.githubusercontent.com/alex9849/CocktailPi/refs/heads/master/script/installer/installer.sh -O cocktailpi-installer.sh && chmod +x cocktailpi-installer.sh && ./cocktailpi-installer.sh

Afterwards, the webinterface should become reachable on port 80. You can reach the application through the network. If you are using a touchscreen the UI automaticalls starts after rebooting your Raspberry Pi.

The default login credentials are:
User: admin
Password: 123456

If you like the project, please consider staring it. 🙂

Connect with the community

If you have questions, want to share your setup or just want to talk about cocktail machines, feel free to join our discord server: https://discord.com/invite/kGy7Up4b6S

If you like the project, please consider staring it. 🙂

Resize touchscreen UI

If you think your UI is too small or too lage you can resize it using the following steps:

SSH into your pi again and edit the wayland config file as pi-user…

Run with user: pi
nano /home/pi/.config/wayfire.ini

The file should look like this:

Run with user: pi | File: /home/pi/.config/wayfire.ini
[core]
plugins = \
        autostart

[autostart]
chromium = chromium-browser /home/pi/wait-for-app-html/index.html --kiosk --noerrdialogs --enable-extensions --disable-component-update --check-for-update-interval=31536000 --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --disable-features=OverscrollHistoryNavigation --start-maximized --force-device-scale-factor=1.0
screensaver = false
dpms = false

You can edit the --force-device-scale-factor parameter (that is already present as last parameter in the ‘chromium = …’-line) to increase or decrease the size of your UI. Example:

  • --force-device-scale-factor=0.5 ← Scale down (Reduce size) by 50%
  • --force-device-scale-factor=1.0 ← Don’t scale at all
  • --force-device-scale-factor=1.5 ← Increase size by 50%
  • --force-device-scale-factor=2.0 ← Increase size by 100% (Double the size)

Reboot the pi afterwards:

Run with user: pi
sudo reboot

You are done. Have fun! If you like the project, please consider staring it. 🙂

Adding Pumps

Next, you need to add your pumps. Go to ‘Administration’ -> ‘Pumps’ and click ‘Add pump’. Fill in the form shown. Notice that the field ‘BCM-Pin’ is not the GPIO-Pin. BCM refers to the ‘Broadcom SOC channel’ number. The BCM number is the number, that is used inside the chip of the Raspberry Pi and determines the GPIO-Pin that should be used. These numbers may change between different board versions. You can find the mapping in the documentation of your Raspberry Pi board. Read more about the BCM mapping here: https://pi4j.com/getting-started/understanding-the-pins/#overview

If you like the project, please consider staring it. 🙂