A Million Beers - Attaining Kegbot Mastery in 2025

Dear Kegbotters,

With few months of sporadic incubator sessions, we managed to get the kegbot system working above and beyond.

After some extreme slop hacks mentioned below, any of our friends can now visit our kegbot site at SECRETDOMAIN dot com, and watch us drink a million beers.

One of us slaved away for months brewing >240L of the good stuff while we hacked the missing pieces of kegbot together.

Once we got it working, we hosted an Oktoberfest. All you can drink and eat for $50 boomer bucks.

Great success, Kegbot was a big hit. The photos are incredible: a series of nervous drinking, to heavy pints, to complete chaos; every attendee’s pour captured by our scuffed Kegbot Tablet camera. There were often queues to use the kegbot system, so most photos are mangled groupshots. 10/10.

We noticed the github is dead, forums mostly dead (appreciation4 @moad), but we got the system mostly working and it really is quite incredible. Here I list the parts we use, and some hacks that helped us get things working. Hopefully someone finds it useful.

Parts and Setup

Flow meters

Water flow sensor YF-S201

Solenoid Valves

Solenoid pinch valve

Kegboard - Arduino Mega ATmega2560

Latest version from Github, flashed using Arduino software:

Note: originally we thought the Arduino had to be plugged into the Raspberry Pi Kegbot Server - But this did not work!

You need to look at the pin layout of the Arduino and need to wire the appropriate pins to the flowmeters and/or solenoid valves.

Kegbot Tablet - Google Nexus 7 Tablet

MUST use this 2014 release of Kegbot Android, the app crashes on other versions.

  • 2b36ffafeb71e17daf0484496992bb63a2439bf1
    Flowmeter configured within app after connecting to Kegbot Server Pi over wifi.

Kegbot Server - Raspberry Pi 4

Running on recent version of Raspbian (likely any OS would work, specs below).
Tablet and web interface available on local IP (192.168.0.x - found using ifconfig command).

Latest version of Kegbot Server from Github

  • Modified docker-compose.yml
    • Set to stable
      • My release is 357570b82a59bc5199fbb762c9882ab0ae11a73a07d9ec96f8a0a94b1ac0922f
    • Also replaced CHANGEME with a password
version: '3'

services:
  kegbot:
    image: ghcr.io/kegbot/server:stable
    restart: unless-stopped
    command: run_server
    build: .
    ports:
      - "8000:8000"
    volumes:
      - kegbot-data:/home/pi/kegbot-data
    tmpfs:
      - /tmp
      - /var/tmp
    environment:
      REDIS_URL: redis://redis:6379/0
      DATABASE_URL: mysql://kegbot_dev:CHANGEME@mysql/kegbot_dev
      KEGBOT_ENV: "debug"
      KEGBOT_SECRET_KEY: "CHANGEME"

  workers:
    image: ghcr.io/kegbot/server:stable
    restart: unless-stopped
    command: run_workers
    volumes:
      - kegbot-data:/home/pi/kegbot-data
    tmpfs:
      - /tmp
      - /var/tmp
    environment:
      REDIS_URL: redis://redis:6379/0
      DATABASE_URL: mysql://kegbot_dev:CHANGEME@mysql/kegbot_dev
      KEGBOT_DEBUG: "true"
      KEGBOT_SECRET_KEY: "CHANGEME"

  mysql:
    image: mysql:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: 'CHANGEME'
      MYSQL_USER: 'kegbot_dev'
      MYSQL_PASSWORD: 'CHANGEME'
      MYSQL_DATABASE: 'kegbot_dev'
    tmpfs:
      - /tmp
      - /var/tmp
    volumes:
      - mysql-data:/var/lib/mysql

  redis:
    image: redis:latest
    restart: always

volumes:
  mysql-data:
  kegbot-data:

Exposing Kegbot Server

With the plain kegbot website in this setup, we had two issues,

  1. The images were not loading.
  2. Kegbot website was not accessible remotely or at a domain.

To fix these, we had to do some hacks. These details are bit flakely but I can assist upon request.
First, we had to change the base URL of the website (somehow) in the Kegbot server python files, so that images and static files would be read from the correct location (ip or domain).

Secondly, we made a mirror of the kegbot website’s docker filesystem, using system links, we positioned the images and static stuff under /var/www/kegbot. And then we made an appropriate NGINX file, and also (optionally) pointed a domain.

Apparently you can just use KEGBOT_BASE_URL for this, only just learned this. arhg

Raspberry Pi Specs:

       _,met$$$$$gg.          pi@raspberrypi
    ,g$$$$$$$$$$$$$$$P.       --------------
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) aarch64
 ,$$P'              `$$$.     Host: Raspberry Pi 4 Model B Rev 1.2
',$$P       ,ggs.     `$$b:   Kernel: 6.6.20+rpt-rpi-v8
`d$$'     ,$P"'   .    $$$    Uptime: 7 days, 2 hours, 52 mins
 $$P      d$'     ,    $$P    Packages: 1259 (dpkg)
 $$:      $$.   -    ,d$$'    Shell: bash 5.2.15
 $$;      Y$b._   _,d$P'      Terminal: /dev/pts/0
 Y$$.    `.`"Y$$$$P"'         CPU: (4) @ 1.500GHz
 `$$b      "-.__              Memory: 1098MiB / 3792MiB
  `Y$$
   `Y$$.
     `$$b.
       `Y$$b.
          `"Y$b._
              `"""

Closing

We got stuck time and time again during the build process, months of wavering doubt that we’d ever get the system working. I thought it needed a full software rewrite and simplification, and I still do somewhat think this is the case. It would be a great project for someone, but so far we have avoided being nerdsniped too hard.

There are still some things which do not work perfectly, namely the NFC card to activate a user, the solenoid valves spam on and off for some reason.

Next, we would like to add Bitcoin lightning payments to open the valve and allow beer to flow. This would be fun and skips the need for cash or fiat infrastructure. People can just buy a prepaid NFC card that has bitcoin loaded on it. Instead of kegbot managing the valve, it’d just be a separate system running on the Pi.

  1. Buy preloaded bitcoin NFC card (cash or bank transfer)
  2. Tap card to pay and open valve
  3. Choose user
  4. Pour beer

Another idea we have is to use weight scales instead of flow meters, less foam, more accuracy. You could hack this into kegboard tbh. Do a rough calculation and translation of weight deltas into flow rates.

Later evolution is AI kegbot that can drink beer from itself. Coming soos

Cheers

Intermediate states



beer

cheers
-tonybingus

1 Like

Can confirm, Kegbot bent me over and penetrated me during Oktoberfest.

2 Likes

I’ve always wanted to play with solenoids but not got around to it yet. Would love a feature where you can load up an account with a certain number of beers per week or manually load up some credits.

Stoked to see another happy kegbot user. We really owe Mikey a few beers. I’ve said if he finds himself in Australia the beers are on me for the many years of kegbot usage I’ve enjoyed.

With the pi, you can run an arduino straight into it but you lose a lot of functionality like live flows and calibration that you get by going arduino into tablet. I’ve also found with usb c the options for tablets have opened up, nexus 7s got harder to find over the years. I recently got a Lenovo m10 and it works well.

Woot! I love seeing other folks getting systems up and running. I fell into the nerdsnipe trap. :stuck_out_tongue: