QuestDB container setup
Introduction
QuestDB is a high-performance, open-source SQL database built from scratch in zero-GC Java, dependency-free. It supports the PostgreSQL wire protocol, InfluxDB Line Protocol, and a REST API for queries, bulk imports, and exports. QuestDB serves as an alternative to InfluxDB with a simpler design, avoiding the complexities of the Flux syntax and providing an enjoyable user experience.
For time-series data, QuestDB complements the relational data in MariaDB. Initially, I aimed to save sensor data from my smart meter [[P1 reader - Save Data From Smartmeter2mqtt with n8n to QuestDB|save sensor data]] using n8n with the QuestDB integration, making it an excellent test case for both QuestDB and n8n. Read more about the differences between InfluxDB, TimescaleDB, and QuestDB here.
Setup
-
Create the folders needed by the container
Run the following commands inside your home folder:
-
Create the script needed to run the container
Save the following script as
questdb_run.sh
:Instructions:
- Optional Replace
docker
withpodman
if needed - Required Replace port number
9000
(on the left side of:
) with a port number that is available if needed. This is the web console and REST port - Optional Replace port number
8812
(on the left side of:
) with a port number that is available if needed. This is the PostgreSQL port - Optional Replace port number
9009
(on the left side of:
) with a port number that is available if needed. This is the InfluxDB Line Protocol port - Optional Replace
$PWD/data
with the location of your data if needed. This can be a fileserver mount - Optional Add the setting
-e QDB_TELEMETRY_ENABLED=false
to disable sending anonymous telemetry data with information about usage - Required Replace
Europe/Amsterdam
with your own timezone. TheGENERIC_TIMEZONE
setting is used by for example the Cron-Node
- Optional Replace
-
Run the script to create the container
Run the following command:
The image
questdb/questdb
is automatically pulled and the container is created. -
Check the results
If needed you can check if the container is running properly.
Now you can use the QuestDB Web Console by opening a web browser and going to:
http://localhost:9000
. Replace localhost with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.
No comments found for this note.
Join the discussion for this note on Github. Comments appear on this page instantly.