---
title: Enable TimescaleDB
layout: framework_docs
order: 20
objective: Learn how to enable Timescale on your Postgres database.
redirect_from: /docs/postgres/managing/enabling-timescale/
---
TimescaleDB is an open source time-series database built on top of PostgreSQL. It is a powerful tool for analyzing time-series data,
and is a great fit for many applications you might run on Fly.io.
The default Fly Postgres app no longer includes the TimescaleDB extension. To enable TimescaleDB,
provision a new Postgres app using our TimescaleDB-adapted image.
## Provision a new Postgres app with TimescaleDB
Specify the `postgres-flex-timescaledb` image with the `--image-ref` flag:
```cmd
fly pg create --image-ref flyio/postgres-flex-timescaledb:16
```
## Create the extension
Connect to your postgres database:
```cmd
# Connect to your target database
fly pg connect --app <database-app-name>
```
From the `postgres=# %` prompt, create the extension:
```sql
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
```
## (Optional) Attach to an app
```
fly pg attach <database-app-name> --app <app-name>
```
Enable TimescaleDB
TimescaleDB is an open source time-series database built on top of PostgreSQL. It is a powerful tool for analyzing time-series data,
and is a great fit for many applications you might run on Fly.io.
The default Fly Postgres app no longer includes the TimescaleDB extension. To enable TimescaleDB,
provision a new Postgres app using our TimescaleDB-adapted image.
Provision a new Postgres app with TimescaleDB
Specify the postgres-flex-timescaledb image with the --image-ref flag: