XSelect a record to create:
Setting Up Your Own Arduino IoT Cloud Server
Published on 11/14/2016 | Technology
Some of the benefits of using an online server and operating it as a proxy for routing messages between users and the devices are:
- Enables users on one network to control devices on another network. For example, a device connected to a home network can be controlled via a Smartphone connected to the cellular network.
- Devices operate as network (TCP/IP) clients, thus no router port forwarding or other tricks are required for gaining access to the devices via the online server.
- Devices acting as network clients operate in stealth mode, thus greatly improving the security of the devices. We will get more into security later.
- Small devices typically do not have the resources for providing a direct web interface. The online server manages all the heavy lifting of providing a web interface for the devices, thus greatly minimizing the code complexity in the devices.
Virtual Private Server
Setting up your own VPS may sound complicated and expensive, but the reality is that setting up a VPS is very easy and the cost can be minimal. It is possible to find VPS services as low as $8 a year. My favorite site for shopping for a budget VPS is lowendbox.com and one of my favorite VPS providers is securedragon, where you can get a three-month lease for less than $6 and a yearly lease for $12.
A limitation with a budget VPS is the amount of memory available. The budget VPS we are using in this article has only 64Mbyte of memory, thus limiting the selection of IoT server solutions that can be used. The IoT solution we will use in this article is an application server framework that includes an IoT protocol, a web server, a server side scripting language, and a database in one unit. This software package can easily run on a budget VPS, and in my test environment, I was able to connect 10,000 devices to the online server. I performed the test by using a number of additional Virtual Private Servers, where I ran a number of simulated devices.
A budget VPS will be running Linux. If you have never used Linux, you may think that this is not for you; however, nothing can be further from the truth. An online VPS is the best starting point for anyone new to learning command line Linux because no matter what you do with the VPS, an easy to use web based VPS control interface will let you restore the VPS to its original configuration by a button click. For this reason, playing around with an online VPS is a great way to learn command line Linux. If you get your Linux VPS into a state where you are unable to recover it, log into the VPS web control panel and click the re-install button. A fresh Linux VPS will then be available in one to two minutes, and you can start over.
Remote Login via SSH
An online VPS enables you to remotely login by using SSH (Secure Shell). If your own computer is running Windows, download the SSH client Putty, and start the executable from any directory. Mac and Windows computers typically include a command line SSH client, thus you can simply type ssh in a command line on Linux and Mac.
When you sign up for a VPS service, such as the budget securedragon VPS (O64), you will receive an email with instructions for how to remotely log into your VPS by using SSH. The instructions include the IP address of your new VPS and the root (admin) password. The following figure shows how to enter the IP address in Putty and how to login as user root in the command line window.
Installing the IoT Server
Before installing the server software, I recommend re-installing the Linux operating system by using the VPS control panel if you have made any modifications to the Linux operating system running on the VPS.
You can find the original article here.