Deploy TimescaleDB

TimescaleDB 2.32 on PostgreSQL 18: time-series SQL with TLS and a volume

Deploy TimescaleDB

Just deployed

/var/lib/postgresql

Deploy and Host TimescaleDB on Railway

TimescaleDB is an open-source PostgreSQL extension for time-series and event data. It adds hypertables that partition data by time automatically, native columnar compression, continuous aggregates and retention policies, while you keep full SQL, every Postgres client library and the wider Postgres extension ecosystem.

About Hosting TimescaleDB

Hosting TimescaleDB means running PostgreSQL with the TimescaleDB extension loaded, a persistent disk for its data directory, a strong superuser password and network access for your applications. This template builds the official timescale/timescaledb image (TimescaleDB 2.32.0 on PostgreSQL 18.6), pinned by digest, from a public GitHub repo. Data lives on a Railway volume, the password is generated at deploy time, and TLS is on with a self-signed certificate. First-start tuning is capped at 2 GB of memory and 100 connections. Services in the same project connect over the private network; a TCP proxy gives a public URL for tools such as psql or Grafana.

Common Use Cases

  • Storing IoT and sensor readings, application metrics or logs with fast time-range queries
  • Financial tick data, trading history and real-time analytics dashboards (for example with Grafana)
  • Event and product analytics with continuous aggregates and automatic data retention

Dependencies for TimescaleDB Hosting

  • A Railway volume for the PostgreSQL data directory (included in the template)
  • A PostgreSQL client or driver in your application (any library that speaks Postgres works)

Deployment Dependencies

Implementation Details

Connect another service in the same project by setting its variable to the private URL:

DATABASE_URL=${{TimescaleDB.DATABASE_URL}}

The timescaledb extension is already created in the default railway database and in template1, so new databases get it too. pgvector is available with CREATE EXTENSION vector;. Create your first hypertable:

CREATE TABLE metrics (time timestamptz NOT NULL, device int, value double precision);
SELECT create_hypertable('metrics', by_range('time'));

Optional variables you can add to the service before its first start: TS_TUNE_MEMORY (default 2GB), TS_TUNE_NUM_CPUS (2) and TS_TUNE_MAX_CONNS (100) for the tuning, and TIMESCALEDB_TELEMETRY=off to turn off TimescaleDB's anonymous telemetry. Updates to the template repo reach you as Railway's "update available" notice; after a TimescaleDB minor update, run ALTER EXTENSION timescaledb UPDATE; in each database. PostgreSQL major upgrades are never applied automatically.

Why Deploy TimescaleDB 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 TimescaleDB 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.


Template Content

More templates in this category

View Template
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
NEW
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0