Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Notes on my Raspberry Pi setup

I'm setting up a Raspberry Pi 3 Model B as a server mainly for sensors in my home.

Base system

  • Raspbian GNU/Linux 8 (jessie)
  • timezone UTC



sudo iwlist wlan0 scan

wpa_passphrase "My-Network-SSID"

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

sudo wpa_cli reconfigure



# Remove logrotate
apt-get remove --purge logrotate

# swap syslogd
apt-get install busybox-syslogd
dpkg --purge rsyslog

Logs will be ephemeral this way. Use logread to access system logs.

Mosquitto MQTT Broker

sudo apt-get install mosquitto

Edit /etc/mosquitto/mosquitto.conf:

pid_file /var/run/
persistence false
log_dest none
include_dir /etc/mosquitto/conf.d
sudo service mosquitto start


  • Data should be written to a ramdisk
  • regularly backed up to S3
# install influxdb
curl -sL | sudo apt-key add -
echo "deb jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update && sudo apt-get install influxdb

# create ramdisk
sudo chmod 777 /var/lib/influxdb
sudo mount -t tmpfs none /var/lib/influxdb

# add this line to /etc/fstab:
tmpfs    /var/lib/influxdb    tmpfs    defaults    0    0

# start
sudo service influxdb start


Installing Go:

tar xzf go1.8.1.linux-armv6l.tar.gz
sudo mv ./go /usr/local/
sudo chmod g+w,o+w /tmp

tar xvzf v4.2.0.tar.gz && rm v4.2.0.tar.gz

Node Red

sudo apt-get install npm nodered
sudo service nodered start

Connect via http://raspberrypi.local:1880/


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment