You can host TimescaleDB yourself, on your Debian-based, Red Hat-based, or Arch Linux-based systems.
Want to skip these steps?
Deploy a Timescale service in the cloud. We tune your database for performance and handle scalability, high availability, backups and management so you can relax.
These instructions use the
package manager on these distributions:
|Red Hat Enterprise
|Debian 10 Buster
|Ubuntu 20.04 LTS Focal Fossa
|Red Hat Enterprise Linux 7
|Rocky Linux 8
|Debian 11 Bullseye
|Ubuntu 22.04 LTS Jammy Jellyfish
|Red Hat Enterprise Linux 8
|Rocky Linux 9
|Debian 12 Bookworm
|Ubuntu 23.04 Lunar Lobster
|Red Hat Enterprise Linux 9
If you have already installed PostgreSQL using a method other than the
apt package manager maintained by Debian or Ubuntu archive,
pacman package manager, you could encounter errors following these instructions. It is safest to remove any existing PostgreSQL installations before you begin. If you want to keep your current PostgreSQL installation, do not install TimescaleDB using this method. Install from source instead.
At the command prompt, as root, add the PostgreSQL third party repository to get the latest PostgreSQL packages:
Run the PostgreSQL repository setup script:
Add the TimescaleDB third party repository:DebianUbuntu
Install TimescaleDB GPG key
For Ubuntu 21.10 and later use this command to install TimescaleDB GPG key
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
Update your local repository list:
If you want to install a specific version of TimescaleDB, instead of the most recent, you can specify the version like this:
apt-get install timescaledb-2-postgresql-12='2.6.0*' timescaledb-2-loader-postgresql-12='2.6.0*'
You can see the full list of TimescaleDB releases by visiting the releases page. Note that older versions of TimescaleDB don't always support all the OS versions listed above.
Configure your database by running the
timescaledb-tunescript, which is included with the
timescaledb-toolspackage. Run the
timescaledb-tunescript using the
sudo timescaledb-tunecommand. For more information, see the configuration section.
When you have PostgreSQL and TimescaleDB installed, you can connect to it from
your local system using the
psql command-line utility.
You can use the
apt on Debian-based systems,
yum on Red Hat-based systems,
pacman package manager to install the
Make sure your
aptrepository is up to date:
Restart PostgreSQL and create the TimescaleDB extension:
Restart the service after enabling TimescaleDB with
On your local system, at the command prompt, open the
psqlcommand-line utility as the
If your connection is successful, you'll see a message like this, followed by the
Set the password for the
Exit from PostgreSQL:
psqlclient to connect to PostgreSQL:
psqlprompt, create an empty database. Our database is called
Connect to the database you created:
Add the TimescaleDB extension:
Check that the TimescaleDB extension is installed by using the
\dxcommand at the
psqlprompt. Output is similar to:
After you have created the extension and the database, you can connect to your database directly using this command:
Now that you have your first Timescale database up and running, you can check out the Use Timescale section, and find out what you can do with it.
If you want to work through some tutorials to help you get up and running with Timescale and time-series data, check out the tutorials section.
Found an issue on this page?Report an issue!