1. Placeholders Used in This Guide
Every command below may contain values wrapped in <ANGLE_BRACKETS>. These are placeholders — replace the entire token (including the < and >) with your own value before running the command.
| Placeholder | Meaning | Example value | Where it appears |
<PG_VERSION> | Your installed PostgreSQL major version. Supported: 16, 17, 18 | 17 | Package names, config paths, service names |
<TSDB_VERSION> | TimescaleDB version to install | 2.30.1 (latest as of Sep 2026) | Version pinning, verification queries |
<OS_CODENAME> | Debian/Ubuntu release codename | bookworm, trixie, jammy, noble | apt repository line |
<RHEL_VERSION> | RHEL-compatible major version | 8, 9, 10 | yum repository URL |
<DB_NAME> | Database where the extension is enabled | ycrashdb | psql -d ... |
<DB_USER> | Database role used to connect | postgres | Connection strings |
<DB_PASSWORD> | Password for <DB_USER> | (your password) | Connection strings, docker run |
<DB_HOST> | Hostname or IP of the PostgreSQL server | localhost | Connection strings |
<DB_PORT> | PostgreSQL port | 5432 | Connection strings |
<PG_CONF_DIR> | Directory holding postgresql.conf | /etc/postgresql/17/main (Debian) or /var/lib/pgsql/17/data (RHEL) | Tuning steps |
<REPO_BASE> | Package repository base URL | https://packagecloud.io/timescale/timescaledb | Repo configuration |
2. Versions, Licensing, and Compatibility
2.1 Which package do I install? (Commercial only)
TimescaleDB publishes two package families. This guide uses only the commercial/TSL package.
| ✅ Install this (commercial / TSL) | ❌ Do NOT install (OSS / Apache-2) |
| Debian/Ubuntu | timescaledb-2-postgresql-<PG_VERSION> | timescaledb-2-oss-postgresql-<PG_VERSION> |
| RHEL | timescaledb-2-postgresql-<PG_VERSION> | timescaledb-2-oss-postgresql-<PG_VERSION> |
| License | Apache-2.0 + Timescale License (TSL) — all Community features | Apache-2.0 only — no TSL features |
| Feature set | Compression, continuous aggregates, job scheduler, toolkit, etc. | Base features only |
Always install these three packages together (commercial set):
timescaledb-2-postgresql-<PG_VERSION> # core extension (commercial/TSL build)
timescaledb-2-loader-postgresql-<PG_VERSION> # version loader (pulled in automatically)
timescaledb-toolkit-postgresql-<PG_VERSION> # Toolkit extension
timescaledb-tools # timescaledb-tune and CLI utilities
1
2
3
4
Rule of thumb: if a package name contains -oss-, skip it. The commercial package name has no -oss- segment.
2.2 Version matrix
| TimescaleDB | PostgreSQL 18 | PostgreSQL 17 | PostgreSQL 16 | PostgreSQL 15 |
2.30.x (latest, 2.30.1) | ✅ | ✅ | ✅ | ❌ |
| 2.29.x | ✅ | ✅ | ✅ | ❌ |
| 2.28.x (last for PG 15) | ✅ | ✅ | ✅ | ✅ |
- Latest TimescaleDB:
2.30.1 (released 2026-09-17). - TimescaleDB 2.29.0 removed PostgreSQL 15 support. If you are on PG 15, either upgrade PostgreSQL to 16/17/18 first, or pin TimescaleDB to the
2.28.x branch. - Avoid PostgreSQL minor versions
17.1 / 16.5 / 15.9 / 14.14 (breaking ABI change, reverted in the following minors).
2.3 Prerequisites
- PostgreSQL 16, 17, or 18 installed and running (see Section 4 if not)
root or sudo access psql client available - Internet access to
packagecloud.io and download.postgresql.org
3. Path A — PostgreSQL Already Installed (Skip Straight to the Plugin)
Use this path if PostgreSQL is already installed and running. Skip all PostgreSQL installation, initdb, and user/password setup steps — go directly to installing the TimescaleDB plugin.
3.1 Verify your PostgreSQL version first
Note the major version number (e.g. 17) — that is your <PG_VERSION>.
3.2 Debian / Ubuntu
A1. (Skip if the PGDG apt repo already exists) Enable the PostgreSQL Community (PGDG) apt repository:
sudo apt update
sudo apt install -y gnupg postgresql-common apt-transport-https lsb-release wget
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
1
2
3
A2. Add the TimescaleDB commercial repository:
echo "deb <REPO_BASE>/ubuntu/ <OS_CODENAME> main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
1
For Debian (not Ubuntu) use deb <REPO_BASE>/debian/ <OS_CODENAME> main instead.
You can also let packagecloud detect everything automatically:
curl -s <REPO_BASE>/install/repositories/timescale/timescaledb/script.deb.sh | sudo bash
1
A3. Install the TimescaleDB GPG key:
wget --quiet -O - <REPO_BASE>/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
1
A4. Refresh package lists:
A5. Install the commercial TimescaleDB plugin (replace <PG_VERSION>):
sudo apt install timescaledb-2-postgresql-<PG_VERSION> timescaledb-toolkit-postgresql-<PG_VERSION> timescaledb-tools
1
Example for PG 17: sudo apt install timescaledb-2-postgresql-17 timescaledb-toolkit-postgresql-17 timescaledb-tools
❌ Do not install timescaledb-2-oss-postgresql-<PG_VERSION> — that is the OSS build.
A6. Tune PostgreSQL for TimescaleDB:
sudo timescaledb-tune --pg-config=/usr/lib/postgresql/<PG_VERSION>/bin/pg_config
1
If timescaledb-tune is already on your PATH, sudo timescaledb-tune is enough.
A7. Confirm shared_preload_libraries (Section 6.2), then restart PostgreSQL:
sudo systemctl restart postgresql
1
A8. (Skip if the postgres password is already set) Set the password:
sudo -u postgres psql -c "\password postgres"
1
3.3 RHEL / Rocky / AlmaLinux / CentOS Stream
A1. (Skip if the PGDG rpm repo already exists) Install the PostgreSQL Community (PGDG) repository:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-$(rpm -E %{rhel})-x86_64/pgdg-redhat-repo-latest.noarch.rpm
1
A2. (RHEL 8+ only) Disable the built-in PostgreSQL module so PGDG packages win:
sudo dnf -qy module disable postgresql
1
A3. Add the TimescaleDB commercial repository:
sudo tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=<REPO_BASE>/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=<REPO_BASE>/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
1
2
3
4
5
6
7
8
9
10
11
12
Or let packagecloud detect everything automatically:
curl -s <REPO_BASE>/install/repositories/timescale/timescaledb/script.rpm.sh | sudo bash
1
A4. Refresh metadata:
sudo yum clean all && sudo yum makecache
1
A5. Install the commercial TimescaleDB plugin (replace <PG_VERSION>):
sudo yum install timescaledb-2-postgresql-<PG_VERSION> timescaledb-toolkit-postgresql-<PG_VERSION> timescaledb-tools
1
Example for PG 17: sudo yum install timescaledb-2-postgresql-17 timescaledb-toolkit-postgresql-17 timescaledb-tools
❌ Do not install timescaledb-2-oss-postgresql-<PG_VERSION> — that is the OSS build.
A6. Tune PostgreSQL for TimescaleDB:
sudo timescaledb-tune --pg-config=/usr/pgsql-<PG_VERSION>/bin/pg_config
1
A7. Confirm shared_preload_libraries (Section 6.2), then restart PostgreSQL:
sudo systemctl restart postgresql-<PG_VERSION>
1
A8. (Skip if the postgres password is already set) Set the password:
sudo -u postgres psql -c "\password postgres"
1
4. Path B — Full Installation (PostgreSQL + TimescaleDB)
Only use this path if PostgreSQL is not installed yet. If PostgreSQL is already running, use Path A and skip this entire section.
4.1 Debian / Ubuntu
B1. Install prerequisites and PostgreSQL:
sudo apt update
sudo apt install -y gnupg postgresql-common apt-transport-https lsb-release wget curl
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt install -y postgresql-<PG_VERSION> postgresql-client-<PG_VERSION>
1
2
3
4
B2. Add the TimescaleDB repository + GPG key (same as Path A, steps A2–A4):
echo "deb <REPO_BASE>/ubuntu/ <OS_CODENAME> main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - <REPO_BASE>/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
sudo apt update
1
2
3
B3. Install the commercial TimescaleDB plugin:
sudo apt install timescaledb-2-postgresql-<PG_VERSION> timescaledb-toolkit-postgresql-<PG_VERSION> timescaledb-tools
1
B4. Initialize nothing extra (Debian auto-creates the cluster), tune and start:
sudo timescaledb-tune --pg-config=/usr/lib/postgresql/<PG_VERSION>/bin/pg_config
sudo systemctl enable postgresql
sudo systemctl start postgresql
1
2
3
B5. Set the postgres password:
sudo -u postgres psql -c "\password postgres"
1
4.2 RHEL / Rocky / AlmaLinux / CentOS Stream
B1. Install the PGDG repository and disable the built-in module:
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-$(rpm -E %{rhel})-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
1
2
B2. Add the TimescaleDB repository (same as Path A, steps A3–A4).
B3. Install PostgreSQL + the commercial TimescaleDB plugin:
sudo yum install -y postgresql<PG_VERSION> postgresql<PG_VERSION>-server \
timescaledb-2-postgresql-<PG_VERSION> timescaledb-toolkit-postgresql-<PG_VERSION> timescaledb-tools
1
2
B4. Initialize the database cluster:
sudo /usr/pgsql-<PG_VERSION>/bin/postgresql-<PG_VERSION>-setup initdb
1
B5. Tune, enable, and start PostgreSQL:
sudo timescaledb-tune --pg-config=/usr/pgsql-<PG_VERSION>/bin/pg_config
sudo systemctl enable postgresql-<PG_VERSION>
sudo systemctl start postgresql-<PG_VERSION>
1
2
3
B6. Set the postgres password:
sudo -u postgres psql -c "\password postgres"
1
5. Enable the TimescaleDB Extension
1. Connect to your database:
psql -h <DB_HOST> -p <DB_PORT> -U <DB_USER> -d <DB_NAME>
1
Example: psql -h localhost -p 5432 -U postgres -d ycrashdb
2. Create the extension:
CREATE EXTENSION IF NOT EXISTS timescaledb;
CREATE EXTENSION IF NOT EXISTS timescaledb_toolkit;
1
2
3. Verify:
Expected output:
List of installed extensions
Name | Version | Default version | Schema | Description
---------------+---------+-----------------+--------------------+----------------------------
plpgsql | 1.0 | 1.0 | pg_catalog | PL/pgSQL procedural language
timescaledb | 2.30.1 | 2.30.1 | public | Enables scalable inserts...
timescaledb_toolkit | 1.x.x | ... | public | TimescaleDB Toolkit
1
2
3
4
5
6
6. Post-Installation Configuration
6.1 Tune PostgreSQL settings
sudo timescaledb-tune --pg-config=/usr/lib/postgresql/<PG_VERSION>/bin/pg_config
sudo timescaledb-tune --pg-config=/usr/pgsql-<PG_VERSION>/bin/pg_config
1
2
This optimizes shared_preload_libraries, shared_buffers, work_mem, maintenance_work_mem, and other performance-critical parameters.
If timescaledb-tune did not add TimescaleDB automatically, edit <PG_CONF_DIR>/postgresql.conf:
shared_preload_libraries = 'timescaledb'
1
| OS | <PG_CONF_DIR> default |
| Debian/Ubuntu | /etc/postgresql/<PG_VERSION>/main |
| RHEL/Rocky/Alma | /var/lib/pgsql/<PG_VERSION>/data |
6.3 Restart PostgreSQL
sudo systemctl restart postgresql
sudo systemctl restart postgresql-<PG_VERSION>
1
2
7. Verify the Installation
7.1 Check the TimescaleDB version
SELECT * FROM timescaledb_version();
1
7.2 Check installed extensions
SELECT extname, extversion FROM pg_extension WHERE extname IN ('timescaledb','timescaledb_toolkit');
1
8. Troubleshooting
| Symptom | Fix |
extension "timescaledb" does not exist | Ensure shared_preload_libraries = 'timescaledb' in <PG_CONF_DIR>/postgresql.conf, then restart PostgreSQL (Section 6.2–6.3). |
package 'timescaledb-2-postgresql-<PG_VERSION>' has no installation candidate | Your <PG_VERSION> or <OS_CODENAME> is unsupported, or the repo line is wrong. Re-run Step A2/A3 (Debian) or A3 (RHEL). |
| Accidentally installed the OSS build | sudo apt remove timescaledb-2-oss-postgresql-<PG_VERSION> (Debian) or sudo yum remove timescaledb-2-oss-postgresql-<PG_VERSION> (RHEL), then install the non-OSS package. |
Connection refused | sudo systemctl status postgresql (Debian) / sudo systemctl status postgresql-<PG_VERSION> (RHEL). |
Permission denied creating the extension | ALTER USER <DB_USER> CREATEDB; |
could not load library / OpenSSL errors | Install OpenSSL 3.x and ensure it is on PATH. |
| Old TimescaleDB version installed | sudo apt upgrade timescaledb-2-postgresql-<PG_VERSION> or sudo yum update timescaledb-2-postgresql-<PG_VERSION>; then ALTER EXTENSION timescaledb UPDATE; |
| Component | Version |
| TimescaleDB (commercial/TSL) | 2.30.1 (latest) — package timescaledb-2-postgresql-<PG_VERSION> |
| TimescaleDB Toolkit | latest (timescaledb-toolkit-postgresql-<PG_VERSION>) |
| PostgreSQL supported | 16, 17, 18 (2.29+/2.30.x) · 15 only on 2.28.x |
| Package flavor | TSL commercial — OSS (-oss-) packages excluded |
| Tested distros | Debian 12/13, Ubuntu 22.04/24.04, RHEL/Rocky/Alma 8/9/10 |