Self-host TimescaleDB with Levelrail
PostgreSQL with the TimescaleDB extension for time series data, with a persistent volume and a generated password. The core is Apache-2.0 and some features fall under the Timescale License. It is not published on the host, so reach it from other services in this project at timescaledb:5432.
- Authortimescale
- LicenceLicenseRef-Timescale
- Memory512 MiB
- Services1
How to self-host TimescaleDB
-
Pull the images
One image is pulled on your server.
Show images
timescale/timescaledb:2.30.2-pg17
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 5432.
-
Fill in the secrets
1 secret is generated and stored encrypted, 2 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Read the generated password from the app secrets, connect from a service in the same project, The extension is already created in the default database. Run CREATE EXTENSION IF NOT EXISTS timescaledb in any other database you add.
TimescaleDB requirements
- Memory
- About 512 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 5432
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- LicenseRef-Timescale, source available
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then TimescaleDB. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the TimescaleDB docs page.
Deploy TimescaleDB your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy TimescaleDB from the CLI
levelrail-cli templates install timescaledb --name my-timescaledb Deploy TimescaleDB with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/timescaledb/install \
-d '{
"name": "my-timescaledb"
}' TimescaleDB configuration
TimescaleDB services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| timescaledb | timescale/timescaledb:2.30.2-pg17 | 5432 | tsdata -> /var/lib/postgresql/data |
TimescaleDB environment variables
| Variable | Service | Value |
|---|---|---|
| POSTGRES_DB | timescaledb | Preset by the template |
| POSTGRES_PASSWORD | timescaledb | Generated at deploy |
| POSTGRES_USER | timescaledb | Preset by the template |
Ports and volumes
- Ports
- 5432
- Volumes
- 1 named mount: tsdata -> /var/lib/postgresql/data
TimescaleDB FAQ
How much memory does TimescaleDB need?
The catalog lists about 512 MiB of memory for TimescaleDB.
Does TimescaleDB run on arm64?
For TimescaleDB, arm64 support is not confirmed; amd64 is unknown.
What licence is TimescaleDB under?
TimescaleDB is licensed under LicenseRef-Timescale, which is source-available, so read the terms before commercial use.
Does TimescaleDB need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does TimescaleDB use?
TimescaleDB listens on port 5432 inside the stack.
Where does TimescaleDB keep its data?
In a named volume: tsdata mounted at /var/lib/postgresql/data.
Can I deploy TimescaleDB on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id timescaledb for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image timescale/timescaledb:2.30.2-pg17 is what you deploy there.