However, this is really complex. We would first have to build the server locally, then find a host for our server, and finally upload the server online.
Instead of all this, we will use PubNub, where you can simply create an account to control your devices remotely using their libraries, which are based on MQTT.
The first step is to create an account by visiting the following link:
You will arrive on their main page where you can enter your contact details, as shown in the following screenshot:
Then, you will be required to create a new application. I simply named mine Galileo:
You can see that there are many keys here that I blurred...