On-Premise

Subscribing and Deploying On-premise Instances

Thinger.io IoT instances can be deployed on-premise over any kind of cloud or local host, that way the user will have full control over the hole infrastructure. This section describes how to obtain an On-premise license and how to deploy a private Thinger.io On-premise instance within minutes. Just follow the next steps:

1. Select the right license

On-premise instances can be deployed with different licenses, depending on the project requirements, mainly in terms of platform features like rebrands, custom domains, additional support, plugins, etc. To obtain your license code, contact Thinger.io sales team using this link, we will help you to select the best option according to your project requirements.
MEDIUM
LARGE
UNLIMITED
Devices/Assets
Unlimited
Unlimited
Unlimited
Performance
Unlimited
Unlimited
Unlimited
Plugins
3
5
Unlimited
Rebranding
1
5
Unlimited
Custom Domain/TLS
1
5
Unlimited
Developer accounts
5
Unlimited
Guest accounts
Unlimited
Unlimited
Unlimited
Extended support
Available
HA Cluster
Available
Recommended use
Business B2B or B2B2C IoT product
Consultancies with multiple projects
Companies without limits

2. Checkout and payment options

After contacting our team you will receive an email with the link to set up the payment method using our subscription management tool that is always available on this link. in order to make modifications to the subscription or the payment method.

4. On-premise install

Once you have received the license token by email, it is possible to easily deploy Thinger.io on your host with a few commands. Before starting this guide, please, install Docker Engine and Docker Compose in your computer or server.
Install Docker Engine and Docker Compose before following this guide.
This guide assumes you are installing Thinger.io on a fresh Linux host with Docker support, as it will run databases like MongoDB and InfluxDB, and will start listening on several ports: 80, 443, 25200, 25202, 1883, and8883. It will also create a root directory in /data where all the Thinger.io data and database information will be stored.
To start, just launch the following command that will download the docker-compose file associated to your license:
1
curl https://subscriptions.thinger.io/v1/docker-compose.yml?token={LICENSE} -o docker-compose.yml
Copied!
Never share or publish your LICENSE key as it may consist on a security risk for your host. License keys are issued per host, so do not reuse them between hosts.
Ensure that your docker-compose file has been downloaded correctly:
1
cat docker-compose.yml
Copied!
It should display something like the following:
docker-compose.yml
1
version: '3.7'
2
services:
3
4
# Thinger.io server
5
thinger:
6
image: thinger/server:latest
7
container_name: thinger
8
user: root
9
volumes:
10
# for controlling docker engine
11
- /var/run/docker.sock:/var/run/docker.sock
12
# folder for storing thinger generated data (maxmind, certificates, plugins...)
13
- /data/thinger:/data
14
entrypoint:
15
- thinger
16
- -v1
17
- --runpath=/data
18
environment:
19
- TOKEN=ce84fc9f089227a4828f66c470d9319533611ee37adc41676ba1ef5a92bd1dca0f2258962d19627010525e437c2cbf48a
20
network_mode: host
21
restart: always
22
logging:
23
driver: "json-file"
24
options:
25
max-size: "200k"
26
max-file: "10"
27
healthcheck:
28
test: ["CMD", "curl", "-f", "http://localhost/v1/server/healthcheck"]
29
interval: 1m
30
timeout: 5s
31
retries: 3
32
start_period: 2m
33
34
# mongodb
35
mongodb:
36
image: mongo:4
37
container_name: "mongodb"
38
environment:
39
- MONGO_DATA_DIR=/data/db
40
- MONGO_LOG_DIR=/dev/null
41
- MONGODB_USER=thinger
42
- MONGODB_DATABASE=thinger
43
- MONGODB_PASS=PiIcgpUcl0r5xUb/cXP8WS5G
44
volumes:
45
- /data/mongodb:/data/db
46
ports:
47
- 127.0.0.1:27017:27017
48
command: mongod --quiet
49
restart: always
50
logging:
51
driver: "json-file"
52
options:
53
max-size: "200k"
54
max-file: "10"
55
56
# influxdb
57
influxdb:
58
image: influxdb:1.7
59
container_name: influxdb
60
ports:
61
# The API for InfluxDB is served on port 8086
62
- 127.0.0.1:8086:8086
63
- 127.0.0.1:8082:8082
64
# UDP Port
65
- 127.0.0.1:8089:8089/udp
66
volumes:
67
# Data & Config Volumes
68
- /data/influxdb/data:/var/lib/influxdb
69
- /data/influxdb/config:/etc/influxdb/
70
environment:
71
- INFLUXDB_HTTP_AUTH_ENABLED=true
72
- INFLUXDB_ADMIN_USER=thinger
73
- INFLUXDB_ADMIN_PASSWORD=PiIcgpUcl0r5xUb/cXP8WS5G
74
- INFLUXDB_REPORTING_DISABLED=true
75
restart: always
76
logging:
77
driver: "json-file"
78
options:
79
max-size: "200k"
80
max-file: "10"
81
82
# ouroboros
83
ouroboros:
84
container_name: ouroboros
85
hostname: ouroboros
86
image: pyouroboros/ouroboros
87
environment:
88
- CLEANUP=true
89
- INTERVAL=600
90
- LOG_LEVEL=info
91
- SELF_UPDATE=true
92
- MONITOR=thinger
93
restart: always
94
volumes:
95
- /var/run/docker.sock:/var/run/docker.sock
96
logging:
97
driver: "json-file"
98
options:
99
max-size: "200k"
100
max-file: "10"
Copied!
Then, if everything seems to be correct, just run the following command to start all the processes defined in docker-compose.yml and run them in dettached mode with -d option:
1
docker-compose up -d
Copied!
If everything goes fine, it should show something like the following information (it may take several minutes to complete depending on your network connection):
1
[email protected]:~# docker-compose up -d
2
Creating network "root_default" with the default driver
3
Pulling thinger (thinger/server:latest)...
4
latest: Pulling from thinger/server
5
da6fc00e4d0b: Pull complete
6
c3c0be9d84b3: Pull complete
7
9c1dda927878: Pull complete
8
4b8880231fa0: Pull complete
9
ec7cf4588dfa: Pull complete
10
f03c87626902: Pull complete
11
2c927b4e662e: Pull complete
12
0c0ed4ba2578: Pull complete
13
db577de2586f: Pull complete
14
Digest: sha256:156bb95f155ce9d3706c6a2f17d2a6750cf62e91777a610625910c7ebf780894
15
Status: Downloaded newer image for thinger/server:latest
16
Pulling mongodb (mongo:4)...
17
4: Pulling from library/mongo
18
2746a4a261c9: Pull complete
19
4c1d20cdee96: Pull complete
20
0d3160e1d0de: Pull complete
21
c8e37668deea: Pull complete
22
fc3987a82b4c: Pull complete
23
c75f139e0836: Pull complete
24
4acc9c8680b4: Pull complete
25
fb02df30d947: Pull complete
26
ae725ef3d2ce: Pull complete
27
e30f54ed6b43: Pull complete
28
bca9e535ddb8: Pull complete
29
9c3edad81b2a: Pull complete
30
6dbcf78fe5ae: Pull complete
31
Digest: sha256:7a1406bfc05547b33a3b7b112eda6346f42ea93ee06b74d30c4c47dfeca0d5f2
32
Status: Downloaded newer image for mongo:4
33
Pulling influxdb (influxdb:1.7)...
34
1.7: Pulling from library/influxdb
35
146bd6a88618: Pull complete
36
9935d0c62ace: Pull complete
37
db0efb86e806: Pull complete
38
5dd32e36b488: Pull complete
39
750868d0ab2b: Pull complete
40
f4d98645d729: Pull complete
41
c8bd5f153b8d: Pull complete
42
f458001f5cb1: Pull complete
43
Digest: sha256:eae897c8ebf85ac3e2bdff8ba053d40a3df7598c41f4b63d42faf2603e2eef74
44
Status: Downloaded newer image for influxdb:1.7
45
Pulling ouroboros (pyouroboros/ouroboros:)...
46
latest: Pulling from pyouroboros/ouroboros
47
8e402f1a9c57: Pull complete
48
cda9ba2397ef: Pull complete
49
d7153c29df0e: Pull complete
50
cbbf0d0a5ee3: Pull complete
51
c142a4eca653: Pull complete
52
829de03e02e7: Pull complete
53
499113b78598: Pull complete
54
7a2dcb0f00c1: Pull complete
55
2cd0c4b889bd: Pull complete
56
01c721e4643e: Pull complete
57
Digest: sha256:cfa29916459fb8c578fce084ce839a0d3bee478b83a21b6b1d10c6b78bc4a372
58
Status: Downloaded newer image for pyouroboros/ouroboros:latest
59
Creating mongodb ... done
60
Creating ouroboros ... done
61
Creating influxdb ... done
62
Creating thinger ... done
Copied!
Then, the Thinger.io instance and the associated databases will be running:
1
[email protected]:~# docker ps
2
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3
c7075dd45e5d mongo:4 "docker-entrypoint.s…" 43 minutes ago Up 43 minutes 127.0.0.1:27017->27017/tcp mongodb
4
ff9d6178773b influxdb:1.7 "/entrypoint.sh infl…" 43 minutes ago Up 43 minutes 127.0.0.1:8082->8082/tcp, 127.0.0.1:8086->8086/tcp, 127.0.0.1:8089->8089/udp influxdb
5
8ee8b4c924dd thinger/server:latest "thinger -v1 --runpa…" 47 minutes ago Up 43 minutes (healthy) thinger
6
eee1b9479368 pyouroboros/ouroboros "ouroboros" 47 minutes ago Up 47 minutes ouroboros
Copied!
Then, you can access your on-premise instance by pointing your browser to your host IP address.
The latest versions of Ubuntu come with UFW (the default firewall configuration tool for Ubuntu). It may be blocking Thinger.io ports by default. Configure it properly or disable it (not recommended) with sudo ufw disable

Steps After On-premise Deployment

To start working with your on-premise installation, just follow the next steps:

First Login

  1. 1.
    Access the server by writing the local IP address of your host, for example: https://192.168.1.100. This step should show the Thinger.io login screen after accepting to use a self-signed certificate (the browser will ask you about a security issue with the certificate).
  2. 2.
    Note that this server has never been accessed before, and it is a completely isolated instance so there is not any user account created. Then, it is necessary to click on Create an accountbutton, and fill the form to create a new user profile using the Admin Email address provided in the license configuration (any other address will not be authorized to sign up).
  3. 3.
    After creating the new account it is possible to access the new server. It is not necessary to confirm the mail address.

Device Connection

When working with a private Thinger.io instance, it is necessary to point your devices to the newly created server. If you are using the Arduino or Linux client libraries, i.e., for Arduino, ESP8266, ESP32, Raspberry Pi, etc., you should add a definition on top of your code to point to your host. So, modify your sketch like this:
1
#define THINGER_SERVER "192.168.1.100"
2
3
// the rest of your code goes here
Copied!
If this host definition is not provided, your devices will try to connect with the public instance.