InfluxDB 3 Core Deployment and Usage Guide
Prerequisites
- Rust (latest stable version recommended)
- Docker (for containerized deployments)
- Python 3.8+ (for Python API usage)
- Object storage (AWS S3, Google Cloud Storage, or Azure Blob Storage) for production deployments
- Local disk space (for development/testing without object storage)
Installation
Using Docker (Recommended)
# Pull the latest InfluxDB 3 Core image
docker pull influxdb/influxdb3-core:latest
# Run with default configuration
docker run -p 8086:8086 influxdb/influxdb3-core:latest
Using Package Managers
Debian/Ubuntu
# Download and install the Debian package
wget https://dl.influxdata.com/influxdb/releases/influxdb3-core_3.0.0_amd64.deb
sudo dpkg -i influxdb3-core_3.0.0_amd64.deb
RHEL/CentOS
# Download and install the RPM package
wget https://dl.influxdata.com/influxdb/releases/influxdb3-core-3.0.0.x86_64.rpm
sudo rpm -ivh influxdb3-core-3.0.0.x86_64.rpm
macOS (Homebrew)
brew install influxdb3-core
Building from Source
# Clone the repository
git clone https://github.com/influxdata/influxdb.git
cd influxdb
# Build the project
cargo build --release
# Run the server
./target/release/influxdb3-core
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
INFLUXDB3_CORE_PATH | Data directory path | ./data |
INFLUXDB3_CORE_PORT | HTTP API port | 8086 |
INFLUXDB3_CORE_OBJECT_STORE | Object storage backend (s3, gcs, azure) | local |
INFLUXDB3_CORE_S3_BUCKET | S3 bucket name (if using S3) | - |
INFLUXDB3_CORE_S3_REGION | S3 region | us-east-1 |
Configuration File
Create a config.toml file:
[server]
port = 8086
data_path = "./data"
[object_store]
type = "s3"
bucket = "my-influxdb-bucket"
region = "us-east-1"
[logging]
level = "info"
API Keys
InfluxDB 3 Core uses token-based authentication. Generate tokens using:
# Generate a new token
influx3 token create --description "My Application Token"
# Set the token in your environment
export INFLUXDB3_TOKEN="your-token-here"
Build & Run
Development Environment
# Clone and build
git clone https://github.com/influxdata/influxdb.git
cd influxdb
cargo build
# Run with hot reload
cargo watch -x run
Production Environment
# Build optimized binary
cargo build --release
# Run with configuration file
./target/release/influxdb3-core --config config.toml
# Or use Docker Compose
docker-compose up -d
Python API Usage
from influxdb3_py_api import PyPluginCallApi
# Initialize the API
api = PyPluginCallApi(
db_schema=database_schema,
query_executor=query_executor
)
# Write data
api.write(
measurement="cpu",
tags={"region": "us-east"},
fields={"usage": 100.0},
timestamp=1234567890
)
# Query data
result = api.query("SELECT * FROM cpu")
Deployment
Docker Deployment
# Simple Docker deployment
docker run -d \
-p 8086:8086 \
-v influxdb_data:/var/lib/influxdb \
-e INFLUXDB3_CORE_OBJECT_STORE=s3 \
-e INFLUXDB3_CORE_S3_BUCKET=my-bucket \
influxdb/influxdb3-core:latest
Kubernetes Deployment
# kubernetes/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: influxdb3-core
spec:
replicas: 3
selector:
matchLabels:
app: influxdb3-core
template:
metadata:
labels:
app: influxdb3-core
spec:
containers:
- name: influxdb3-core
image: influxdb/influxdb3-core:latest
ports:
- containerPort: 8086
env:
- name: INFLUXDB3_CORE_OBJECT_STORE
value: "s3"
- name: INFLUXDB3_CORE_S3_BUCKET
value: "my-influxdb-bucket"
- name: INFLUXDB3_CORE_S3_REGION
value: "us-east-1"
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "4Gi"
cpu: "2000m"
Cloud Deployment
AWS ECS
# Create task definition
aws ecs register-task-definition \
--cli-input-json file://task-definition.json
# Deploy service
aws ecs create-service \
--cluster my-cluster \
--service-name influxdb3-core \
--task-definition influxdb3-core:1 \
--desired-count 3
Google Cloud Run
# Deploy to Cloud Run
gcloud run deploy influxdb3-core \
--image gcr.io/my-project/influxdb3-core:latest \
--port 8086 \
--set-env-vars=INFLUXDB3_CORE_OBJECT_STORE=gcs,INFLUXDB3_CORE_GCS_BUCKET=my-bucket
Troubleshooting
Common Issues
Port Already in Use
# Check what's using port 8086
lsof -i :8086
# Kill the process
kill -9 <PID>
Permission Denied on Data Directory
# Fix permissions
sudo chown -R $USER:$USER /path/to/data
Object Storage Connection Issues
# Verify credentials
aws sts get-caller-identity
gsutil ls
az storage account list
High Memory Usage
# Monitor memory usage
docker stats influxdb3-core
# Adjust memory limits in config
memory_limit = "4Gi"
Debug Mode
# Run with debug logging
RUST_LOG=debug ./target/release/influxdb3-core
# Or in Docker
docker run -e RUST_LOG=debug influxdb/influxdb3-core:latest
Health Checks
# Check server health
curl http://localhost:8086/health
# Check metrics
curl http://localhost:8086/metrics
Log Analysis
# View recent logs
journalctl -u influxdb3-core -f
# Filter for errors
grep "ERROR" /var/log/influxdb3-core.log
Performance Issues
If experiencing slow query response times:
-
Check cache configuration:
curl http://localhost:8086/debug/cache -
Verify object storage performance:
# Test S3 upload/download speed aws s3 cp testfile s3://my-bucket/testfile aws s3 cp s3://my-bucket/testfile . -
Monitor system resources:
# Check CPU and memory top free -h
Data Corruption Recovery
If data corruption is suspected:
-
Backup existing data:
cp -r /path/to/data /path/to/backup -
Run integrity check:
./target/release/influxdb3-core check --repair -
Restore from backup if needed:
cp -r /path/to/backup /path/to/data