keepcalculator

06 Numbers and Powers

Mac Setups Mac Keg Server? Setup Guide

Card No. 06·84993 · Updated · Standard formula, shown below

Yes, a Mac can be set up as a Kegbot server, but it requires some technical configuration because the official Kegbot server software is designed for Linux. You can run it on a Mac using Docker or a virtual machine, and then connect a flow meter and other hardware to monitor your keg. This guide explains the options, the steps, and the limitations so you can decide if it’s worth the effort for your home kegerator.

What Is a Keg Server?

A keg server is software that tracks how much beer is left in a keg and how much has been poured. It works by reading pulses from a flow meter installed in the beer line. Each pulse represents a small volume of liquid, and the server converts those pulses into ounces or milliliters. The server then displays the data on a web dashboard, showing pour history, estimated remaining volume, and sometimes temperature if you add a sensor.

The most well-known open-source project for this is Kegbot, which was originally developed for homebrewers. It includes a web interface, a database, and support for hardware like the Kegbot controller board or an Arduino with a flow sensor. The software itself is the server; the hardware is separate and connects to the Mac via USB or serial.

Why a Mac Is Not the Default Choice

Kegbot’s official documentation and installation scripts target Ubuntu Linux. The core server is written in Python and Django, and it relies on system services like PostgreSQL and Redis. While these all run on macOS, the setup is not turnkey. You have to manually install dependencies, configure the database, and manage the service. The Kegbot project also provides a pre-built Docker image, which is the easiest path on a Mac because Docker Desktop runs Linux containers natively.

Another reason Macs are less common is that the typical homebrew community often uses cheap Linux boards like a Raspberry Pi. A Pi is low-power, always-on, and costs less than a Mac. But if you already have a Mac mini or an older MacBook that stays plugged in, it can work fine.

Option 1: Run Kegbot in Docker on macOS

Docker is the recommended way to run Kegbot on a Mac. It isolates the Linux environment, so you avoid dependency conflicts with macOS system Python or Homebrew packages.

  1. Install Docker Desktop for Mac from the official Docker website.
  2. Clone the Kegbot repository or download the docker-compose.yml file from the official Kegbot GitHub repository.
  3. Open a terminal in the directory with the docker-compose.yml file.
  4. Run docker compose up -d to start the database and web server containers.
  5. Open your browser to http://localhost:8000 and follow the setup wizard to create an admin account.

The Docker image includes all the server components, so you do not need to install Python or PostgreSQL manually. The main challenge is connecting the USB flow meter to the container. You need to pass the USB device through to the container using the devices option in the compose file. For example, add devices: and then - /dev/tty.usbserial-XXXX:/dev/ttyUSB0 under the kegbot service. The exact device name depends on your flow meter’s USB serial adapter, which you can find with ls /dev/tty.* in the terminal.

Option 2: Run Kegbot in a Virtual Machine

If you prefer not to use Docker, you can run a full Linux virtual machine on your Mac using software like UTM or VirtualBox. This gives you a standard Ubuntu environment where you can follow the official Kegbot installation instructions for Linux. The steps are:

  1. Create a new virtual machine with Ubuntu Server 22.04 or later.
  2. Allocate at least 2 GB of RAM and 20 GB of disk space.
  3. Boot the VM and install the server OS.
  4. Follow the Kegbot installation guide for Ubuntu, which includes installing Python, PostgreSQL, and the Kegbot package.
  5. Configure the flow meter as a serial device in the VM settings, mapping the Mac’s USB port to the VM’s serial port.

This approach is more resource-heavy than Docker, but it might be more familiar if you already use VMs for other projects. The downside is that you must maintain the VM’s operating system and updates yourself.

Hardware You Need to Connect

The software alone does nothing without a flow meter. The most common setup for home use is a flow meter that fits into the beer line, typically a Hall-effect sensor that outputs a pulse per revolution. You also need a microcontroller or a USB interface to read those pulses and send them to the Mac. The official Kegbot controller is one option, but many people use an Arduino or a Raspberry Pi Pico with a USB connection.

Here is a basic parts list:

  • Flow meter (e.g., a 1/4-inch or 3/8-inch inline sensor, rated for food-grade liquids)
  • Microcontroller (Arduino Uno, Nano, or a Raspberry Pi Pico)
  • USB cable to connect the microcontroller to the Mac
  • Power supply for the microcontroller (usually USB power is enough)
  • Beer line fittings and clamps to install the flow meter in the line

The flow meter sends a digital pulse signal. The microcontroller counts these pulses and sends them over USB as a serial stream. Kegbot’s client software (called the “kegboard” firmware) reads that stream and updates the database.

Common Problems and How to Fix Them

The most frequent issue is that the Mac does not see the flow meter. Check the system information to see if the USB device is recognized. On macOS, open System Information > USB and look for the device. If it appears, note the vendor and product IDs. In Docker, you must explicitly map the device, and the container must run in privileged mode or have the right device cgroup permissions.

Another common problem is that pours are not recorded accurately. This usually happens when the flow meter’s calibration factor is wrong. Kegbot lets you set a calibration value in the admin panel, typically in pulses per milliliter. You can calibrate by pouring a known volume, say 500 ml, and adjusting the factor until the displayed volume matches. Also, make sure the flow meter is installed in the correct orientation (the arrow on the body should point in the direction of flow).

If the server crashes or the database becomes corrupted, you can restart the containers with docker compose restart. For persistent storage, ensure you have a volume mounted for the PostgreSQL data, otherwise you lose all history when the container is removed.

Alternatives to Running Your Own Server

If the technical setup feels like too much, there are simpler alternatives that do not require a dedicated server. Some commercial kegerator controllers, like those from Kegco or Edgestar, have built-in pour counters, but they are not network-connected. There are also cloud-based services that work with a Raspberry Pi, but they require a subscription and an internet connection.

Another option is to use a simple spreadsheet or a manual tally counter. It is not automated, but it is free and requires no setup. For many home users, the novelty of tracking pours wears off, and the effort of maintaining a server is not worth it. If you are a homebrewer who wants to track how much of each batch is left, a manual log is often sufficient.

If you do decide to go the server route, consider using a Raspberry Pi instead of a Mac. The Pi is cheaper, uses less power, and has extensive documentation for Kegbot. You can even run the Pi headless and access the dashboard from any device on your network.

Frequently Asked Questions

Can I use a Mac mini as a dedicated keg server? Yes, a Mac mini works well. It is small, quiet, and can run 24/7. Use Docker to run Kegbot, and keep the Mac connected to your network and power. Just remember to set the energy saver settings to prevent it from sleeping.

Do I need a separate computer for the flow meter? You need a microcontroller to read the flow meter’s pulses, but it can be a cheap Arduino. The microcontroller connects to the Mac via USB. The Mac runs the server software and processes the data.

Is Kegbot still maintained? The Kegbot project has had periods of low activity, but the Docker image and core code are still available on GitHub. It is open source, so you can fork it and make changes. For basic pour tracking, it works fine even if it is not actively developed.

Can I use a Bluetooth flow meter instead of USB? Some flow meters support Bluetooth, but Kegbot does not natively support Bluetooth. You would need to write a custom script to read the Bluetooth data and push it to the server. USB is the simplest and most reliable option.

What if I only want to track one keg at a time? Kegbot supports multiple taps, but you can configure it with a single tap. You just need one flow meter and one input channel. The dashboard will show one keg’s data.

Will the flow meter affect the taste or carbonation of the beer? A properly installed flow meter does not change the beer’s flavor. It is a small obstruction in the line, but it does not introduce oxygen or contaminants if you use a food-grade sensor and clean it regularly. The main effect is a slight increase in line resistance, which may require adjusting your CO2 pressure to maintain the same pour speed.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →