Carpe Diem:16 February, 2020

Installing CraftBeerPi

This post may contain affiliate links. Please see our disclaimer for more info.

I’ve been homebrewing for a few years now. One excellent quality control in my brew process that I’ve found is maintaining a proper fermentation temps. I use a mini fridge for my fermentation chamber – it works great. I received this mini fridge a few years ago, but it was broken. The control unit was dead, but the compressor worked just fine. I rewired the fridge to use an Inkbird temp controller as the brains. This worked great for years, however it lacks a couple nice features – intelligence and accessibility. I wanted to be able to control my fermentation chamber and monitor it remotely. I did some digging and found CraftBeerPi (CBP) – a brewing and fermentation controller. So far I’ve been pretty pleased.

Why Craftbrewpi?

There are a variety of homebrew solutions out there for a Raspberry Pi or other devices. I ultimately picked CraftBeerPi because it had all the features I wanted including:

  • Works on headless setup
  • Low overhead (runs perfectly on a pi zero w lnk)
  • Has designated fermentation controls
  • Is extensible with add-ons
  • Decent setup documentation and troubleshooting
  • Open source

That’s not to say it comes without any problems – the primary developer of CraftBeerPi hasn’t spent much time updating v3 lately. Luckily there is enough community support out there to still get things up and running. Apparently the developer is working on v4, but there isn’t anything out there except a video demo or two. Manuel has made some great software – I hope he finds the time again to rejoin his work!

CraftBeerPi 2.2 vs 3

Version 3 is still technically a beta, but it’s the version of choice by many of the community. 2.2 works, but it has its issues as well. I could never get it running properly due to install issues with versions of Raspbian. I eventually switched to v3 and haven’t turned back. V3 has nice additional features, runs well enough, and has decent support from the community, so from my perspective, no reason not to use v3.

Hardware Needed

This guide is aimed at using a Raspberry Pi to run CraftBeerPi, but it could be run on a variety of devices. For my setup, I use the following:

  • Raspberry Pi Zero – this is an amazon link, though you can likely find it cheaper elsewhere during a sale (think Pi day! March 14th)
  • Zero Starter Kit
  • Power Adapter (I use an iPhone one I had extra) – just about any AC to USB adapter will work. Aim for at least 1 amp, though I’m using a 750ma one without issue for CraftBeerPi. See this article for an analysis on power consumption.

Installing Raspbian

  1. Download the Raspbian Lite image (you can download a desktop version, but it’s not necessary for this) to install on your pi. Some folks use the NOOBS installer, but I prefer my old fashioned image install
  2. Download Etcher – this is used to write the image properly to an SD card
  3. Flash the SD card with the Raspbian image within Etcher – v easy, follow the steps in app.

Depending on if you are running headless setup (no monitor/keyboard hooked up), you’ll want to follow some additional steps so the pi can automatically connect to WiFi and be accessible via SSH. If you are using your pi with a keyboard/monitor, skip the headless setup.

Headless Setup

I googled and found many helpful links. The steps are:

  1. After flashing your SD card, unplug and replug it into your computer. You should see a volume named ‘boot’. This is a fat32 formatted volume so just about any OS can read/write on it.
  2. Create a file named ‘ssh‘ with no extension and no contents in the file. Save this file in ‘boot’ (no folders needed)
  3. Create a separate file named ‘wpa_supplicant.conf‘. This file will contain wifi info and credentials so the pi knows how to connect to your network. I’ve included an example of what this file looks like below, but see this page on directions on how to set up the file properly. I highly recommend not storing your wifi credentials in plain text, use the wifi hashing program wpa_passphrase that comes with Raspbian – see here for details.
  4. After you’ve saved these two files to boot, pop the SD card into your Raspberry Pi and power up! It’ll take a few minutes to get the first boot setup. Once it’s done, you’ll be able to SSH into your pi with the default credentials: user is ‘pi’ and password is ‘raspberry’. Change your password at a later time – DO NOT use the default password if exposing your pi outside of your local network.

Standard Setup

  1. For non-headless setup, plug the SD into the Raspberry Pi and power up. It’ll run through some initial first boot setup then prompt for a login. Use the default credentials: user is ‘pi’ and password is ‘raspberry’. Change your password at a later time – DO NOT use the default password if exposing your pi outside of your local network.
  2. Use this page to set up wifi.  I highly recommend not storing your wifi credentials in plain text, use the hashing program that comes with Raspbian – see here for details.
  3. Use the Raspbian config tool sudo raspi-config to tweak any other options you may want enabled (such as ssh access)

Installing CraftBeerPi

Now that we are up and running with Raspbian, next is installing the software needed to run CBP. As mentioned before, CBP does not come without its problems. The biggest pain point is installing. Since the repo hasn’t been actively maintained, the install process is outdated. Not all of the required dependencies are properly installed – luckily it’s pretty easy to do manually to get things up and running.

First Login into the Pi! Time to start installing
  1. First run sudo apt-get update and sudo apt-get upgrade get the latest packages and updates (this can take a LONG time on slower CPUs).
  2. Next install git by running sudo apt-get install git
  3. Next clone the CBP repo by following the below steps per the readme. Depending on your setup, this can take 5-10 min. Enter the following commands:
    1. git clone
    2. cd craftbeerpi3
    3. sudo ./
    4. Then install from the menu. No need to have it run apt-get update and apt-get upgrade again but it can’t hurt.
    5. Additionally, if you are prompted for installing one-wire support, select yes if you plan to do so (most CBP setups use this)
  4. Now comes the fun part! Depending on how much is outdated when you are trying to install, not all the dependencies are installed properly with the CBP installation. Instead of running CBP from the script, try running sudo ./ This will attempt to start CBP, but you’ll be able to quickly see the error trace on the console (vs having to dig in a file). At the bottom of the error trace, you’ll see something along the lines of ImportError: No module named xx. The ‘xx’ is the component we need to install.
  5. In order to install the missing components, we need to install pip first. Pip is the python package manager. Run sudo apt-get install python-pip to get it installed.
  6.  The steps from here are iterative as follows:
    1. sudo ./ – see what component is missing
    2. sudo pip install xx where ‘xx’ is the missing component from step 1 above
Manually installing missing modules

Here’s the code I needed to run to get CBP working early September 2019:

sudo apt-get install python-pip
sudo pip install flask
sudo pip install flask_socketio,
sudo pip install flask_classy
sudo pip install PyYAML # use when module 'yaml' can't be found
sudo pip install GitPython # use when module 'git' can't be found
Sudo pip install requests
CraftBeerPi is running!

Once you see the line INIT DB after running, CBP is running. SUCESSS! We want CBP to run as a daemon (on it’s own), so terminate by pressing ctrl-z. Then run again and start CBP from here. You can also set CBP to autostart at boot from here.

Once CBP is all set up, access it via port 5000:

  • Locally (on your pi) –
  • Remotely (from a different computer) – use the Raspberry Pi IP address. e.g.

Next, follow the hardware setup instructions on CBP to start getting your hands dirty. Also take a look at the add-on plugins available – there are a bunch of them. Install them from within CraftBeerPi. Here are the ones I use:

  1. Brewer’s Friend – sends updates to BF such as fermentation temps for graphing
  2. IFTTT Notifications – sends notifications to IFTTT
  3. GPIOCompressor – tweaks the cooling setup of fermentation to not turn the compressor on/off in quick succession potentially damaging the compressor


  1. Shawn Reply

    I walked this along and made headway but now have this :

    from flask.ext import wtf
    ImportError: No module named ext.

    When I try to install flask.ext I get an error that says Could not find a version that satisfies the requirements….

    Any ideas?

    1. Alex Post author Reply

      Shawn – so sorry for the delayed response. I didn’t see this comment come in! Are you still working through this?

      Have you tried running the below to install other the flask libraries?

      sudo pip install flask_socketio
      sudo pip install flask_classy

  2. Jeffery Schneider Reply

    Alex thank you so much for these instructions! I was having a heck of a time getting CBP to work then stumbled on your instructions and everything worked perfectly. Right now all I have is a Tilt Hydrometer, but found excellent instructions for that as well… someday maybe I’ll go electric ¯\_(ツ)_/¯

    1. Alex Post author Reply

      Awesome! I’m glad they helped. I had a bit of a challenge my first time getting things running so was hoping this would save some time and effort for some additional folks.

      I’ve debated a full electric brewing setup. It’s neat from a technical standpoint, but part of the joy of homebrewing for me is the cooking aspect. Having an automated electrical system takes that a away a little. But who know!

  3. Nacho Reply

    Hi i have a problem with “flask.ext”, no module named ext.
    From what I read, recommending using Windows 10. Do you have any other solution?

    1. Alex Post author Reply

      Hi! Not sure what you mean by Windows 10; CBP runs on linux. No Win10 involvement except perhaps when you format your SD Card. Regarding flask… Have you tried running the below to install other the flask libraries?

      sudo pip install flask_socketio
      sudo pip install flask_classy

Leave a Reply

Your email address will not be published. Required fields are marked *