Raspberry Pi Instructions

Below is a step by step guide on how to get BrewPress running on your Raspberry Pi.

At this stage, the guide may be incomplete or may contain steps that aren’t required for your system. These are basically just notes and links to tutorials that I used on the way to working out how to get this all working on my own system. I’m no expert in Linux, Raspberry Pi’s or writing automation programs, so take from it what you will.
If something doesn’t make sense in these steps, then Google will be your friend.

On the hardware side of things, you will need at the very least:

  • A Raspberry Pi – any model should work
  • An SD card with at least 8GB of space. 16GB+ would be better.
  • DS18B20 sensor
  • SSR
  • The ability to wire it all up

Some good guides for hardware related stuff can be found here – https://leaningman.com/project-type/brewery-controller/.  Their controller is based on the very awesome CraftBeerPi, which was also the inspiration for BrewPress. So any guide on wiring up the Raspberry Pi for CraftBeerPi should be good for using with BrewPress.

In a nutshell

  1. Install NOOBS – https://www.raspberrypi.org/help/noobs-setup/2/
  2. Install WiringPi – http://wiringpi.com/
  3. Install WordPress – https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress/
  4. Install BrewPress


Step By Step Instructions

Setting up the Raspberry Pi

  1. Download NOOBS and copy to your formatted SD card – https://www.raspberrypi.org/help/noobs-setup/2/
    1. Insert card into Pi and boot it up
    2. Choose Raspbian as the OS to install
  2. Configure some settings on the Pi (found in Configuration menu)
    1. Setup WiFi on the Pi (if using WiFi instead of ethernet cable)
    2. Enable SSH – https://www.raspberrypi.org/documentation/remote-access/ssh/
    3. Enable Remote GPIO
    4. Enable 1-Wire
    5. Updated my password
    6. Reboot Pi
  3. Log into Pi using: sudo ssh [email protected] (or whatever IP yours is on). User is pi and password is raspberry (if you did not change it already)
  4. ** Optional – Set a static IP, so that when logging in via SSH, the IP remains the same
    1. run: sudo nano /etc/dhcpcd.conf
    2. At the bottom of the file add the following (IP’s may be different to yours. And the wlan0 is for WiFi ):
      interface wlan0
      static ip_address=
      static routers=
      static domain_name_servers=
    3. Disable WiFi power off: sudo nano /etc/modprobe.d/8192cu.conf and then: options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
  5. **Optional – Configured some security stuff as a precaution
    1. I changed my SSH port: sudo nano /etc/ssh/sshd_config
    2. Force password for sudo commands: sudo nano /etc/sudoers.d/010_pi-nopasswd and then: pi ALL=(ALL) PASSWD: ALL
    3. Block repeated wrong password attacks: sudo apt-get install fail2ban -y
    4. Update SSH security: apt install openssh-server
  6. Update package lists and upgrade packages on the Pi: sudo apt-get update and sudo apt upgrade

Setup WiringPi

  1. Download and install wiringPi
    • cd
      sudo git clone git://git.drogon.net/wiringPi
      cd wiringPi
      sudo git pull origin
  2. Test that it is working
    • gpio -v gpio readall
  3. Configure
    • sudo nano /etc/modules
    • Add the following:
      • w1-gpio
  4. If you have a senseor connected correctly, the following commands should list your sensor:
    • cd /sys/bus/w1/devices/
  5. Now update the config file – more info here: https://pinout.xyz/pinout/1_wire
    • cd /boot
      sudo nano config.txt
    • Add the following
      • dtoverlay=w1-gpio,gpiopin=4,pullup=on

Installing Apache, MySQL and PHP

Here is a good guide that is more in depth and covers steps that might not be covered here – https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress/

  1. Install Apache
    • sudo apt-get install apache2 -y
  2. Install PHP
    • sudo apt-get install php -y
  3. Install MySQL – you will be prompted for a password which you will need later when setting up the WordPress database.
    • sudo apt-get install mysql-server php-mysql -y
      sudo apt install mysql-server mysql-client
      sudo apt-get install mariadb-server -y
      sudo mysql_secure_installation
    • After running the above command, you’ll be asked a series of questions:
      • Enter current password for root (enter for none): — press Enter
      • Type in Y and press Enter to Set root password?
      • Type in a password at the New password: prompt, and press Enter. Important: remember this root password, as you will need it later to set up WordPress
      • Type in Y to Remove anonymous users.
      • Type in Y to Disallow root login remotely.
      • Type in Y to Remove test database and access to it.
      • Type in Y to Reload privilege tables now.
  4. Restart the Apache server
    • sudo service apache2 restart

Download WordPress

  1. Log into Pi using: sudo ssh [email protected] (using your IP)
  2. Change directory and delete all files in the folder:
    • cd /var/www/html/
      sudo rm *
  3. Download WordPress, extract it and move it into the current directory
    • sudo wget http://wordpress.org/latest.tar.gz
      sudo tar xzf latest.tar.gz
      sudo mv wordpress/* .
      sudo rm -rf wordpress latest.tar.gz
  4. Change the ownership of all these files to the Apache user
    • sudo chown -R www-data: .

Setup the database

  1. sudo mysql -uroot -p
  2. create database wordpress;
  3. GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'xxxxxx';
    (xxxxxx is the password you created earlier)
  4. Exit the MariaDB prompt with Ctrl + D.

Install WordPress

  1. Open the web browser on your Pi and visit http://localhost
  2. Follow the onscreen instructions to finalize the installation of WordPress
  3. On  another computer or device that is connected to your network, you should be able to visit http://pi-ip-address and view your new WordPress site.

Configure WordPress & other tweaks

  1. Enable pretty permalinks by following these instructions – https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress/8#friendly-permalinks
  2. Update file upload size in php.ini
    • cd /etc/php/7.0/apache2
      sudo nano php.ini
      line 890 - mysqli
      upload_max_filesize = 24M
      post_max_size = 32M
      sudo service apache2 restart
  3. Grant permissions for Apache to execute shell scripts
    • sudo visudo
    • www-data ALL=NOPASSWD: ALL

Install BrewPress

Go to the Plugin Installation page for instructions on how to install BrewPress.