Warning: InfluxDB 2.0 (Alpha) should NOT be used for any production workloads.
While InfluxData, the company behind InfluxDB, does not provide packages for alpha builds; we do run our own alpha's for various testing and performance purposes. For this, we provide a public Docker image through Quay.io.
docker container run --port 9999:9999 quay.io/influxdb/influxdb:2.0.0-alpha
version: "3" services: influxdb: image: quay.io/influxdb/influxdb:2.0.0-alpha ports: - "9999:9999"
If you need to persist your database across container restarts, you may feel free to add a volume mount directory
Now that you have a container running, you'll need to configure things. InfluxDB 2.0 is different from previous releases in that authentication cannot be ignored or disabled. InfluxDB 2.0 is also multi-tenant, which means you'll need to specify an organisation for your user during setup.
You can configure everything through our GUI, using https://localhost:9999.
You can configure everything through our CLI, though you'll need to get "inside" the container first.
# Docker docker container exec -it container_name bash # Docker Compose docker-compose exec influxdb bash
Now that you're inside the container, you can use our
setup command to configure everything interactively:
If you'd like to do this through a script, you can also use the command line flags:
Flags: -b, --bucket string primary bucket name -f, --force skip confirmation prompt -h, --help Help for the setup command -o, --org string primary organization name -p, --password string password for username -r, --retention int retention period in hours, else infinite (default -1) -u, --username string primary username
Specifying a token during setup will also allow you to set the API token for future requests. Omitting this will have one generated for you and stored in
/root/.influxdbv2/credentials (Inside the container).
You can specify the token as such:
-t, --token string API token to be used throughout client calls
That's it! Now you've got a working InfluxDB 2.0 ready for data.