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.
Steps to run InfluxDB 3 Core with Docker:
- Create the persistent volumes for data and plugins.
$ docker volume create influxdb3-data influxdb3-data $ docker volume create influxdb3-plugins influxdb3-plugins
- Prepare the volumes for the image's non-root influxdb3 user.
$ 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.
- Pull the official InfluxDB 3 Core image.
$ 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
- Start the InfluxDB 3 Core container with file-backed storage.
$ 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.
- Confirm Docker reports the container as running.
$ docker ps --quiet --filter name=influxdb3-core 87c634d41699
No output means the container is not running or the name filter does not match.
- Create the first admin token in JSON format.
$ 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.
- Save the admin token for the current terminal session.
$ 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.
- Create a disposable database for the smoke test.
$ docker exec --env INFLUXDB3_AUTH_TOKEN="$ADMIN_TOKEN" influxdb3-core env -u LOG_FILTER influxdb3 create database sensors Database "sensors" created successfully
- Check the authenticated health endpoint through the published port.
$ 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
- Write one line protocol point through the running container.
$ 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)
- Query the point before restarting the container.
$ 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 | +----------+-------------+---------------------+
- Restart the container after the data has been written.
$ docker restart influxdb3-core influxdb3-core
- Query the same point again to confirm the volume-backed data survived the restart.
$ 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 | +----------+-------------+---------------------+
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.