How to Configure TimescaleDB Encryption at REST

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up timescaledb encryption at rest by encrypting the underlying storage volume or disk. TimescaleDB runs as a PostgreSQL extension and uses the host file system to protect saved data. Teams often turn on cloud block storage encryption or Linux disk tools to meet this need. Still, disk encryption only protects raw drives and leaves live data open to wide database roles. How timescaledb encryption at rest works in practice TimescaleDB stores time-series data in tables called hypertables

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up timescaledb encryption at rest by encrypting the underlying storage volume or disk. TimescaleDB runs as a PostgreSQL extension and uses the host file system to protect saved data. Teams often turn on cloud block storage encryption or Linux disk tools to meet this need. Still, disk encryption only protects raw drives and leaves live data open to wide database roles.

How timescaledb encryption at rest works in practice

TimescaleDB stores time-series data in tables called hypertables that split into smaller chunks on disk. Because it builds on PostgreSQL, it relies on the host system to encrypt those data files. When you set up a cloud server, you turn on volume encryption in your cloud account. The cloud provider encrypts all data chunks, write-ahead logs, and indexes before writing them to disk.

When the database reads a chunk, the storage system decrypts the blocks in memory. For self-hosted servers, teams set up full disk encryption at the operating system level. You manage the master keys through a cloud key service or a local key store. You also need to encrypt your backup files and snapshot volumes using the same key rules. This setup requires no changes to your app code or database queries.

Choosing between disk and file system encryption

Teams usually pick between cloud block encryption and operating system file encryption. Cloud volume encryption is the fastest way to protect data on managed virtual machines. The cloud host handles key rotation and block decryption with very little CPU overhead. You just check a box when you create the storage volume for your database.

Self-hosted teams often use Linux disk encryption tools to lock down raw physical drives. This method asks for a boot key when the server starts up. Once the disk unlocks, the operating system sees normal files and folders. Both paths protect your time-series chunks if someone steals a hard drive or copies a snapshot.

Encryption at Rest + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What disk encryption solves and what it leaves open

Storage encryption solves one specific problem: physical disk theft or unauthorized volume snapshots. If an attacker gets a raw disk file, they cannot read it without the storage key. This helps teams pass basic security checks for saved data. Yet the database unlocks every block as soon as the service starts running.

Once a user logs in with a valid database role, disk encryption does nothing. The storage setup decides how bytes sit on disk, not what live queries can read. Engineers and apps with broad read roles can still pull raw emails, phone numbers, or card numbers. If someone runs a bad delete statement or dumps a whole hypertable, disk encryption will not stop them. Protecting live data requires controls that inspect queries and rewrite sensitive fields in results.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does TimescaleDB have its own built-in encryption at rest feature?

No, the open-source extension uses the underlying PostgreSQL storage engine. You encrypt data at rest by using Linux disk encryption or cloud block storage encryption.

Does disk encryption protect sensitive fields from database admins?

No, the operating system decrypts blocks before sending them to the database engine. Any user with a valid login and read role receives clear text query results.

Do I need to encrypt TimescaleDB write-ahead logs and backups separately?

Yes, every disk volume that holds database files, logs, or snapshots needs encryption enabled. If you store backups in object storage, turn on bucket encryption for those files too.

The query runs. The emails stay hidden.