You can install TimescaleDB on a cloud hosting provider, from a pre-built, publicly available machine image. These instructions show you how to use a pre-built Amazon machine image (AMI), on Amazon Web Services (AWS). The currently available pre-built cloud image is:

  • Ubuntu 20.04 Amazon EBS-backed AMI

The TimescaleDB AMI uses Elastic Block Store (EBS) attached volumes. This allows you to store image snapshots, dynamic IOPS configuration, and provides some protection of your data if the EC2 instance goes down. Choose an EC2 instance type that is optimized for EBS attached volumes. For information on choosing the right EBS optimized EC2 instance type, see the AWS instance configuration documentation.

Note

This section shows how to use the AMI from within the AWS EC2 dashboard. However, you can also use the AMI to build an instance using tools like Cloudformation, Terraform, the AWS CLI, or any other AWS deployment tool that supports public AMIs.

  1. Make sure you have an Amazon Web Services account, and are signed in to your EC2 dashboard.
  2. Navigate to Images → AMIs.
  3. In the search bar, change the search to Public images and type Timescale search term to find all available TimescaleDB images.
  4. Select the image you want to use, and click Launch instance from image.
    Launch an AMI in AWS EC2

After you have completed the installation, connect to your instance and configure your database. For information about connecting to the instance, see the AWS accessing instance documentation. The easiest way to configure your database is to run the timescaledb-tune script, which is included with the timescaledb-tools package. For more information, see the configuration section.

Note

After running the timescaledb-tune script, you need to restart the PostgreSQL service for the configuration changes to take effect. To restart the service, run sudo systemctl restart postgresql.service.

When you have PostgreSQL and TimescaleDB installed, connect to your instance and set up the TimescaleDB extension.

  1. On your instance, at the command prompt, connect to the PostgreSQL instance as the postgres superuser:

    sudo -u postgres psql
  2. At the prompt, create an empty database. For example, to create a database called tsdb:

    CREATE database tsdb;
  3. Connect to the database you created:

    \c tsdb
  4. Add the TimescaleDB extension:

    CREATE EXTENSION IF NOT EXISTS timescaledb;

You can check that the TimescaleDB extension is installed by using the \dx command at the command prompt. It looks like this:

tsdb=# \dx
List of installed extensions
Name | Version | Schema | Description
-------------+---------+------------+-------------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
timescaledb | 2.1.1 | public | Enables scalable inserts and complex queries for time-series data
(2 rows)
(END)

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.

You can always contact us if you need help working something out, or if you want to have a chat.

Keywords

Found an issue on this page?

Report an issue!