How to Install InfluxDB 3 Core and Telegraf on Debian 13
Set up InfluxDB 3 Core and Telegraf on Debian 13 from the official repository and collect CPU, memory, disk and load metrics every ten seconds.
InfluxDB is a time-series database, and Telegraf is the agent that collects metrics and writes them into it. By the end of this guide a Debian 13 server will run InfluxDB 3 Core and Telegraf from the official InfluxData repository, with CPU, memory, disk and load figures arriving every ten seconds. The same commands work on Debian 12.
InfluxDB 3 Core is the current open-source edition. It replaces the 1.x series that older tutorials install from a single .deb file: the port is now 8181 instead of 8086, every request needs a token, queries are written in SQL or InfluxQL, and the old web interface on port 8083 no longer exists.
Requirements
- Debian 13 (or Debian 12) on amd64 or arm64, with systemd.
- A user with
sudorights. - Telegraf 1.38 or newer for the native InfluxDB 3 output plugin. The repository version is newer than that.
Step 1: Add the InfluxData repository
Install the tools needed to fetch and check the signing key:
sudo apt-get update
sudo apt-get install -y curl gnupg
sudo install -d -m 0755 /etc/apt/keyrings
Download the key, verify its fingerprint and register the repository. The fingerprint is the one published in the InfluxData documentation; if the check fails, nothing is written and no repository is added.
curl --silent --location -O https://repos.influxdata.com/influxdata-archive.key
gpg --show-keys --with-fingerprint --with-colons ./influxdata-archive.key 2>&1 \
| grep -q '^fpr::*24C975CBA61A024EE1B631787C3D57159FC2F927:$' \
&& cat influxdata-archive.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/influxdata-archive.gpg > /dev/null \
&& echo 'deb [signed-by=/etc/apt/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main' \
| sudo tee /etc/apt/sources.list.d/influxdata.list
The repository uses the suite name stable for every Debian and Ubuntu release, so the line is identical on Debian 12 and 13.
Step 2: Install and start InfluxDB 3 Core
sudo apt-get update
sudo apt-get install -y influxdb3-core
The package installs a systemd unit named influxdb3-core. It is enabled for boot but not started, so that you can review the configuration first. The settings are in /etc/influxdb3/influxdb3-core.conf; by default data is stored as Parquet files on the local disk under /var/lib/influxdb3/data. Start the service and check it:
sudo systemctl start influxdb3-core
sudo systemctl status influxdb3-core
influxdb3 --version
If the service does not stay up, read its log with sudo journalctl --unit influxdb3-core -n 100 --no-pager. After any change to the configuration file, restart the service; a reload is not supported.
Step 3: Create an admin token and a database
Create the first admin token, called the operator token:
influxdb3 create token --admin
The token string is printed once and cannot be shown again, so copy it to your password manager now. Put it in a shell variable so that the next commands can pass it with --token, and create a database for Telegraf:
export INFLUXDB3_AUTH_TOKEN='paste-the-token-here'
influxdb3 create database --token "$INFLUXDB3_AUTH_TOKEN" telegraf
Without a retention period the data never expires. To have InfluxDB delete old metrics automatically, create the database with a retention period instead, for example influxdb3 create database --retention-period 30d --token "$INFLUXDB3_AUTH_TOKEN" telegraf. In Core the retention period cannot be changed after the database exists.
Step 4: Install and configure Telegraf
sudo apt-get install -y telegraf
Keep the token out of the configuration file. Store it in /etc/default/telegraf, which the service reads as an environment file, and make that file readable by root only:
echo "INFLUX_TOKEN=$INFLUXDB3_AUTH_TOKEN" | sudo tee /etc/default/telegraf > /dev/null
sudo chmod 600 /etc/default/telegraf
The packaged /etc/telegraf/telegraf.conf is a very long file of commented examples and enables an output for InfluxDB 1.x. Keep it as a reference and replace it with a short file:
sudo mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.sample
sudo nano /etc/telegraf/telegraf.conf
[agent]
interval = "10s"
flush_interval = "10s"
[[outputs.influxdb_v3]]
urls = ["http://127.0.0.1:8181"]
token = "${INFLUX_TOKEN}"
database = "telegraf"
[[inputs.cpu]]
percpu = false
totalcpu = true
[[inputs.mem]]
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "overlay", "squashfs"]
[[inputs.system]]
The four inputs cover CPU usage, memory usage, disk usage and load average. Run the inputs once and print the result without sending anything:
telegraf --config /etc/telegraf/telegraf.conf --test
If you see lines of metrics, enable and restart the service:
sudo systemctl enable telegraf
sudo systemctl restart telegraf
sudo journalctl --unit telegraf -n 20 --no-pager
The log should show the loaded inputs and outputs and no write errors.
Step 5: Verify that data arrives
Wait about half a minute, then list the tables Telegraf created and read the newest CPU samples:
influxdb3 query --token "$INFLUXDB3_AUTH_TOKEN" --database telegraf "SHOW TABLES"
influxdb3 query --token "$INFLUXDB3_AUTH_TOKEN" --database telegraf \
"SELECT time, host, usage_idle FROM cpu ORDER BY time DESC LIMIT 5"
Load average is in the system table:
influxdb3 query --token "$INFLUXDB3_AUTH_TOKEN" --database telegraf \
"SELECT time, load1, load5, load15 FROM system ORDER BY time DESC LIMIT 5"
Security and maintenance
- Network exposure: check which address the database listens on with
sudo ss -tlnp | grep 8181. If it is not limited to localhost and you only use it locally, block port 8181 in your firewall. Tokens protect the data, but the API is plain HTTP unless you configure TLS or put a reverse proxy in front. - Separate tokens: the operator token has full control. Create a named admin token for Telegraf with
influxdb3 create token --admin --token "$INFLUXDB3_AUTH_TOKEN" --name telegrafand put that one in/etc/default/telegraf, so you can revoke it without touching your own. - Updates: both packages are updated by
sudo apt-get update && sudo apt-get upgrade. - More servers: install only Telegraf on the other machines, use the same configuration and change
urlsto the address of the InfluxDB host. - Dashboards: Grafana has an InfluxDB data source that can query InfluxDB 3 with SQL or InfluxQL.
Reference: InfluxDB 3 Core installation and configuring Telegraf for InfluxDB 3.
Frequently asked questions
Can I still install InfluxDB 1.x or 2.x on Debian 13?
Yes. The same repository carries the older lines as the influxdb (1.x) and influxdb2 (2.x) packages, and 1.x still receives maintenance releases. Use them when an existing application depends on their APIs or on Flux; for a new installation start with InfluxDB 3 Core.
My existing Telegraf configuration uses the influxdb or influxdb_v2 output. Does it work with InfluxDB 3?
Yes. InfluxDB 3 offers compatibility endpoints for both. With outputs.influxdb_v2, set organization = "" and use the database name as bucket. With the 1.x outputs.influxdb plugin, pass the token as password and set skip_database_creation = true, because databases cannot be created through the 1.x API.
Is InfluxDB 3 Core suitable for long-term history?
The documentation describes Core as optimized for real-time and recent data on a single node. It is a good fit for monitoring one or a few servers. For large historical queries or high availability, InfluxData points to the commercial Enterprise edition.
How do I add more metrics?
Add input sections to telegraf.conf, for example [[inputs.net]], [[inputs.diskio]] or [[inputs.nginx]], using the commented examples in telegraf.conf.sample, then restart Telegraf. Each input creates its own table in the database.