From source

Note: TimescaleDB requires PostgreSQL 12.0 or 13.2, or later


  • A standard PostgreSQL 13 installation with development environment (header files) (see for the appropriate package)
  • C compiler (e.g., gcc or clang)
  • CMake version 3.11 or greater

Build and install with local PostgreSQL


It is highly recommended that you checkout the latest tagged commit to build from (see the repo's Releases page for that)

Clone the repository from GitHub:

git clone
cd timescaledb
git checkout <release_tag>  # e.g., git checkout 2.2.1

# Bootstrap the build system

# To build the extension
cd build && make

# To install
make install


Our build scripts use pg_config to find out where PostgreSQL stores its extension files. If you have two versions of PostgreSQL installed, use pg_config to find out which version TimescaleDB was installed with.


You will need to edit your postgresql.conf file to include the TimescaleDB library, and then restart PostgreSQL. First, locate your postgresql.conf file:

psql -d postgres -c "SHOW config_file;"

Then modify postgresql.conf to add the required library. Note that the shared_preload_libraries line is commented out by default. Make sure to uncomment it when adding our library.

shared_preload_libraries = 'timescaledb'


If you have other libraries you are preloading, they should be comma separated.

Then, restart the PostgreSQL instance.


Our standard binary releases are licensed under the Timescale License, which allows to use all our capabilities. To build a version of this software that contains source code that is only licensed under Apache License 2.0, pass -DAPACHE_ONLY=1 to bootstrap.

Found an issue on this page?

Report an issue!


Related Content