Skip to content

InfluxDB Setup

InfluxDB is an open-source, high-performance time series database designed for fast data storage and retrieval. It scales across multiple machines and clusters, and includes a built-in web interface for managing data and creating visualizations.

Core Concepts

Before installing, it helps to understand a few InfluxDB-specific terms:

InfluxDB TermComparable ToDescription
OrganizationDatabase (MySQL)Top-level grouping for your data
BucketCollection (MongoDB) or Table (MySQL)A named storage location for time series data
MeasurementTable nameA logical grouping of related data points
TagIndexed columnMetadata used to identify and filter data (e.g., location, device)
FieldData columnThe actual measured values (e.g., temperature, CPU usage)
Retention Policy--Rules for how long data is kept before automatic deletion

Installation

INFO

On this course we will use InfluxDB 2, since the version 3 requires Docker containers for the GUI. Docker and containers are not covered on this course

Windows PowerShell

  1. Open PowerShell as Administrator (search for PowerShell in the Start menu and select "Run as administrator")
  2. Follow the official installation guide: InfluxDB Windows Install

TIP

The installation guide version may have errors in the extract commands. If the commands fail, check the file and folder names match what was actually downloaded.

powershell
Expand-Archive .\influxdb2-2.8.0-windows_amd64.zip -DestinationPath 'C:\InfluxData\'
C:\InfluxData\influxd.exe

After installation, start InfluxDB from the command line:

powershell
cd "C:\InfluxData"
.\influxd.exe

InfluxDB listens on port 8086 by default. Stop it with Ctrl + C.


Initial Setup

  1. Open the InfluxDB UI at http://localhost:8086
  2. On the first launch, you will be asked to set up:
    • Username and password
    • Organization name
    • Initial bucket name

Setup Initial User

WARNING

Save your username and password -- you will need them to log in later.

  1. When asked about setup options, select Quick Start to get started immediately

Quick Start


After setup, the InfluxDB web interface provides:

  • Buckets -- listed in the left sidebar under "Load Data". You can create new buckets and manage retention policies here
  • Data Explorer -- build queries visually or with code to explore your data
  • Dashboards -- create and save visualizations of your data
  • API Tokens -- manage access tokens for programmatic data access (under "Load Data" > "API Tokens")

Sidebar Navigation

Viewing Data

In the Data Explorer, you can:

  • Select a bucket and apply filters to build a query
  • Toggle View Raw Data to see data in table format
  • Switch between visual graph and raw data views
  • Export data as CSV

Data Explorer

You can also view the raw data in table format:

Raw Data Table


API Tokens

To write or read data programmatically (e.g., from Python), you need an API token. Data can be added in several ways -- via client libraries, line protocol files, CSV uploads, and more:

Add Data Options

  1. Navigate to Load Data > API Tokens in the left sidebar
  2. Click Generate API Token
  3. Copy and save the token immediately

WARNING

The token is only displayed once at creation time. If you lose it, you will need to create a new one.


Data Storage: Line Protocol

InfluxDB uses a text-based format called line protocol for writing data. The format is:

measurement,tag_key=tag_value field_key=field_value

For example:

temperature,location=office current_temp=21.5
  • temperature is the measurement name
  • location=office is a tag (metadata for filtering)
  • current_temp=21.5 is a field (the actual data value)

TIP

Note the comma between the measurement and tags (no space), and the space before the fields.

Multiple tags and fields are separated by commas:

weather,city=Helsinki,station=Kumpula temperature=18.2,humidity=65.0

When data is written, InfluxDB automatically adds a timestamp. You can also provide your own timestamp at the end of the line.


Further Reading

Lapland University of Applied Sciences

© 2026 Juha Petäjäjärvi

© 2026 Juha Petäjäjärvi