Documentation

Upgrade from InfluxDB 1.x to 2.9 with Docker

This page documents an earlier version of InfluxDB OSS. InfluxDB 3 Core is the latest stable version.

API token hashing is enabled by default in InfluxDB OSS 2.9.0

Stronger token security: tokens are stored as hashes on disk, so a copy of the database file doesn’t expose usable tokens. Existing tokens are hashed on first startup and the original strings can’t be recovered afterward — capture any plaintext tokens you still need before you upgrade.

For more information, see Token hashing.

Use the automated upgrade process built into the InfluxDB 2.x Docker image to update InfluxDB 1.x Docker deployments to InfluxDB 2.x.

Export continuous queries before upgrading

The automated upgrade process does not migrate InfluxDB 1.x continuous queries (CQs) to InfluxDB 2.x tasks (the 2.x equivalent). Export all of your CQs before upgrading to InfluxDB 2.x. For information about exporting and migrating CQs to tasks, see Migrate continuous queries to tasks.

Upgrade requirements

InfluxDB 2.x provides a 1.x compatibility API, but expects a different storage layout on disk. To account for theses differences, the InfluxDB Docker image migrates 1.x data and into 2.x-compatible data automatically before booting the influxd server.

To ensure InfluxDB reboots post-upgrade without overwriting migrated data, the upgrade won’t run if an existing boltdb file is found at the configured 2.x configuration path.

Find more information about the automated InfluxDB upgrade process, see Automatically upgrade from InfluxDB 1.x to 2.9.

InfluxDB 2.x initialization credentials

The automated InfluxDB upgrade process bootstraps an initial admin user, organization, and bucket required by InfluxDB 2.x. Set the following environment variables in your Docker container to provide setup credentials:

  • DOCKER_INFLUXDB_INIT_USERNAME: Username to set for the admin user (Required).
  • DOCKER_INFLUXDB_INIT_PASSWORD: Password to set for the admin user (Required).
  • DOCKER_INFLUXDB_INIT_ORG: Name to set for the initial organization (Required).
  • DOCKER_INFLUXDB_INIT_BUCKET: Name to set for the initial bucket (Required).
  • DOCKER_INFLUXDB_INIT_RETENTION: Duration for the initial bucket’s retention period. If not set, the initial bucket will retain data forever.
  • DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: API token to associate with the admin user. If not set, InfluxDB automatically generates a token.

File system mounts

The InfluxDB upgrade process requires extra volumes to be mounted into the 2.x container. Use environment variables and Docker mounts to specify and configure the appropriate mount paths for the following:

  • 1.x data on disk
  • Custom 1.x configuration file (if any)
  • 2.x data on disk (/var/lib/influxdb2)
  • 2.x configuration directory (/etc/influxdb2)

The InfluxDB upgrade process searches for mounted 1.x data and configuration files in the following priority order:

  1. 1.x configuration file specified by the DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG environment variable
  2. 1.x data directory specified by the DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR environment variable
  3. 1.x configuration file mounted at /etc/influxdb/influxdb.conf
  4. 1.x data directory mounted at /var/lib/influxdb

Avoid data loss

By default, the automated upgrade process generates both data and configuration files under /var/lib/influxdb2 and /etc/influxdb2. We recommend mounting volumes at both paths to avoid losing data.

Upgrade initialization mode

Set the DOCKER_INFLUXDB_INIT_MODE environment variable to upgrade.

Minimal upgrade

If you’re currently running a minimal InfluxDB 1.x deployment similar to:

docker run -p 8086:8086 \
  -v influxdb:/var/lib/influxdb \
  influxdb:1.8

To upgrade this minimal deployment to InfluxDB 2.x:

  1. Stop the running InfluxDB 1.x container.

  2. Start the InfluxDB container with the following:

    • Volume mount for the InfluxDB 1.x data directory
    • Volume mount for the InfluxDB 2.x data directory
    • InfluxDB initialization mode environment variable
    • InfluxDB initialization credential environment variables
    • influxdb:2.9 Docker image
    docker run -p 8086:8086 \
      -v influxdb:/var/lib/influxdb \
      -v influxdb2:/var/lib/influxdb2 \
      -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
      -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
      -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
      -e DOCKER_INFLUXDB_INIT_ORG=my-org \
      -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
      influxdb:2.9

Upgrade with a custom InfluxDB 1.x configuration file

If you’re currently running an InfluxDB 1.x deployment with a custom configuration file similar to:

docker run -p 8086:8086 \
  -v influxdb:/var/lib/influxdb \
  -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \
  influxdb:1.8

To upgrade an InfluxDB 1.x deployment with a custom configuration file to InfluxDB 2.x:

  1. Stop the running InfluxDB 1.x container.

  2. Start the InfluxDB container with the following:

    • Volume mount for the InfluxDB 1.x data directory
    • Volume mount for the InfluxDB 1.x configuration file
    • Volume mount for the InfluxDB 2.x data directory (/var/lib/influxdb2)
    • Volume mount for the InfluxDB 2.x configuration directory (/etc/influxdb2)
    • InfluxDB initialization mode environment variable
    • InfluxDB initialization credential environment variables
    • influxdb:2.9 Docker image
docker run -p 8086:8086 \
  -v influxdb:/var/lib/influxdb \
  -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \
  -v influxdb2:/var/lib/influxdb2 \
  -v influxdb2:/etc/influxdb2 \
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
  -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
  -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
  -e DOCKER_INFLUXDB_INIT_ORG=my-org \
  -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
  influxdb:2.9

Upgrade with custom paths

If you’re currently running an InfluxDB 1.x deployment with the data directory and configuration file mounted at custom paths similar to:

docker run -p 8086:8086 \
  -v influxdb:/root/influxdb/data \
  -v $PWD/influxdb.conf:/root/influxdb/influxdb.conf:ro \
  influxdb:1.8 -config /root/influxdb/influxdb.conf

To upgrade an InfluxDB 1.x deployment with custom paths to InfluxDB 2.x:

  1. Stop the running InfluxDB 1.x container.
  2. Decide to either keep using custom paths or use InfluxDB 2.x default paths.

To retain your custom InfluxDB 1.x paths, start the InfluxDB container with the following:

  • Volume mount for the InfluxDB 1.x data directory
  • Volume mount for the InfluxDB 1.x configuration file
  • Volume mount for the InfluxDB 2.x data directory
  • Volume mount for the InfluxDB 2.x configuration directory
  • InfluxDB initialization mode environment variable
  • InfluxDB initialization credential environment variables
  • InfluxDB 2.x v1 configuration file path environment variable:
    • DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG
  • InfluxDB 1.x custom path environment variables:
    • INFLUXD_CONFIG_PATH
    • INFLUXD_BOLT_PATH
    • INFLUXD_ENGINE_PATH
  • influxdb:<span class="current-version">2.9</span> Docker image
docker run -p 8086:8086 \
  -v influxdb:/root/influxdb/data \
  -v $PWD/influxdb.conf:/root/influxdb/influxdb.conf:ro \
  -v influxdb2:/root/influxdb2/data \
  -v influxdb2:/root/influxdb2 \
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
  -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
  -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
  -e DOCKER_INFLUXDB_INIT_ORG=my-org \
  -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
  -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \
  -e INFLUXD_CONFIG_PATH=/root/influxdb2/config.toml \
  -e INFLUXD_BOLT_PATH=/root/influxdb2/influxdb.bolt \
  -e INFLUXD_ENGINE_PATH=/root/influxdb2/engine \
  influxdb:<span class="current-version">2.9</span>

To use default InfluxDB 2.x paths, start the InfluxDB container with the following:

  • Volume mount for the InfluxDB 1.x data directory
  • Volume mount for the InfluxDB 1.x configuration file
  • Volume mount for the InfluxDB 2.x data directory (/var/lib/influxdb2)
  • Volume mount for the InfluxDB 2.x configuration directory (/etc/influxdb2)
  • InfluxDB initialization mode environment variable
  • InfluxDB initialization credential environment variables
  • InfluxDB 2.x v1 configuration file path environment variable:
    • DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG
  • influxdb:<span class="current-version">2.9</span> Docker image
docker run -p 8086:8086 \
  -v influxdb:/root/influxdb/data \
  -v $PWD/influxdb.conf:/root/influxdb/influxdb.conf:ro \
  -v influxdb2:/var/lib/influxdb2 \
  -v influxdb2:/etc/influxdb2 \
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
  -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \
  -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \
  -e DOCKER_INFLUXDB_INIT_ORG=my-org \
  -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
  -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \
  influxdb:<span class="current-version">2.9</span>

Use the interactive InfluxQL shell

The InfluxDB 2.9 influx CLI includes an interactive InfluxQL shell for executing InfluxQL queries. The InfluxDB 2.9 Docker image includes the influx CLI.

To start an InfluxQL shell:

  1. Start a bash session in your InfluxDB container:

    docker exec -it influxdb /bin/bash
  2. Set up your influx CLI authentication credentials.

  3. Run the influx v1 shell command.

For more information, see:

To build an interactive shell to execute Flux queries, compile and build a command line Flux REPL from source.


Was this page helpful?

Thank you for your feedback!


InfluxDB OSS 2.9.0: API tokens are hashed by default

Stronger token security in InfluxDB OSS 2.9.0 — tokens are hashed on disk by default. Existing tokens are hashed on first startup and can’t be recovered afterward. Capture any plaintext tokens you still need before you upgrade.

View InfluxDB OSS 2.9.0 release notes

Hashed tokens authenticate exactly like unhashed tokens — clients and integrations keep working.

Also new in 2.9.0:

  • Configurable backup compression
  • Restore support for backups containing hashed tokens
  • Tighter Edge Data Replication queue validation
  • Flux upgrade
  • Compaction reliability improvements

Key enhancements in Explorer 1.9

Explorer 1.9 is now available with InfluxQL support, an AI-assisted Flux to SQL converter (beta), and new live sample data simulators.

View Explorer 1.9 release notes

Explorer 1.9 includes new features and improvements that make it easier to query, visualize, and manage data.

Highlights:

  • Flux to SQL converter (beta): Convert Flux queries to SQL with an AI-assisted converter.
  • InfluxQL support: Query data with InfluxQL in the Data Explorer and dashboards, and save and load InfluxQL queries.
  • InfluxQL visualizations: Render line and bar charts from InfluxQL results with per-tag series grouping.
  • Query error history: Review a history of query errors in the query tool.
  • Live sample data simulators: Generate continuous live sample data with new bird data and signal generator simulators.

For more details, see Explorer 1.9 release notes

InfluxDB 3.10 is now available

InfluxDB 3 Core 3.10 adds an automatic catalog format upgrade, a configurable query-concurrency limit, and processing engine improvements.

Key updates in InfluxDB 3 Core 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • --max-concurrent-queries: limit concurrent queries (adjustable at runtime).
  • GET /ready endpoint for readiness probes.
  • Processing engine: cross-database queries and trigger lockdown flags.

For more information, see the InfluxDB 3 Core release notes.

InfluxDB 3.10 is now available

InfluxDB 3 Enterprise 3.10 adds automated backup and restore, row-level deletions, and user management, with an automatic catalog format upgrade and performance preview improvements.

Key updates in InfluxDB 3 Enterprise 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • Automated backup and restore (beta)
  • Row-level deletions
  • User management (authentication and RBAC) — preview
  • Performance preview improvements

Backup and restore, row-level deletions, and the performance preview require the Enterprise storage engine upgrade (opt-in beta). Beta and preview features are subject to breaking changes and aren’t recommended for production use.

For more information, see the InfluxDB 3 Enterprise release notes

Telegraf Enterprise is now generally available

Telegraf Enterprise is now generally available, along with Telegraf Controller v1.0.

Telegraf Enterprise combines Telegraf Controller, a centralized management console for Telegraf, with official support from InfluxData. Manage configurations, monitor fleet health, and operate tens of thousands of Telegraf agents from a single system.

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On September 15, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2