Installing The Things Stack from the documentation is a little bit more complicated than the usual process 1
we've used so far. 2
Indeed, when we wanted to launch a new service, we've used Docker with a predefined configuration 3
file called docker-compose.yml. 4
Then we just had to use the command docker-compose up. 5
That was simple and easy. 6
The problem is that by default, The Things Stack comes up with a secure connection to access the console. 7
What is a secure connection? 8
It's exactly the same one we use when we connect to any website on the internet. 9
A few years ago, we used to navigate on the internet using the HTTP protocol. 10
But actually nowadays we only connect to website with HTTPS protocol. 11
The "S" in HTTPS stands for Secure, so that's exactly this type of connection that we need to set up. 12
But for that we need a domain name and we need to specify it to The Things Stack configuration file. 13
To understand why HTTPS is useful, then you can check the video called "How to set up a secure connection 14
with certificate" in the "HOW TO" section at the beginning of this course. 15
Okay, so if we want to set up The Things Stack, then we need a domain name. 16
Without it, it will not be possible to set up a proper HTTPS connection to the console. 17
Once we have this domain name, then we can start looking at the documentation to install The Things 18
Stack. 19
There are many steps to follow. 20
It's not very hard, but it's not easy either. 21
Okay, but don't worry because I don't want to dive into the documentation and explain step by step 22
the installation process. 23
It's what we should do for a commercial deployment. 24
But there is a good chance that my demonstration will be outdated in a few months if I do it this way. 25
So, there is another option. 26
It's not as secure because we'll provide our own certificate to satisfy the HTTPS protocol, but at 27
least it will work with many hardware. 28
So whether you use your own PC, a Raspberry Pi, a remote server with or without a personal domain 29
name, it will work. 30
And what is nice with this solution is that we'll be able to use our favorite command to install the 31
LoRaWAN Server: "docker-compose up". 32
So, what is this solution? 33
This is the one proposed by Balena, an expert company for IoT deployment solution. 34
They provide a Docker installation package on their GitHub repository. 35
We could even deploy this solution in one click on many remote hardware at the same time if we use the 36
Balena Cloud application. 37
But in our case, we'll just follow the installation process on our own architecture. 38
In this video, that's the only method I'm going to show you because I want to remain consistent with 39
the tool we've used since the beginning of this lecture. 40
You will see that the overall installation process is really easy. 41
So for this demonstration, I'm going to use a public server that I've rented from a cloud provider. 42
It's a simple machine with very few capabilities, two gigabyte of RAM and only one virtual core. 43
But it will be more than enough for our demonstration. 44
If you've chosen to set up your server on another platform localhost, Raspberry Pi or whatever. 45
No problem. 46
The demonstration is exactly the same, so no worries. On my server, 47
I've installed a Basic Linux Debian Operating System. 48
It's the same one that I've used for ChirpStack installation and the only thing I've installed is as 49
usual, Docker and docker-compose. 50
In addition to this private server, I also have a domain name. 51
So if we want, instead of using the server IP address we can use the URL "tts.univ lorawan.fr". 52
It's not compulsory, but I reckon it's clearer and more convenient. 53
And of course you can use your own domain name. 54
If you only have an IP address available then no worries, you can obviously use it. 55
So for this demonstration I connect to my linux machine using SSH. 56
If you don't remember how to connect a remote machine using SSH, then please see the specific video 57
in the "HOW TO" section at the beginning of this course. 58
Okay. 59
Now the installation process is composed of three simple steps. 60
First, we need to download the content of the repository with the container configuration file called 61
docker-compose.yml. 62
This step is easy. 63
git clone the GitHub repository. 64
Then we enter the downloaded folder. 65
Right, now that we have all the necessary files, 66
the second step is to apply our specific configuration. 67
There is one specific configuration that we need to provide. 68
It's the IP address or the domain name if we have one. 69
So we need to edit the docker-compose.yml file and add the corresponding environment variable 70
TTS_DOMAIN. 71
We fill in the IP address of our server. 72
In our case it's tts.univ-lorawan.fr 73
Apart from that there is nothing to do because the default configuration works out of the box. 74
Great. 75
So the third step is just to launch the installation process. 76
We just need to use the command docker-compose up. 77
I'm just going to add two things in this command. 78
First, the keyword "sudo", because I use in the Linux environment and I need to ask for privileges to 79
execute the "docker-compose" command. 80
And secondly, I'm using the option "-d" because I want to leave The Things Stack running in the background. 81
Okay, let's try that. 82
It takes a few seconds. 83
All containers are downloaded, extracted and created and The Things Stack Server is now ready. 84
It's not more complicated than that. 85
Now we have all services running. 86
We can check them with another command "docker ps" and there we go. 87
Everything is up and running. With The Things Stack, if we want to access the console, then we need to 88
use a web browser with the server URL tts.univ-lorawan.fr 89
But of course I could have used the IP address. 90
Okay, great. 91
And the default login and password is written in the README file. 92
It's admin for the login and changeme for the password. 93
And of course, as the password suggests, we obviously need to change it right away. 94
Okay. 95
But there is something strange coming up from my web client. 96
That's a security alert. 97
Of course, we explained earlier that we've built an HTTPS connection with The Things Stack, but when 98
we built the server, we created our own certificate. 99
So our web client can't authenticate the server. 100
Of course I knew that it would happen, so I can just ask my web client to ignore it because I know 101
that this server is safe. For a proof of concept, 102
this is not a problem to do so. 103
But of course for a real deployment, both Chirpstack and The Things Stack need to be set up with TLS 104
certificates provided by the Certificate Authority. 105
Once we've dealt with this problem, then we finally end up on The Things Stack console. 106
We know this console because we've used it many times already. 107
Starting from here, there is no difference between the Community version of The Things Stack or this 108
version called the Open Source edition. 109
Okay. 110
Now that the installation process is done, let's finish the configuration of our entire private network. 111
We'll complete the usual process to register gateways, applications and end-devices, and that's what we're 112
going to do in the next video.