Docker - QuestDB Container Setup
QuestDB is a high-performance, open-source SQL database. QuestDB’s stack is engineered from scratch, zero-GC Java and dependency-free. It includes endpoints for PostgreSQL wire protocol, high-throughput schema-agnostic InfluxDB Line Protocol, and a REST API for queries, bulk imports, and exports. QuestDB is an alternative to InfluxDB. You can read here about the differences between InfluxDB, TimescaleDB and QuestDB.
Personally, I really like the simple design of QuestDB. Maybe it’s time to get back to basics, because I couldn’t get used to the flux syntax and found the UI of InfluxDB nice but not pleasant to work with. QuestDB could be the perfect complement for time-series data next to the relational data I have in MariaDB.
The first thing I wanted to do with QuestDB is to save sensor data from my smartmeter using n8n. Since n8n has a QuestDB integration, I thought that would be a good test case for both QuestDB and n8n.
Docker pull command:
docker pull questdb/questdb
Within my home folder I have created a Docker folder where I create a subfolder for each container:
mkdir -p docker/questdb
Also create folders where the data can be stored:
Now create a shell script with Nano:
sudo nano questdb_run.sh
With this shell script we are going to create the container.
Copy the following into
docker run -d \
-p 9000:9000 \
-p 8812:8812 \
-p 9009:9009 \
-v $PWD/data:/var/lib/questdb \
-e TZ="Europe/Amsterdam" \
-e QDB_TELEMETRY_ENABLED=false \
--restart unless-stopped \
If necessary, adjust the following:
This is the web console and REST port. Choose a port that is still available. Check this with netstat
This is the PostgreSQL port. Choose a port that is still available. Check this with netstat
This is the InfluxDB Line Protocol port. Choose a port that is still available. Check this with netstat
Choose the location for the data. In this example it is the data map we created
Pick the right timezone. This is the system timezone which controls what some scripts and commands return like
QuestDB sends anonymous telemetry data with information about usage. Choose to enable or disable this
Exit Nano with
CTRL-X and save the changes.
Start the container:
sudo sh questdb_run.sh
Check if the container is running properly.
The QuestDB Web Console can now be accessed via the following URL:
http://<IP DOCKER HOST>:9000/
Read other notes
No comments found for this note.
Join the discussion for this note on this ticket. Comments appear on this page instantly.
Notes mentioning this note
- Docker - InfluxDB 2.x Container Setup
InfluxDB is a time series database.
- Docker - QuestDB Container Setup
QuestDB is a high-performance, open-source SQL database. QuestDB’s stack is engineered from scratch, zero-GC Java and dependency-free. It includes endpoints...
- Docker - Smartmeter2mqtt Container Setup with Webserver and Webrequest Output
Smartmeter2mqtt is an application that parses smartmeter data over the network or a P1 cable, I use it in combination...
- Docker - n8n Workflow Automation Container Setup
As a big fan of Node-RED and Apache Hop, it took me a long time to give n8n a try....
- P1 reader - Save Data From Smartmeter2mqtt with n8n to QuestDB
Here I describe how to create a n8n flow that receives parsed P1 reader data from Smartmeter2mqtt and then how...