TigerData logo
TigerData logo
  • Product

    Product

    Tiger Cloud

    Robust elastic cloud platform for startups and enterprises

    TimescaleDB Enterprise

    Self-managed TimescaleDB for on-prem, edge and private cloud

    Open source

    TimescaleDB

    Time-series, real-time analytics and events on Postgres

    Search

    Vector and keyword search on Postgres

  • Industry

    Data Centers

    Energy & Utilities

    Oil & Gas Operations

    Smart Manufacturing

    Crypto

  • Docs
  • Pricing
  • Developer Hub

    Changelog

    Benchmarks

    Blog

    Community

    Customer Stories

    Events

    Support

    Integrations

    Launch Hub

  • Company

    About

    TigerData logo

    Timescale

    Partners

    Security

    Careers

Contact usStart a free trial
Tiger Data

Products

  • TimescaleDB
  • Tiger Cloud
  • TimescaleDB Enterprise
  • Postgres Search Stack

Industry

  • Data Centers
  • Energy & Utilities
  • Oil & Gas Operations
  • Smart Manufacturing
  • Crypto

Support

  • Cloud Status
  • Support
  • Security
  • Terms of Service
  • Code Of Conduct

Learn

  • Documentation
  • Blog
  • Tutorials
  • Changelog
  • Success Stories

Company

  • About
  • Contact Us
  • Careers
  • Newsroom
  • Brand
  • Events

Products

  • TimescaleDB
  • Tiger Cloud
  • TimescaleDB Enterprise
  • Postgres Search Stack

Industry

  • Data Centers
  • Energy & Utilities
  • Oil & Gas Operations
  • Smart Manufacturing
  • Crypto

Support

  • Cloud Status
  • Support
  • Security
  • Terms of Service
  • Code Of Conduct

Learn

  • Documentation
  • Blog
  • Tutorials
  • Changelog
  • Success Stories

Company

  • About
  • Contact Us
  • Careers
  • Newsroom
  • Brand
  • Events
Privacy preferencesLegalPrivacySitemap

Subscribe to the Tiger Data newsletter

Gold Partner with Inductive Automation — Ignition

2026 (c) Timescale, Inc., d/b/a Tiger Data.
All rights reserved.

Tiger Data
GOLD PARTNER WITHINDUCTIVE AUTOMATION

2026 (c) Timescale, Inc., d/b/a Tiger Data.
All rights reserved.

Privacy preferencesLegalPrivacySitemap

How to Install TimescaleDB on Azure

J

By Juan Jose

July 22nd, 2024

5 min

Share

J

By Juan Jose

July 22nd, 2024

5 min

Share

Copy as HTML

Open in ChatGPT

Open in Claude

Open in v0

PostgreSQL, Blog

Tutorials

Table of contents

  1. 01 Get Started With Azure and TimescaleDB
  2. 02 Install TimescaleDB
  3. 03 Using TimescaleDB
  4. 04 Next Steps
Get started for free
The Timescale and Azure logos side by side over a black background

TimescaleDB is a powerful, open-source time-series database built on top of PostgreSQL to efficiently manage time-series data, events, and analytics. Optimized for fast ingest and complex queries, it speaks “full SQL” and is correspondingly easy to use like a traditional relational database, yet scales in ways previously reserved for NoSQL databases. 

This guide will walk you through the process of setting up TimescaleDB on Microsoft Azure, ensuring you have a scalable and high-performance database ready to handle your time-series data needs.

What you'll learn:

  • Getting started with Azure
  • Setting up your VM instance
  • Installing TimescaleDB
  • Configuring PostgreSQL
  • Using TimescaleDB

Get Started With Azure and TimescaleDB

First, head over to Azure and create your Azure account. Once you've logged into the Azure portal, you'll see a dashboard similar to this:

image

Create a Virtual Machine (VM)

1. Navigate to the Azure Marketplace: In the Dashboard, click on "Create a resource" and search for "Ubuntu Server 20.04 LTS." Select it from the list.

image

2. Configure the VM: Click on "Create" and follow these steps:

Basics: 

  • Subscription: Select your subscription.
  • Resource group: Create a new resource group named timescale or use an existing one.
  • Virtual machine name: Enter timescale-vm.
  • Region: Select your preferred region.
  • Image: Ensure "Ubuntu Server 20.04 LTS" is selected.
  • Size: Select Standard_B1s for this tutorial.


Administrator account:

  • Authentication type: Select "Password".
  • Username: Enter your preferred username. We will use "timescale".
  • Password: Enter a strong password.   
image
  • Disks: Use the default settings for simplicity.
  • Networking: Use the default settings.
  • Management: Use the default settings.
  • Advanced: Use the default settings.
  • Tags: Optionally, add tags for resource management.
  • Review + create: Review your settings.
image

Click on "Create."

image

Once the deployment is completed, click on "Go to resource."

image

Connect to your VM

1. Once your VM is deployed, go to the "Overview" section of your VM and click on "Connect".

image
Azure's Timescale VM page. The Connect dropdown is highlighted with a green frame around it.

2. Select the SSH using Azure CLI. Click on "Select."

image
Azure's Timescale VM page. The Select button is highlighted with a green frame around it.

3. Follow the instructions to connect to your VM using SSH. Check the policies, and then click on "Configure + connect."

image
Azure's Timescale VM page. The Configure + connect button is highlighted with a green frame around it.

4. A tab will open. Click on "Apply" to continue.

image

5. Finally, the terminal will open. The connection is established and now you can go on with the next step, which is installing TimescaleDB.

image

Install TimescaleDB

1. Add TimescaleDB PPA:

sudo apt install gnupg postgresql-common apt-transport-https lsb-release wget sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg sudo apt update
image

2. Install TimescaleDB:

sudo apt install timescaledb-2-postgresql-16 postgresql-client

Configure PostgreSQL

1. Check PostgreSQL Version (Ensure it shows psql (PostgreSQL) 16.x):

psql --version
💡
If you need help installing psql, here's a step-by-step guide for different operating systems.

image

2. Modify configuration:

cd /etc/postgresql/16/main sudo chmod 644 postgresql.conf nano postgresql.conf
image

3. Update postgresql.conf:

Set listen_addresses to '*':  

listen_addresses = '*'

Set shared_preload_libraries to timescaledb:

shared_preload_libraries = 'timescaledb'

Save and exit the editor.

image

4. Tune PostgreSQL:

sudo timescaledb-tune
image
💡
Need more tips to optimize your PostgreSQL performance? Check our guides.


5. Restart PostgreSQL:

sudo systemctl restart postgresql

6. Switch to PostgreSQL user:

sudo su - postgres

Using TimescaleDB

  1. Access PostgreSQL:
psql -U postgres

2. Create database:

CREATE DATABASE tutorial;

3. Connect to the database:

\c tutorial

4. Initialize TimescaleDB extension:

CREATE EXTENSION IF NOT EXISTS timescaledb;

5. Create a hypertable:

CREATE TABLE conditions (     time        TIMESTAMPTZ       NOT NULL,     location    TEXT              NOT NULL,     temperature DOUBLE PRECISION  NULL,     humidity    DOUBLE PRECISION  NULL ); SELECT create_hypertable('conditions', 'time');
💡
Timescale’s hypertables automatically partition your data, making your queries faster. Read this blog post to learn how they make PostgreSQL partitioning easier.


6. Insert data:

INSERT INTO conditions(time, location, temperature, humidity) VALUES (NOW(), 'office', 70.0, 50.0);

7. Query data:

SELECT * FROM conditions ORDER BY time DESC LIMIT 100;
image

Next Steps

You now have TimescaleDB up and running on Azure. Explore more with sample datasets and advanced tutorials available in the TimescaleDB documentation. If you have any questions, feel free to join our Slack community or check out our GitHub repository (GitHub ⭐ are welcome!). 

For smaller teams wanting to focus on application development and not their database or enterprises looking for scale, cost-effectiveness, and the peace of mind of a managed solution (with one-click high availability, forking, connection pooling, a low-cost storage tier for older data, SOC 2 Type 2 compliance, and much more), try Timescale Cloud. It’s free for 30 days, no credit card required. 


About the author

J

By Juan Jose

// Related posts

Speed Up Your Workflows: Introducing SQL Assistant, Recommendations, and Insights
Speed Up Your Workflows: Introducing SQL Assistant, Recommendations, and Insights

Announcements & Releases

PostgreSQL, Blog

Speed Up Your Workflows: Introducing SQL Assistant, Recommendations, and Insights

Build features, not workarounds. Our developer tools keep you shipping: introducing SQL Assistant, Recommendations, and Insights.

By Grant Godeke

May 1st, 2025

We Listened: Pgai Vectorizer Now Works With Any Postgres Database
We Listened: Pgai Vectorizer Now Works With Any Postgres Database

Announcements & Releases

AI

We Listened: Pgai Vectorizer Now Works With Any Postgres Database

By popular demand, pgai Vectorizer is now a Python library and CLI that works with any self-hosted or managed Postgres database. See how we built it.

By Avthar Sewrathan

April 30th, 2025

Connecting S3 and Postgres: Automatic Synchronization Without ETL Pipelines
Connecting S3 and Postgres: Automatic Synchronization Without ETL Pipelines

Announcements & Releases

AI

Connecting S3 and Postgres: Automatic Synchronization Without ETL Pipelines

Running analytical queries on Parquet files? Searching unstructured documents embeddings with pgvector? Get Postgres performance & S3 scalability in one place.

By Vineeth Pothulapati

April 30th, 2025

Stay updated with new
posts and releases.

Receive the latest technical articles and release notes in your inbox.