Apache IoTDB
Overview
Apache IoTDB (Internet of Things Database) is a high-performance time-series database purpose-built for IoT and IIoT workloads, with a SQL-like query language. It collects devices, sensors and industrial telemetry at massive scale. The SecureAnyCloud image installs Apache IoTDB 2.0.8 (the official apache-iotdb-2.0.8-all-bin distribution) on a Temurin 17 JRE and runs it in standalone mode as a dedicated iotdb system user.
What you get:
- Apache IoTDB 2.0.8 in standalone mode (one ConfigNode + one DataNode)
- A Temurin 17 JRE (the runtime IoTDB 2.x requires)
- A unique per-VM
rootpassword generated on first boot and rotated into the image (the defaultroot/rootis never shipped) - All data directories (data, WAL, system, consensus) on a dedicated 30 GiB Azure data disk at
/var/lib/iotdb - Loopback-only native client/SQL port
6667with password authentication (not exposed publicly) - A REST service on
127.0.0.1:18080with a/pinghealth endpoint - 24/7 SecureAnyCloud support
This is a database product: IoTDB's native client/SQL port 6667 listens on 127.0.0.1 only and is not opened to the internet. Connect locally on the VM, over an SSH tunnel, or open 6667 on your own network security group after re-binding (see Step 9).
Prerequisites
Before you deploy this image, make sure you have:
- An active Azure subscription
- An SSH key pair
- A VNet and subnet in the target region
Standard_B2ms (2 vCPU / 8 GiB RAM) is a good starting point. For NSG inbound rules, allow 22/tcp from your management network.
No inbound application ports are needed by default, because IoTDB is reached locally or over the SSH tunnel.
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Apache IoTDB by SecureAnyCloud, and select Create.
On Basics, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) only.
Then select Review + create, and select Create.
Step 2 - Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:apache-iotdb-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name iotdb \
--image sac1647283583153:apache-iotdb-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku StandardStep 3 - Connect to your VM
ssh azureuser@<vm-public-ip>Step 4 - Confirm Apache IoTDB is installed and running
systemctl is-active iotdb.service apache-iotdb-firstboot.service ss -tln | grep -E ':6667 |:18080 'You should see both services active and the native client port 6667 bound to loopback alongside the REST port 18080:
active active LISTEN 0 50 [::ffff:127.0.0.1]:6667 *:* LISTEN 0 50 *:18080 *:*Step 5 - Retrieve your per-VM root password
Each VM generates its own unique IoTDB root password on first boot and writes it to a root-only credentials file (the default root/root is never shipped):
sudo cat /root/apache-iotdb-credentials.txtThe file contains iotdb.root.password, the CLI connection string, the REST health-check command and the port-6667 instructions. Store the password in your secrets manager. In the commands below, <IOTDB_ROOT_PASSWORD> stands for the value of iotdb.root.password.
Step 6 - Connect with the IoTDB SQL CLI
The IoTDB CLI authenticates with the root user and the per-VM password. Run a non-interactive query with -e, or omit -e to drop into the interactive IoTDB> shell:
/opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw <IOTDB_ROOT_PASSWORD> -e 'SHOW DATABASES'A wrong password is rejected, so the database is never open without the credential.
Step 7 - Create a time-series and insert data
IoTDB models data as a tree of root.<database>.<device>.<measurement> time-series. Create a database, create a typed time-series, insert a few timestamped points and read them back:
/opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw <IOTDB_ROOT_PASSWORD> -e " CREATE DATABASE root.factory; CREATE TIMESERIES root.factory.line1.temperature WITH DATATYPE=FLOAT,ENCODING=RLE; INSERT INTO root.factory.line1(timestamp,temperature) VALUES(1,21.7); INSERT INTO root.factory.line1(timestamp,temperature) VALUES(2,22.4); INSERT INTO root.factory.line1(timestamp,temperature) VALUES(3,23.9); SELECT temperature FROM root.factory.line1; SELECT avg(temperature) FROM root.factory.line1; "The SELECT returns the three points keyed by timestamp, and the aggregate query returns their average. This shows that the time-series database works end to end.
Step 8 - Use the REST API and confirm persistence
IoTDB also exposes a REST service on 127.0.0.1:18080. The /ping endpoint is a Basic-auth health check, and /rest/v2/query runs SQL over HTTP:
curl -u root:<IOTDB_ROOT_PASSWORD> http://127.0.0.1:18080/ping
curl -u root:<IOTDB_ROOT_PASSWORD> -H 'Content-Type: application/json' \
-X POST http://127.0.0.1:18080/rest/v2/query \
-d '{"sql":"SHOW DATABASES"}'All IoTDB data, WAL and system directories live on the dedicated Azure data disk, so the time-series persist across reboots and the volume is independently resizable:
findmnt /var/lib/iotdbStep 9 - Remote access and opening port 6667
By default the native client/SQL port 6667 binds to 127.0.0.1 only and is not reachable from outside the VM. You have two options for remote access:
Option A: SSH tunnel (no NSG change). from your workstation, forward the port and run the CLI against 127.0.0.1:
ssh -L 6667:127.0.0.1:6667 azureuser@<vm-public-ip>Option B: bind publicly and open the NSG. Set dn_rpc_address=0.0.0.0 in /opt/iotdb/conf/iotdb-system.properties and restart IoTDB. Then add an inbound rule for TCP 6667 on this VM's network security group, restricted to your trusted networks:
az network nsg rule create \
--resource-group <your-rg> --nsg-name <your-nsg> \
--name allow-iotdb-6667 --priority 1100 \
--access Allow --protocol Tcp --direction Inbound \
--destination-port-ranges 6667 --source-address-prefixes <your-cidr>Do not expose 6667 to the public internet without network controls. Always keep the per-VM root password and consider TLS termination in front of IoTDB for production.
Support
This image is maintained by SecureAnyCloud with 24/7 support. Apache, Apache IoTDB and the Apache IoTDB logo are trademarks of the Apache Software Foundation. For deployment help or questions, contact sales@secureanycloud.com.
Deploy on Azure
Launch Apache IoTDB on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
This image runs Apache IoTDB, the high-performance, lightweight open-source time-series database purpose-built for IoT and industrial sensor data. IoTDB delivers fast columnar storage with high compression, a familiar SQL-like query language, rich aggregation and downsampling, and connectors for the wider data ecosystem.
What you get:
- A ready-to-use appliance: the single-node standalone deployment (one ConfigNode plus one DataNode) is installed and
iotdb.serviceis enabled and starts on boot, so the moment an engineer connects over SSH the database is already accepting writes - A headless time-series database service with no web interface. IoTDB is a JVM application, and this image bundles a dedicated Eclipse Temurin JRE 17, so no system Java is required
- The DataNode client RPC port (
6667, used by the CLI and the native session SDKs) and the ConfigNode and DataNode coordination ports bound to loopback only, so the database engine is never exposed to the network - The IoTDB REST API V2 enabled on port
18080. The instance security group opens port 22 only, so the REST port is reachable over127.0.0.1on the instance but never from the network until you open it yourself - A fresh root password, unique to each instance: on first boot, a one-shot service generates it and rotates the built-in default away. The password is written to a root-only file, and no shared or default credentials ship in the image
- The entire time-series database, including every ConfigNode and DataNode data, write-ahead-log, consensus and system directory, on a dedicated, independently resizable EBS data volume mounted at
/var/lib/iotdb, so your sensor data sits on durable storage rather than the operating system disk
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group allowing inbound port 22 from your management network
- The AWS CLI (version 2) installed locally if you plan to deploy from the command line
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Apache IoTDB. Select the SecureAnyCloud listing and choose Select, then choose Continue on the subscription summary.
Pick an instance type of t3.medium or larger. The single-node deployment runs two JVMs (the ConfigNode and the DataNode), so 4 GiB of memory is the practical minimum. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that opens port 22 from your management network. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialisation runs once after the instance state becomes Running and the status checks pass. It waits for the database to come up, generates the per-instance root password and rotates the default, then writes the credentials file. The JVM start plus this rotation takes a minute or two on first boot.
Launch the instance from the AWS CLI
Run the following command to launch an instance from the SecureAnyCloud Apache IoTDB Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing, <key-name> with your EC2 key pair name, <subnet-id> with your subnet ID, and <security-group-id> with a security group that opens port 22 from your management network.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type t3.medium \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=apache-iotdb}]'When the instance reaches the Running state and its status checks pass, note its public IP address or DNS name from the EC2 console or with aws ec2 describe-instances.
Connect to your instance
Connect over SSH using your key pair and the login user for your operating system variant. For Ubuntu 24.04, the login user is ubuntu.
ssh -i <key-name>.pem ubuntu@<public-ip>A welcome banner prints the most useful commands. Retrieve the per-instance root password that first boot generated:
sudo cat /root/apache-iotdb-credentials.txtThat file contains the iotdb.root.password value for this instance and ready-to-paste examples for the SQL CLI and the REST API. The commands in the following steps read the password straight from this file, so you can run them as written.
Verify the service
Apache IoTDB runs as a system service that is enabled and started on boot. Confirm the service is active:
systemctl is-active iotdbThat prints active. For the full unit status, including the main process and the two JVMs (ConfigNode and DataNode), use:
systemctl status iotdb --no-pagerThe database binds the client RPC port and the REST port; confirm they are listening on the instance:
ss -tlnp | grep -E '6667|18080'Confirm the bundled JRE that runs the database:
/usr/lib/jvm/temurin-17-jre-amd64/bin/java -versionUse the SQL command-line client
IoTDB ships a SQL command-line client under /opt/iotdb/sbin/start-cli.sh. It connects to the DataNode RPC on 127.0.0.1:6667 as user root.
The following commands read the per-instance password from the credentials file, create a couple of timeseries, write data points and query them back. First, create the schema:
PASS=$(sudo grep '^iotdb.root.password=' /root/apache-iotdb-credentials.txt | cut -d= -f2-) sudo -u iotdb /opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw "$PASS" \
-e "CREATE TIMESERIES root.factory.line1.temperature WITH DATATYPE=FLOAT,ENCODING=GORILLA;"Insert a couple of readings, then query them back ordered by time:
PASS=$(sudo grep '^iotdb.root.password=' /root/apache-iotdb-credentials.txt | cut -d= -f2-) sudo -u iotdb /opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw "$PASS" \
-e "INSERT INTO root.factory.line1(time,temperature) VALUES(now(),73.4);"
sudo -u iotdb /opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw "$PASS" \
-e "SELECT temperature FROM root.factory.line1 ORDER BY time DESC LIMIT 5;"To explore the database interactively, run sudo -u iotdb /opt/iotdb/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw '<password>'. Then type SQL statements such as SHOW DATABASES;, SHOW TIMESERIES;, SHOW DEVICES; and aggregation queries like SELECT count(temperature) FROM root.factory.line1;. Type quit; to exit.
The REST API
IoTDB also exposes a REST API V2 on port 18080, enabled on this image. The /ping endpoint is an unauthenticated liveness probe that returns HTTP 200 with a success body while the service is up:
curl -s http://127.0.0.1:18080/pingData endpoints require HTTP Basic authentication with user root and the per-instance password. The following command reads the password, builds the Basic auth header and runs a query through POST /rest/v2/query:
PASS=$(sudo grep '^iotdb.root.password=' /root/apache-iotdb-credentials.txt | cut -d= -f2-)
curl -s -X POST http://127.0.0.1:18080/rest/v2/query \
-H "Authorization: Basic $(printf 'root:%s' "$PASS" | base64 -w0)" \
-H 'Content-Type: application/json' \
-d '{"sql":"select temperature from root.factory.line1 order by time desc limit 5"}'The response is a JSON document with the expression names, data types, timestamps and values. To ingest data over REST, post to POST /rest/v2/insertTablet with the same Basic auth header.
The REST port binds on the instance but is not reachable from the network, because the security group opens port 22 only. To expose it, open the port in the instance security group yourself and front it with your own TLS termination.
The data volume
The entire time-series database lives on a dedicated EBS volume mounted at /var/lib/iotdb. Every ConfigNode and DataNode data, write-ahead-log, consensus and system directory sits here, off the operating system disk, so you can resize or snapshot the database independently. Confirm the mount with:
df -h /var/lib/iotdbIoTDB stores sensor data in its purpose-built columnar TsFile format with high compression, so long-retention time series stay compact on disk.
To grow the volume, expand the EBS volume in the AWS console, then grow the filesystem on the instance with sudo resize2fs on the underlying device. Snapshot the volume for point-in-time backups of the database.
Connect applications
Point your applications at the instance to write and read time series at scale. The native session SDKs (Java, Python, C++, Go and others) connect to the DataNode RPC on port 6667 and are the highest-throughput path for ingestion. The REST API on 18080 suits lightweight HTTP clients.
Both authenticate as root with the per-instance password. You can create additional users and grant fine-grained privileges with CREATE USER and GRANT from the SQL CLI.
The RPC and REST ports bind to loopback and the instance respectively, and the security group opens only port 22, so decide your own exposure. Open the relevant port in the security group for trusted clients, or keep access on the instance and tunnel over SSH.
Support
This image is published and supported by SecureAnyCloud. Support covers deployment, schema and timeseries modelling, ingestion through the REST API and the session SDKs, IoTDB SQL queries, aggregation and downsampling, retention and storage tuning, user and privilege management, and upgrade planning. Contact SecureAnyCloud through the support channel listed on the AWS Marketplace listing.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch Apache IoTDB on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com