ManagedCloud Servers

High performance handled and monitored by us 24/7/365. A complete solution to provide you with our in house expertise 24/7 tailored to your specific needs. We'll setup a bespoke server for your site using the latest tehnologies so you can get the most out of your hardware and get your website loading quickly and reliably. Find out more..

cPanelCloud Servers

Recommended - High performance cloud servers with no technical knowledge required. If you're hosting multiple websites already and you're looking to consolidate, or if you're looking to isolate yourself from the shared hosting environment but you don't have the time or knoweldge to manage a server, then the Managed cPanel Servers are for you. Find out more..

UnmanagedCloud Servers

Our unmanaged range gives you complete control at rock bottom prices and our cloud platform boasts super fast multipath 40Gb/s network, the latest Intel Xeon V3 CPUs and enterprise grade redundant SSDs. If you're a sysadmin look no further, we offer some of the best specification to price ratio servers available. Find out more..

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans

How to Install InfluxDB on Ubuntu 14.04

Introduction to InfluxDB

InfluxDB is an open source time series database with high availability and high performance features included. It's written in the Golang programming language. Distributed with no dependencies but still highly extensible.

Several key features of InfluxDB:

  • Simple to install with no dependencies.
  • Specific purpose for time series data. no special schema design or custom app logic required to use InfluxDB.
  • Support for hundreds of thousands of writes per seconds.
  • Native HTTP API, no need to manage server side code.
  • Time-centric functions and easy to use SQL-like query language.
  • Data tagging for flexible querying.
  • Every data point indexed as it comes in and immediately available in less than 100ms

We can use InfluxDB to manage any time series data. In server or data center environment, we can use influxDB to store system and application performance data. We can also collect and store data center temperature data in InfluxDB.

You can even use InfluxDB outside IT related usage for example you want to store time series market price of a commodity. You can also use InfluxDB to store metrics for your Internet Of Things (IoT) projects.

In this tutorial we'll learn how-to install and configure InfluxDB 0.11 on Ubuntu Server 14.04 Trusty Tahr.

Networking Requirements

By default, InfluxDB uses the following ports: * TCP port 8083 is used by InfluxDB Admin Panel * TCP port 8086 is used for client server communication over HTTP API.

If you use firewall make sure that you allow both port above as needed.

Install InfluxDB on Ubuntu 14.04

Before we install InfluxDB let's update the base system to the latest release.

    $ sudo apt-get update
    $ sudo apt-get -y upgrade

Add the influxdata repository key so apt can verify packages that will be installed.

    $ curl -sL | sudo apt-key add -

Create repository file for influxdb.

    $ echo "deb trusty stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Update apt metadata by running command below.

    $ sudo apt-get update

Now we are ready to install InfluxDB.

    $ sudo apt-get -y install influxdb

InfluxDB is not running after installation. We will disable influxDB reporting feature first before starting InfluxDB.

Disable Reporting

By default, InfluxDB will report anonymous data to The data sent includes a raft id (random 8 bytes), OS, architecture and version. The IP address of servers reporting is not tracked. This reporting feature being used by Influxdata team to track number of instances running and the versions. In this section we'll disable this feature so our server will not report to Find line below:

    reporting-disabled = false 

replace false value to ```true:

    reporting-disabled = true

Start InfluxDB for the first time -

    $ sudo service influxdb start
    Starting the process influxdb [ OK ]
    influxdb process was started [ OK ]

Let's check whether InfluxDB already listen on its ports -

    $ sudo netstat -naptu | grep LISTEN | grep influxd
    tcp6       0      0 :::8083                 :::*                    LISTEN      2741/influxd    
    tcp6       0      0 :::8086                 :::*                    LISTEN      2741/influxd    
    tcp6       0      0 :::8088                 :::*                    LISTEN      2741/influxd    

InfluxDB Admin Panel

InfluxDB comes with web based admin panel. We can access the admin panel by pointing our browser to http://:8083.

We can access connection settings by clicing gear icon on top right of the page.

From the web based admin panel, you can also do query by entering your query on Query field like shown above.

You can cheat by using Query Templates drop down below Query field.

This query template is really useful for learning operations on InfluxDB.

Connecting to a DB Using Influx CLI

InfluxDB also comes with CLI application named influx. You can connect to InfluxDB using influx by running it wihout options. By default it will connect to local influxdb installation on default port 8086.

    $ influx
    Visit to register for updates, InfluxDB server management, and monitoring.
    Connected to http://localhost:8086 version 0.13.0
    InfluxDB shell version: 0.13.0

Creating an Admin User

InfluxDB comes with no users at all. We need to create users including admin user.

In this tutorial we will use web base admin panel to do queries instead of using influx CLI tool, but all commands can be used from both admin panel and CLI.

Let's check whether InfluxDB already has users or not using command SHOW USERS.

As we can see above there are no users listed on the page.

Now let's create an admin user with the name admin using command below:


We need to press enter for the query to be executed. Don't forget to change the verysecret password above with your own random password.

We should see a Success! (no result to display) message if our command is correct and executed properly.

Now let's see the list of users again using command SHOW USERS. The new admin user is listed with admin listed as true.

Creating a Normal User

Now let's create a normal / non-admin user named hostpresto using command below:

    CREATE USER "hostpresto" WITH PASSWORD 'newsecret'

Let's check again list of users using command SHOW USERS

The key to create an admin user is by adding GRANT ALL PRIVILEGES.

Using a Query URL

As we see above when connecting to InfluxDB using the influx CLI tool, it's connected to http://localhost:8086. InfluxDB client can use HTTP REST to do queries.

From admin panel we can use the Generate Query URL button to generate query URL. For example the SHOW USERS command will be translated to as query URL.

Let's do the query using the curl command. Don't forget to put the query URL inside quotes.

    $ curl ""

The result from the query is that one line JSON file that could not be read easily. We can append &pretty=true at the end of the query URL so we get pretty JSON output.

    $ curl ""
        "results": [
                "series": [
                        "columns": [
                        "values": [

The pretty option is useful when we are debugging output from InfluxDB query.

Enable Authentication

We already have two users, one admin and one normal user, but we'll still able to access InfluxDB both via web based admin panel and cli without authentication.

The reason for this is because authentication is disabled by default and not enabled automatically when we have users. We can enable authentication from InfluxDB configuration file.

Open /etc/influxdb/influxdb.conf file (you might need sudo to open the file).

Find [http] section. Replace auth-enabled from false

      auth-enabled = false

to true

      auth-enabled = true

Restart InfluxDB server:

    $ sudo service influxdb restart
    influxdb process was stopped [ OK ]
    Starting the process influxdb [ OK ]
    influxdb process was started [ OK ]

Authenticaton from Web Admin Panel

Now when we are connecting from admin panel, we'll get error message:

We need to input the username and password and click Save. Unfortunately the web admin panel UI still show the password and doesn't hide it :)

After setting up credential you should be able to do queries from admin panel as usual.

Authentication from HTTP API

After enabling authentication, we will also get error when querying InfluxDB directly via HTTP API if we don't provide credentials.

    $ curl ""
    {"error":"unable to parse Basic Auth credentials"}

As we can see above, InfluxDB sent an error reply that it was unable to parse basic auth credentials.

There are two methods that we can use to pass credentials when we are accessing directly via HTTP API.

  • Authenticate with Basic Authentication as described in RFC 2617, Section 2 - this is the preferred method for providing user credentials. For example:
    $ curl -G -u admin:verysecret --data-urlencode "q=SHOW USERS"
  • Authenticate by providing query parameters in the URL. Set u as the username and p as the password. For example:
    curl -G http://localhost:8086/query --data-urlencode "u=admin" --data-urlencode "p=verysecret" --data-urlencode "q=SHOW USERS"

Authentication from CLI

When authentication is enabled, and we do not supply correct username and password we wil get error message when sending a query to InfluxDB.

    $ influx
    Visit to register for updates, InfluxDB server management, and monitoring.
    Connected to http://localhost:8086 version 0.13.0
    InfluxDB shell version: 0.13.0
    ERR: unable to parse Basic Auth credentials
    Warning: It is possible this error is due to not setting a database.
    Please set a database with the command "use ".

There are two options to authenticate via the CLI.

  • Authenticate with auth after starting the CLI.
    $ influx
    Visit to register for updates, InfluxDB server management, and monitoring.
    Connected to http://localhost:8086 version 0.13.0
    InfluxDB shell version: 0.13.0
    > auth admin verysecret
    user    admin
    admin   true
    hostpresto  false
  • Authenticate by using username and password flags when starting the CLI.
    $ influx -username admin -password verysecret

Creating a Database

We can use this command to create database:


For example, we'll create a new database named metrics:

Now let's see list of databases:

The new database that we just created is already listed there.

Inserting Data

InfluxDB is a schemaless database. We don't have to define the schema first before input the data.

However we cannot mix data types, for example if we already put data for cpu as float, we cannot input another data for cpu as boolean.

Unfortunately the web based admin panel only supports these commands: SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET, KILL.

To insert data we can use either influx CLI tool or using curl to send data directly via HTTP API.

Before we insert data we need to specify which database to be used. Since we already have metrics database we created earlier, we will use that database.

    > USE metrics
    Using database metrics
    > INSERT cpu,host=serverA,region=us_west value=0.50

If you need large amount of data for testing InfluxDB, you can try data sample from InfluxDB.

Querying Data

Now we have data inside our metrics database, let's query the data from database metrics.

    > SELECT * from cpu
    name: cpu
    time      host  region  value
    1466385059333872686 serverA us_west 0.5

Enable https Endpoint

If you want to add additional security for your data when it's being transmitted from the client to InfluxDB server you can enable https endpoint. You will need :

  1. A valid SSL certificate, you can use a certificate signed by known Certificate Authority (CA) or self-signed. If you use self-signed SSL you can either make sure all machine connected to the InfluxDB server have the root certificate that sign the certificate used on InfluxDB or use -unsafeSsl when connecting via CLI so the client will not try to verify the certificate.

  2. A domain name for influxDB server that is resolvable from all clients that need to connect to influxDB server.

You can enable https only on the HTTP API endpoint or both HTTP API endpoint and web based admin panel. If you enable https on admin panel you have to also enable https on HTTP API endpoint.

To enable https on both HTTP API and admin panel, you can open /etc/influxdb/influxdb.conf

Find the line :

      https-enabled = false

Replace with

      https-enabled = true

and find the [http] section

      https-enabled = false

replace with

      https-enabled = true

You can copy your https certificate to /etc/ssl/influxdb.pem. This certificate should contain both the certificate and private key.

After setting up https you will need to restart the InfluxDB server by running command below:

    $ sudo service influxdb restart

Stats and Diagnostics

There are two commands that can be helpful for administering InfluxDB. The first one is diagnostics that can show us the InfluxDB version in detail. We can run command SHOW DIAGNOSTICS

We can also show current stats of InfluxDB by running the command SHOW STATS


In this tutorial we've learned how to install InfluxDB on Ubuntu 14.04 (Trusty Tahr), disable data reporting, change default admin credentials and do basic things with the database like create database, insert data to the database and query the database. Now you're ready to use InfluxDB whenever you need to store time series data.

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans