Getting Started

Quick Start

At the moment, TDengine server only runs on Linux, but client can run on either Windows or Linux. Supports X64 and ARM CPU systems. You can set up and install TDengine server either from the source code or the packages. It takes only a few seconds from download to run it successfully.

Install from Source

Please visit our github page for instructions on installation from the source code.

Install from Package

Three different packages for TDengine server are provided, please pick up the one you like. (Lite packages only have execution files and connector of C/C++, but standard packages support connectors of nearly all programming languages.) Beta version has more features, but we suggest you to install stable version for production or testing.

For TDengine client, please pick up Linux below. If you are using Mac, please use RESTful connector. (Lite packages only have execution files and C/C++ connector support.)

taosTools are some useful tool collections for TDengine.

It is recommended to download the deb or rpm install package for easy installation of dependencies. If you use the tar.gz installation package, you need to install the dependencies yourself as following:

  • On Debian/Ubuntu systems, you need to install libjansson4 and libsnappy1v5
  • On CentOS/RHEL systems, you need to install jansson and snappy

And TDengine server or TDengine client need be installed as well.

To download the newest beta version and past versions of our packages, click here

For the time being, TDengine server only supports installation on Linux systems using systemd as the service manager. To check if your system has systemd, use the which command.

which systemd

If the systemd command is not found, please install from source code.

Install TDengine by apt-get

If you use Debian or Ubuntu system you can use 'apt-get' command to install TDengine from official repository. Please use following commands to setup:

wget -qO - http://repos.taosdata.com/tdengine.key | sudo apt-key add -
echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-stable stable main" | sudo tee /etc/apt/sources.list.d/tdengine-stable.list
[Optional] echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-beta beta main" | sudo tee /etc/apt/sources.list.d/tdengine-beta.list
sudo apt-get update
apt-get policy tdengine
sudo apt-get install tdengine

Running TDengine

After installation, start the TDengine service by the systemctl command.

systemctl start taosd

Then check if the server is working now.

systemctl status taosd

If the service is running successfully, you can play around through TDengine shell taos, the command line interface tool located in directory /usr/local/bin/taos

Note: The systemctl command needs the root privilege. Use sudo if you are not the root user.

TDengine Shell

To launch TDengine shell, the command line interface, in a Linux terminal, type:


The welcome message is printed if the shell connects to TDengine server successfully, otherwise, an error message will be printed (refer to our FAQ page for troubleshooting the connection error). The TDengine shell prompt is:


In the TDengine shell, you can create databases, create tables and insert/query data with SQL. Each query command ends with a semicolon. It works like MySQL, for example:

create database db;
use db;
create table t (ts timestamp, cdata int);
insert into t values ('2019-07-15 10:00:00', 10);
insert into t values ('2019-07-15 10:01:05', 20);
select * from t;
           ts            |    speed    |
 2019-07-15 00:00:00.000 |          10 |
 2019-07-15 01:00:00.000 |          20 |
Query OK, 2 row(s) in set (0.003128s)

Besides the SQL commands, the system administrator can check system status, add or delete accounts, and manage the servers.

Shell Command Line Parameters

You can run taos command with command line options to fit your needs. Some frequently used options are listed below:

  • -c, --config-dir: set the configuration directory. It is /etc/taos by default
  • -h, --host: set the FQDN of the server it will connect to, Default is localhost
  • -s, --commands: set the command to run without entering the shell
  • -u, --user: user name to connect to server. Default is root
  • -p, --password: password. Default is 'taosdata'
  • -?, --help: get a full list of supported options


taos -h -s "use db; show tables;"

Run Batch Commands

Inside TDengine shell, you can run batch commands in a file with source command.

taos> source <filename>;

We have a demo file "demo.sql" with batch commands under the folder “/tests/examples/bash/”. You can replace the "filename" by our demo file and then take a quick try.


  • Use up/down arrow key to check the command history
  • To change the default password, use "alter user" command
  • ctrl+c to interrupt any queries
  • To clean the cached schema of tables or STables, execute command RESET QUERY CACHE

Experience 10x faster insertion/query speed

After starting the TDengine server, you can execute the command "taosdemo" in the Linux terminal. For example:

> taosdemo

Using this command, a super table named "meters" will be created in the database "test". There are 10k tables under this super table, named from "d0" to "d9999". In each table there are 10k rows of records, each row with columns "ts", "current", "voltage" and "phase". "ts" timestamp is from "2017-07-14 10:40:00 000" to "2017-07-14 10:40:09 999". Each table also has tags "groupId" and "location": "groupId" is set from 1 to 10; "location" is set to "beijing" or "shanghai".

It takes about several minutes to execute this command. Once finished, 100 million rows of records will be inserted.

In the TDengine client, enter sql query commands and then experience our 10x faster query speed.

  • query total rows of records:
taos> select count(*) from test.meters;
  • query average, max and min of the total 100 million records:
taos> select avg(current), max(voltage), min(phase) from test.meters;
  • query the number of records where location="beijing":
taos> select count(*) from test.meters where location="beijing";
  • query the average, max and min of total records where groupId=10:
taos> select avg(current), max(voltage), min(phase) from test.meters where groupId=10;
  • query the average, max, min from table d10 when aggregating over every 10s:
taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s);

Note: you can run command "taosdemo" with many options, like number of tables, rows of records and so on. To know more about these options, you can execute "taosdemo --help" and then take a try using different options.

Major Features

The core functionality of TDengine is the time-series database. To reduce the development and management complexity, and to improve the system efficiency further, TDengine also provides caching, pub/sub messaging system, and stream computing functionalities. It provides a full stack for IoT big data platform. The detailed features are listed below:

  • SQL like query language used to insert or explore data

  • C/C++, Java(JDBC), Python, Go, RESTful, and Node.JS interfaces for development

  • Ad hoc queries/analysis via Python/R/Matlab or TDengine shell

  • Continuous queries to support sliding-window based stream computing

  • Super table to aggregate multiple time-streams efficiently with flexibility

  • Aggregation over a time window on one or multiple time-streams

  • Built-in messaging system to support publisher/subscriber model

  • Built-in cache for each time stream to make latest data available as fast as light speed

  • Transparent handling of historical data and real-time data

  • Integrating with Telegraf, Grafana and other tools seamlessly

  • A set of tools or configuration to manage TDengine

For enterprise edition, TDengine provides more advanced features below:

  • Linear scalability to deliver higher capacity/throughput

  • High availability to guarantee the carrier-grade service

  • Built-in replication between nodes which may span multiple geographical sites

  • Multi-tier storage to make historical data management simpler and cost-effective

  • Web-based management tools and other tools to make maintenance simpler

TDengine is specially designed and optimized for time-series data processing in IoT, connected cars, Industrial IoT, IT infrastructure and application monitoring, and other scenarios. Compared with other solutions, it is 10x faster on insert/query speed. With a single-core machine, over 20K requestes can be processed, millions data points can be ingested, and over 10 million data points can be retrieved in a second. Via column-based storage and tuned compression algorithm for different data types, less than 1/10 storage space is required.

Explore More on TDengine

Please read through the whole documentation to learn more about TDengine.