Running InfluxDB 3 Core with Docker starts a self-contained server from the official image while keeping the database files in persistent Docker volumes. This works well for development, lab services, and small deployments where the container runtime already handles image pulls and port publishing.
The influxdb:3-core image runs the server as the non-root influxdb3 user and listens on port 8181 inside the container. A file-backed Core server also needs a stable node-id and a writable data directory, because the local object store writes catalog, WAL, and Parquet data under the configured path.
Use a versioned InfluxDB 3 image tag when a deployment needs tighter release control than the moving 3-core tag. Keep the same data volume and node-id together after the first start, then create the first admin token and run a write/query smoke test before treating the container as usable.
$ docker volume create influxdb3-data influxdb3-data $ docker volume create influxdb3-plugins influxdb3-plugins
$ docker run --rm --user root \ --mount type=volume,source=influxdb3-data,target=/var/lib/influxdb3/data \ --mount type=volume,source=influxdb3-plugins,target=/var/lib/influxdb3/plugins \ influxdb:3-core chown -R 1500:1500 /var/lib/influxdb3/data /var/lib/influxdb3/plugins
The official image runs as UID/GID 1500. Fresh named volumes are root-owned on many Linux Docker hosts, so this one-time ownership pass prevents startup permission errors without running the database as root.
$ docker pull influxdb:3-core 3-core: Pulling from library/influxdb ##### snipped ##### Status: Image is up to date for influxdb:3-core docker.io/library/influxdb:3-core
$ docker run --detach \ --name influxdb3-core \ --publish 8181:8181 \ --mount type=volume,source=influxdb3-data,target=/var/lib/influxdb3/data \ --mount type=volume,source=influxdb3-plugins,target=/var/lib/influxdb3/plugins \ influxdb:3-core influxdb3 serve \ --node-id guide-node \ --object-store file \ --data-dir /var/lib/influxdb3/data \ --plugin-dir /var/lib/influxdb3/plugins 87c634d416994378870f8a01fbf40b6c2469590b43677bea631d61274417e95a
Change the left side of 8181:8181 only when host port 8181 is already in use. Keep guide-node stable for this volume, or choose a server-specific node ID before the first start.
$ docker ps --quiet --filter name=influxdb3-core 87c634d41699
No output means the container is not running or the name filter does not match.
$ docker exec influxdb3-core env -u LOG_FILTER influxdb3 create token --admin --format json
{
"help_msg": "Store this token securely, as it will not be shown again. HTTP requests require the following header: \"Authorization: Bearer apiv3_0REDACTED\"",
"token": "apiv3_0REDACTED"
}
Copy the real token value to a secret manager or a private terminal session. The operator token is shown once and grants full administrative access.
The current image sets a legacy LOG_FILTER variable for the server process. env -u LOG_FILTER keeps one-off CLI commands from adding that deprecation warning to JSON output.
$ ADMIN_TOKEN='apiv3_0REDACTED'
Replace the placeholder with the token from the previous step. Do not paste a real token into shared transcripts, screenshots, issue comments, or committed scripts.
$ docker exec --env INFLUXDB3_AUTH_TOKEN="$ADMIN_TOKEN" influxdb3-core env -u LOG_FILTER influxdb3 create database sensors Database "sensors" created successfully
$ curl --silent --request GET http://127.0.0.1:8181/health \ --header "Authorization: Bearer $ADMIN_TOKEN" OK
InfluxDB 3 Core requires authentication for the health endpoint by default.
Related: How to check InfluxDB server health
$ docker exec --env INFLUXDB3_AUTH_TOKEN="$ADMIN_TOKEN" influxdb3-core env -u LOG_FILTER influxdb3 write --database sensors 'weather,location=lab temperature=21.8 1710000000000000000' 501ms: 1 request (1.99 requests/sec), 1 lines (2 lines/s), 57B (113B/s)
$ docker exec --env INFLUXDB3_AUTH_TOKEN="$ADMIN_TOKEN" influxdb3-core env -u LOG_FILTER influxdb3 query --database sensors 'SELECT * FROM weather' +----------+-------------+---------------------+ | location | temperature | time | +----------+-------------+---------------------+ | lab | 21.8 | 2024-03-09T16:00:00 | +----------+-------------+---------------------+
$ docker restart influxdb3-core influxdb3-core
$ docker exec --env INFLUXDB3_AUTH_TOKEN="$ADMIN_TOKEN" influxdb3-core env -u LOG_FILTER influxdb3 query --database sensors 'SELECT * FROM weather' +----------+-------------+---------------------+ | location | temperature | time | +----------+-------------+---------------------+ | lab | 21.8 | 2024-03-09T16:00:00 | +----------+-------------+---------------------+