Get started with InfluxDB

See .

macOS Docker

Download InfluxDB v2.0 for macOS.

InfluxDB v2.0 (macOS)

(Optional) Verify the authenticity of downloaded binary

For added security, use to verify the signature of your download. (Most operating systems include the gpg command by default. If gpg is not available, see the for installation instructions.)

  1. Download and import InfluxData’s public key:

  2. Download the signature file for the release by adding .asc to the download URL. For example:

    1. wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.1_darwin_amd64.tar.gz.asc
  3. Verify the signature with gpg --verify:

    1. gpg --verify influxdb-2.0.1_darwin_amd64.tar.gz.asc influxdb-2.0.1_darwin_amd64.tar.gz

    The output from this command should include the following:

    1. gpg: Good signature from "InfluxData <support@influxdata.com>" [unknown]

Unpackage the InfluxDB binaries

To unpackage the downloaded archive, double click the archive file in Finder or run the following command in a macOS command prompt application such Terminal or iTerm2:

  1. # Unpackage contents to the current working directory
  2. tar zxvf ~/Downloads/influxdb-2.0.1_darwin_amd64.tar.gz

(Optional) Place the binaries in your $PATH

If you choose, you can place influx and influxd in your $PATH or you can prefix the executables with ./ to run then in place.

  1. # (Optional) Copy the influx and influxd binary to your $PATH
  2. sudo cp influxdb-2.0.1_darwin_amd64/{influx,influxd} /usr/local/bin/

Both InfluxDB 1.x and 2.x include influx and influxd binaries. If InfluxDB 1.x binaries are already in your $PATH, run the 2.0 binaries in place or rename them before putting them in your $PATH. If you rename the binaries, all references to influx and influxd in this documentation refer to your renamed binaries.

Networking ports

By default, InfluxDB uses TCP port 8086 for client-server communication over the .

Start InfluxDB

Start InfluxDB by running the influxd daemon:

  1. influxd

Run InfluxDB on macOS Catalina

macOS Catalina requires downloaded binaries to be signed by registered Apple developers. Currently, when you first attempt to run influxd or influx, macOS will prevent it from running. To manually authorize the InfluxDB binaries:

  1. Attempt to run the influx or influxd commands.
  2. Open System Preferences and click Security & Privacy.
  3. Under the General tab, there is a message about influxd or influx being blocked. Click Open Anyway.
  4. Repeat this process for both binaries.

We are in the process of updating our build process to ensure released binaries are signed by InfluxData.

See the influxd documentation for information about available flags and options.

Enable shell completion (Optional)

To install influx shell completion scripts, see .

InfluxDB “phone home”

By default, InfluxDB sends telemetry data back to InfluxData. The InfluxData telemetry page provides information about what data is collected and how it is used.

To opt-out of sending telemetry data back to InfluxData, include the --reporting-disabled flag when starting influxd.

  1. influxd --reporting-disabled

Download and install InfluxDB v2.0

Download InfluxDB v2.0 for Linux.

(Optional) Verify the authenticity of downloaded binary

For added security, use to verify the signature of your download. (Most operating systems include the gpg command by default. If gpg is not available, see the GnuPG homepage for installation instructions.)

  1. Download and import InfluxData’s public key:

    1. wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.1-linux_amd64.tar.gz.asc
  2. Verify the signature with gpg --verify:

    1. gpg --verify influxdb-2.0.1-linux_amd64.tar.gz.asc influxdb-2.0.1-linux_amd64.tar.gz

    The output from this command should include the following:

    1. gpg: Good signature from "InfluxData <support@influxdata.com>" [unknown]

Unpackage the downloaded archive and place the influx and influxd executables in your system $PATH.

*Note: The following commands are examples. Adjust the file names, paths, and utilities to your own needs.*

  1. # Unpackage contents to the current working directory
  2. tar xvzf path/to/influxdb-2.0.1_linux_amd64.tar.gz
  3. # Copy the influx and influxd binary to your $PATH
  4. sudo cp influxdb-2.0.1_linux_amd64/{influx,influxd} /usr/local/bin/

Both InfluxDB 1.x and 2.x include influx and influxd binaries. If InfluxDB 1.x binaries are already in your $PATH, run the 2.0 binaries in place or rename them before putting them in your $PATH. If you rename the binaries, all references to influx and influxd in this documentation refer to your renamed binaries.

Networking ports

By default, InfluxDB uses TCP port 8086 for client-server communication over the .

Start InfluxDB

Start InfluxDB by running the influxd daemon:

  1. influxd

See the influxd documentation for information about available flags and options.

Enable shell completion (Optional)

To install influx shell completion scripts, see .

InfluxDB “phone home”

By default, InfluxDB sends telemetry data back to InfluxData. The InfluxData telemetry page provides information about what data is collected and how it is used.

To opt-out of sending telemetry data back to InfluxData, include the --reporting-disabled flag when starting influxd.

  1. influxd --reporting-disabled

Download and run InfluxDB v2.0

Upgrading from InfluxDB 1.x

We are working on the upgrade process to ensure a smooth upgrade from InfluxDB 1.x to InfluxDB 2.0 on Docker. If you’re upgrading from InfluxDB 1.x on Docker, we recommend waiting to upgrade until we finalize an updated Docker release given the current upgrade process is undefined.

Use docker run to download and run the InfluxDB v2.0 Docker image. Expose port 8086, which InfluxDB uses for client-server communication over the .

  1. docker run --name influxdb -p 8086:8086 quay.io/influxdb/influxdb:v2.0.1

To run InfluxDB in detached mode, include the -d flag in the docker run command.

InfluxDB “phone home”

By default, InfluxDB sends telemetry data back to InfluxData. The page provides information about what data is collected and how it is used.

To opt-out of sending telemetry data back to InfluxData, include the --reporting-disabled flag when starting the InfluxDB container.

Console into the InfluxDB Container (Optional)

To use the command line interface, console into the influxdb Docker container:

  1. docker exec -it influxdb /bin/bash

Install InfluxDB in a Kubernetes cluster

The instructions below use Minikube, but the steps should be similar in any Kubernetes cluster. InfluxData also makes Helm charts available.

  1. .

  2. Start Minikube:

    1. minikube start
  3. Ensure the Pod is running:

    1. kubectl get pods -n influxdb
    1. kubectl describe service -n influxdb influxdb

    You should see an IP address after Endpoints in the command’s output.

  4. Forward port 8086 from inside the cluster to localhost:

    1. kubectl port-forward -n influxdb service/influxdb 8086:8086

The initial setup process for InfluxDB walks through creating a default organization, user, and bucket. The setup process is available in both the InfluxDB user interface (UI) and in the influx command line interface (CLI).

UI Setup

Set up InfluxDB through the UI

  1. With InfluxDB running, visit localhost:8086.
  2. Click Get Started

Set up your initial user

  1. Enter a Username for your initial user.
  2. Enter a Password and Confirm Password for your user.
  3. Enter your initial Organization Name.
  4. Enter your initial Bucket Name.
  5. Click Continue.

InfluxDB is now initialized with a primary user, organization, and bucket. You are ready to .

If you set up InfluxDB through the UI and want to use the influx CLI, we recommend setting up a configuration profile. This lets you avoid having to pass your InfluxDB with each influx command. Complete the following steps to set up a configuration profile that stores your credentials.

  1. In a terminal, run the following command:

    1. # Set up a configuration profile
    2. influx config create -n default \
    3. -u http://localhost:8086 \
    4. -o example-org \
    5. -t mySuP3rS3cr3tT0keN \
    6. -a

    This configures a new profile named default and makes the profile active so your influx CLI commands run against this instance. For more detail, see influx config.

  2. Learn influx CLI commands. To see all available influx commands, type influx -h or check out .

Set up InfluxDB through the influx CLI

Begin the InfluxDB setup process via the influx CLI by running:

  1. Enter a primary username.
  2. Enter a password for your user.
  3. Confirm your password by entering it again.
  4. Enter a name for your primary organization.
  5. Enter a name for your primary bucket.
  6. Enter a retention period for your primary bucket—valid units are nanoseconds (ns), microseconds (us or µs), milliseconds (ms), seconds (s), minutes (m), hours (h), days (d), and weeks (w). Enter nothing for an infinite retention period.
  7. Confirm the details for your primary user, organization, and bucket.

InfluxDB is now initialized with a primary user, organization, bucket, and authentication token. InfluxDB also creates a configuration profile for you so that you don’t have to add organization and token to every command. To view that config profile, use the influx config list command.

To continue to use InfluxDB via the CLI, you need the authentication token created during setup. To view the token, log into the UI with the credentials created above. (For instructions, see .)

You are ready to write or collect data.

To automate the setup process, use to provide the required information.

Collect and write data

Collect and write data to InfluxDB using the Telegraf plugins, the InfluxDB v2 API, the influx command line interface (CLI), the InfluxDB UI (the user interface for InfluxDB 2.0), or the InfluxDB v2 API client libraries.

Use Telegraf

Use Telegraf to quickly write data to InfluxDB Cloud. Create new Telegraf configurations automatically in the InfluxDB UI, or manually update an existing Telegraf configuration to send data to your InfluxDB Cloud instance.

For details, see Automatically configure Telegraf and .

Scrape data

InfluxDB OSS lets you scrape Prometheus-formatted metrics from HTTP endpoints. For details, see Scrape data.

API, CLI, and client libraries

For information about using the InfluxDB v2 API, CLI, and client libraries to write data, see .

Query data

Query data using Flux, the UI, and the influx command line interface. See Query data.

Process data

Use InfluxDB tasks to process and downsample data. See .

Visualize data

Build custom dashboards to visualize your data. See Visualize data.

Monitor and alert

Monitor your data and sends alerts based on specified logic. See .

InfluxDB Cloud is API-compatible and functionally compatible with InfluxDB OSS 2.0. The primary differences between InfluxDB OSS 2.0 and InfluxDB Cloud are:

  • InfluxDB scrapers that collect data from specified targets are not available in InfluxDB Cloud.
  • InfluxDB Cloud instances are currently limited to a single organization.

New features in InfluxDB Cloud

  • Free Plan (rate-limited): Skip downloading and installing InfluxDB 2.0 and jump into exploring InfluxDB 2.0 technology. The Free Plan is designed for getting started with InfluxDB and for small hobby projects.
  • Flux support: is a standalone data scripting and query language that increases productivity and code reuse. It is the primary language for working with data within InfluxDB 2.0. Flux can be used with other data sources as well, letting you work with data where it resides.
  • Unified API: Everything in InfluxDB (ingest, query, storage, and visualization) is now accessible using a unified InfluxDB v2 API that enables seamless movement between open source and cloud.
  • Integrated visualization and dashboards: Based on the pioneering Chronograf project, the new user interface (InfluxDB UI) offers quick and effortless onboarding, richer user experiences, and significantly quicker results.