# Smokeping Guide This guide will walk you through how to set up smokeping on a raspberry pi using docker and ubuntu server. ## Install Ubuntu Server ### Download Ubuntu Image In our example we're using a pi 3, so we'll go and grab their Ubuntu install image from [here](https://ubuntu.com/download/raspberry-pi). ### Install Etcher You can use any variety of programs for this, including something as basic as ```dd```, however for ease of use I recommend using [etcher](https://www.balena.io/etcher/). Once downloaded, install the program. ### Write image Once etcher is installed, unzip the the Ubuntu Server image and use etcher to write it to an SD card. It will prompt you to type in a password, this is normal. _If the SD card was already mounted it may fail, just retry and it should work fine._ ### Edit pre-boot configuration files Once etcher has finished, macos will automatically mount the boot partition of the SD card ready for use. Ubuntu server ships with two files in the boot partition to allow customisations such as network config and passwords before first boot: [network-config](config_files/network-config)
[user-data](config_files/user-data) _These config files are only used on the first boot, modifying them after first boot will have no effect. If you want to re-apply you must re-flash the SD card or manually edit the pi's configuration files by logging in to it._ #### network-config The [network-config](config_files/network-config) set up the network interfaces for options such as: * DHCP * Static IP * Wifi Networks For the purposes of this tutorial it is safe to leave it as standard - this will give the pi a dynamic DHCP address. #### user-data The [user-data](config_files/user-data) file is used for a variety of configuration items, such as setting up users, installing packages, configuring hostnames etc. For the purposes of this tutorial we are going to do the following things: * Disable automatic password expiry for the default user * set the hostname to _smokepi_ To do this, edit the ```user-data``` config file, find the following section and modify it from: ``` chpasswd: expire: false list: - ubuntu:ubuntu ``` To: ``` chpasswd: expire: true list: - ubuntu:ubuntu hostname: smokepi ``` Optionally you could change the default password from _ubuntu_ to _password1_ by changing it to this instead: ``` chpasswd: expire: true list: - ubuntu:password1 hostname: smokepi ``` #### Clear graphs ``` sudo rm -rf /opt/smokeping/data/* ```