---
title: "Deploy TimescaleDB"
description: "TimescaleDB 2.32 on PostgreSQL 18: time-series SQL with TLS and a volume"
category: "Storage"
url: https://railway.com/deploy/timescaledb-2
---

# Deploy TimescaleDB

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

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

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

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### TimescaleDB https://raw.githubusercontent.com/aalfath/timescaledb-railway-template/main/assets/timescaledb.png

- **Source:** https://github.com/aalfath/timescaledb-railway-template

## Documentation

# 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

* TimescaleDB on GitHub: https://github.com/timescale/timescaledb
* TimescaleDB 2.32.0 release notes: https://github.com/timescale/timescaledb/releases/tag/2.32.0
* Official Docker image: https://hub.docker.com/r/timescale/timescaledb
* Template source and changelog: https://github.com/aalfath/timescaledb-railway-template

### 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:

```sql
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.



## 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/timescaledb-2
