Railway

Deploy InfluxDB

Time-series database for storing and charting metrics and sensor data

Deploy InfluxDB

Just deployed

/var/lib/influxdb3

Just deployed

Just deployed

/db

influxdb3-storage

Bucket

Just deployed

Deploy and Host InfluxDB on Railway

InfluxDB is the time-series database most teams reach for first when they need to store metrics, sensor readings or any other stream of timestamped measurements and query it back quickly. InfluxDB 3 Core is the open-source engine in that family — a Rust rewrite on Apache Arrow, DataFusion and Parquet that answers SQL and InfluxQL over HTTP and accepts writes from Telegraf's 400-plus input plugins as well as from any HTTP client. It solves what relational databases handle badly: millions of narrow, append-only rows you almost always query by time range.

Deploy InfluxDB on Railway and you get three services wired together rather than a bare container. influxdb runs InfluxDB 3 Core and publishes a token-authenticated HTTP API on its own domain, so Telegraf agents, Grafana and application clients can write and query from anywhere. Its catalog, write-ahead log and Parquet files live in a Railway object storage bucket — the architecture InfluxDB 3 was designed around, so storage grows without a disk quota. explorer runs InfluxDB 3 Explorer, InfluxData's official web UI, pre-connected over the private network; because it ships no login of its own it stays private, and gateway, a small Caddy service, takes the public domain and puts HTTP basic auth in front.

InfluxDB, Explorer and Caddy gateway services online in one Railway project

Getting Started with InfluxDB on Railway

Set a username and password for the UI when you deploy; everything else is generated, including the operator token InfluxDB authenticates with. When the deploy finishes, open the gateway service's URL and sign in at the browser prompt. Explorer asks you to accept its terms on first load, then opens System Overview, which reports the running version, the storage type and live query and write counters — that page loading confirms the UI reached the database over the private network. Write your first points by sending line protocol to the influxdb service's public URL with the operator token as a bearer credential; the target database is created on first write. Then open Data Explorer, pick your database in the schema browser, run a SELECT against the new table and switch the result from Table to Line to chart it. Manage Databases and Manage Tables cover retention, deletes and table creation, and Manage Tokens is where you mint scoped tokens per application instead of sharing the operator token.

Explorer system overview reporting InfluxDB 3 Core 3.11.2 on S3 storage

Data Explorer returning 648 greenhouse temperature rows from a SQL query

Line chart of three hours of temperature across four monitored rooms

About Hosting InfluxDB 3 Core

InfluxDB 3 Core stores every measurement as a timestamped, tagged row and persists it as Parquet — which is why it reads well from object storage and stays open to any Arrow-aware tool. Self-hosting makes sense when telemetry volume makes a metered cloud plan unpredictable, when data residency matters, or when the database should sit on the same private network as the services producing the data.

  • SQL and InfluxQL over HTTP, plus Flight SQL for Arrow clients
  • Line protocol writes compatible with InfluxDB 1.x and 2.x clients and with Telegraf
  • Last-value and distinct-value caches for sub-10 ms lookups on recent data
  • A Python processing engine for triggers that transform or downsample data in place
  • Per-database and per-table retention, with soft deletes and a grace period

The template splits that into three roles. influxdb is the database and the only service holding your data. explorer is a separate upstream product — a Node application with a small SQLite volume for saved queries and dashboards — that talks to the database server-side, so your browser never needs a route to the API. gateway is a stock Caddy image terminating the public domain, checking basic auth and proxying to Explorer.

Why Deploy InfluxDB on Railway

Railway removes the parts of a time-series deployment that take longest.

  • Object storage is provisioned and wired to the database automatically
  • The private network keeps the UI off the public internet
  • Generated credentials mean no default passwords to rotate
  • Health checks, volumes and TLS are configured before first boot
  • Scaling and metrics are one click, with no server to patch

Common Use Cases

  • Server, container and network metrics from Telegraf, charted in Explorer or Grafana
  • IoT and industrial telemetry — greenhouses, cold chains, factory lines or fleets, queried by time range
  • Application performance data such as request latency and queue depth at high resolution
  • Financial and market tick storage, where append-only writes and fast range scans beat joins

Dependencies for InfluxDB

  • influxdb:3-core — the InfluxDB 3 Core server, on the stable major-3 release line
  • influxdata/influxdb3-ui — InfluxDB 3 Explorer, the official web UI
  • caddy:2-alpine — the authenticating reverse proxy in front of Explorer
  • Railway object storage bucket — the catalog, write-ahead log and Parquet files
  • Two small volumes — the database's generated token file, and Explorer's saved queries

Environment Variables Reference

VariableServicePurpose
INFLUXDB3_ADMIN_TOKENinfluxdb, explorerOperator token; adopted on first boot only
INFLUXDB3_BUCKETinfluxdbObject storage bucket name
INFLUXDB3_NODE_IDinfluxdbObject store path prefix — keep it stable
INFLUXDB3_QUERY_FILE_LIMITinfluxdbParquet files one query may read
GATEWAY_USERNAME / GATEWAY_PASSWORDgatewayCredentials for the UI prompt

Deployment Dependencies

  • Source repository:
  • InfluxDB 3 Core:
  • Docs: and

Hardware Requirements for Self-Hosting InfluxDB

ResourceMinimumRecommended
CPU2 vCPU4–8 vCPU
RAM2 GB4–8 GB
StorageBucket + 1 GB volumeBucket + 5 GB volume
RuntimeLinux containerLinux container

Memory is the resource to watch: queries are planned in memory and the file cache defaults to 20% of available RAM, so wide time ranges and high-cardinality tag sets push memory before CPU.

Self-Hosting InfluxDB 3 Core

Writes use line protocol over HTTP. The following adds two points to a database called mydb, creating it if it does not exist:

curl -X POST "https://YOUR-INFLUXDB-DOMAIN/api/v3/write_lp?db=mydb&precision=nanosecond" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  --data-binary 'climate,room=greenhouse-a temperature=24.6,humidity=61.2
climate,room=cold-store temperature=4.1,humidity=78.4'

Reads are plain SQL. The following returns an average per room over the last hour:

curl -X POST "https://YOUR-INFLUXDB-DOMAIN/api/v3/query_sql" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"db":"mydb","q":"SELECT room, avg(temperature) FROM climate WHERE time > now() - INTERVAL '"'"'1 hour'"'"' GROUP BY room","format":"json"}'

To run it locally instead, pull influxdb:3-core and start it with influxdb3 serve --node-id node0 --object-store file --data-dir ~/.influxdb3.

Is InfluxDB Free to Self-Host?

InfluxDB 3 Core is open source under the MIT and Apache 2.0 licences and needs no licence key, so the software costs nothing. Enterprise adds compaction, read replicas and high availability under a commercial licence, and InfluxDB Cloud Serverless is metered on data in, queries, storage and data out. On Railway you pay only for the compute, storage and bandwidth the three services use.

FAQ

What is InfluxDB? An open-source time-series database for storing and querying timestamped measurements such as metrics, sensor readings and events. Version 3 Core is built on Apache Arrow and Parquet and speaks both SQL and InfluxQL.

What does this Railway template deploy? Three services — InfluxDB 3 Core with a public token-authenticated API, InfluxDB 3 Explorer as the web UI, and a Caddy gateway protecting Explorer with HTTP basic auth — plus an object storage bucket wired to the database.

Why does the template include object storage instead of a volume? InfluxDB 3 writes its catalog, write-ahead log and Parquet files to object storage by design and keeps only an in-memory cache locally, so capacity grows with your data instead of being capped by a disk.

Why is the Explorer UI behind a username and password? Explorer has no built-in login — upstream expects it on a trusted network. Since it holds an admin token, the template keeps it private and puts an authenticating proxy in front.

How do I connect Telegraf or Grafana to self-hosted InfluxDB on Railway? Point them at the influxdb service's public URL on port 443 with the token as a bearer credential. Telegraf uses the outputs.influxdb_v2 plugin; Grafana's InfluxDB data source works with SQL or InfluxQL.

Why does a query over a long time range return an error? Core limits one query to 432 Parquet files by default — roughly 72 hours — to protect the process from running out of memory. Query narrower windows, or raise INFLUXDB3_QUERY_FILE_LIMIT and give the service more RAM.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

2
View Template
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0