InfluxDB on Raspberry Pi4

This is a guide for installation of InfluxDB on Raspberry Pi 4 running Ubuntu Server 21.10.
This guide is written for installation on Raspberry Pi however setup would be nearly identical on a VPS.

InfluxDB is an open source time series database developed by InfluxData. It is a great database for storing large amounts of timestamped data which is perfect for IoT sensors. InfluxDB V2.X is now available which is a major upgrade however for now I am sticking with V1.8 for my projects until I have more time to understand any issues with migration.

Table of Contents

    1. Install Ubuntu Server 21.10.

    See this guide for a secure basic installation of Ubuntu 21.10.

    2. Install InfluxDB

    The vendor repositories from InfluxData will be used.
    Installed Version: 1.8.10-1
    See the following link for the lastest stable releases:

    The installation assumes user has root access

    1. Switch to root environment
      sudo -i
    2. Update Repositories
      • curl -sL | sudo apt-key add -
      • echo "deb buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
      • apt-get update
    3. Install
      apt-get install -y influxdb
    4. Enable services
      systemctl enable influxdb
      systemctl start influxdb
    5. The successful start can be verified via
      systemctl status influxdb.service
    6. switch back to user account

    Configure InfluxDB for use with your sensors

    Create basic example Database with the following parameters

    • database name: my_sensors (no retention policies)
    • user: my_sensors_user
    • password: my_sensors_password
    1. Start influx console
    2. create database within InfluxDB console
    > create database my_sensors
    > use my_sensors
    > create user my_sensors_user with password 'my_sensors_password' with all privileges
    > grant all privileges on my_sensors to my_sensors_user
    > exit