---
title: "Deploy InfluxDB"
description: "Time-series database with web UI, token auth and persistent volume"
category: "Storage"
url: https://railway.com/deploy/influxdb-2
---

# Deploy InfluxDB

Time-series database with web UI, token auth and persistent volume

**[Deploy InfluxDB on Railway](https://railway.com/template/influxdb-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/influxdb-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage
- **Total deploys:** 1

## Template content

### InfluxDB https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/influxdb.svg

- **Image:** influxdb:2.9.1@sha256:e4572d094ac3272f06528ea904ce6b4cb3bb19be2db3b3b1acbd27ba5c3a73e2
- **Start command:** `sh -c 'export DOCKER_INFLUXDB_INIT_MODE=setup DOCKER_INFLUXDB_INIT_USERNAME="${DOCKER_INFLUXDB_INIT_USERNAME:-admin}" DOCKER_INFLUXDB_INIT_ORG="${DOCKER_INFLUXDB_INIT_ORG:-railway}" DOCKER_INFLUXDB_INIT_BUCKET="${DOCKER_INFLUXDB_INIT_BUCKET:-default}" INFLUXD_HTTP_BIND_ADDRESS=":${PORT:-8086}" INFLUXD_REPORTING_DISABLED="${INFLUXD_REPORTING_DISABLED:-true}" INFLUXD_PPROF_DISABLED="${INFLUXD_PPROF_DISABLED:-true}" INFLUXD_METRICS_DISABLED="${INFLUXD_METRICS_DISABLED:-true}"; exec /entrypoint.sh influxd'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host InfluxDB on Railway

InfluxDB is an open-source time series database from InfluxData. It stores metrics, events and sensor readings with a timestamp and queries them quickly with Flux or InfluxQL. InfluxDB 2.x includes a web UI for exploring data, building dashboards and generating Telegraf configs, plus an HTTP API for writes and queries.

## About Hosting InfluxDB

This template runs the official `influxdb` 2.9.1 image, pinned by digest, as a single service. Data and metadata are stored on a Railway volume at `/var/lib/influxdb2`, so they survive redeploys. On first start, the image's setup step creates the admin user, the organization, the first bucket and an all-access admin token from generated variables, then closes the onboarding page, so nobody can claim the instance before you. The web UI and API are served over HTTPS on a Railway domain, with a `/health` check. Other Railway services can reach InfluxDB over the private network. Telemetry reporting, `/metrics` and `/debug/pprof` are turned off by default.

## Common Use Cases

* Store application, server and IoT metrics sent by Telegraf or the InfluxDB client libraries
* Back Grafana dashboards with Flux or InfluxQL queries
* Collect sensor and event data from Home Assistant, Node-RED or custom apps for long-term analysis

## Dependencies for InfluxDB Hosting

* A Railway volume mounted at `/var/lib/influxdb2` (included)
* No external database: InfluxDB stores everything on its volume

### Deployment Dependencies

* InfluxDB OSS v2 documentation: https://docs.influxdata.com/influxdb/v2/
* Docker image and setup variables: https://hub.docker.com/_/influxdb
* InfluxDB v2.9.1 release: https://github.com/influxdata/influxdb/releases/tag/v2.9.1

### Implementation Details

Sign in at the service's public URL with the username `admin` and the generated `DOCKER_INFLUXDB_INIT_PASSWORD` from the service's Variables tab. The organization is `railway` and the first bucket is `default`. You can change these names in the variables before the first deploy; after the first start they're stored in the database, so change them in the InfluxDB UI instead.

Use the generated `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN` for API clients, or create narrower tokens in the UI under **Load Data → API Tokens**. From another service in the same project, reference the variables instead of copying them:

```
INFLUX_URL=${{InfluxDB.INFLUXDB_PRIVATE_URL}}
INFLUX_TOKEN=${{InfluxDB.DOCKER_INFLUXDB_INIT_ADMIN_TOKEN}}
INFLUX_ORG=${{InfluxDB.DOCKER_INFLUXDB_INIT_ORG}}
INFLUX_BUCKET=${{InfluxDB.DOCKER_INFLUXDB_INIT_BUCKET}}
```

Write a test point from your machine:

```
curl -X POST "https:///api/v2/write?org=railway&amp;bucket=default&amp;precision=s" \
  -H "Authorization: Token " \
  --data-binary "cpu,host=server1 usage=42.5"
```

Data is kept forever by default. Set a retention period on the bucket in the UI if you need one.

## Why Deploy InfluxDB on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying InfluxDB on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/influxdb-2
