Server Deployment - Connection Refused

Hi all,

I have followed the documentation to create my own thinger server install based on Ubuntu Server 16.04:

I have also added the line “#define THINGER_SERVER “”” to the very top of my Arduino sketch to point to my local server rather than the cloud one.

I have then visited “” and replaced with my servers local IP address and then gone to the console. However, whenever I try to add a device etc I have the following error:

Ooops! Cannot process your request. Error 0 (connection refused)

I have checked and both Thinger and Mongodb are running on my server. Are there any incoming firewall requirements?



Are able to create a new account from the It might be that connection to db is not working or db is missing I have the same problem.


I tried the same last night. So at least it worked for me if I used “localhost” instead of “”. However, if I tried to connect from another computer on my network, then I got the connection refused as well, even after changing the URL to the actual IP address of the server. I do not know if you need to setup some permissions to be able to access the web server from a different computer.

I was able to (actually had to) create a new account on the local server before I could log, kinda makes sense.

Bottom line for me at least. If I use “localhost” and access the console from the computer where the server is installed, then everything works perfectly. Accessing it from a remote computer on the same LAN does not because of some permission issues.

Maybe a bit of a side question, but can’t you access the URL directly from the console, that would be handy?

Best regards,

Heh, Don’t know what happened exactly but reinstalled and added the emailing stuff to config file and it started working. Is the smtp info mandatory or was it just pure luck? :slight_smile:

I believe it is optional without being 100% sure. At least I did not add the SMTP info yet and everything is working beautifully on localhost :slight_smile:

SMTP is not required for register by default. The server listen by default in all network interfaces ( In order to make it work externally, it is required to check firewalls for ports for 443 (https), 80 (http), 25200 (thinger connection), and 25202 (thinger secure connection). To connect your browser to the server platform, just set locahost in the settings if you are using the server in the same host, or the server ip address if you are accessing from another host.

And, of course, the local deployment requires a new account, as all the data is handled offline in your server! :wink:

Great info, especially with the firewalls and specific ports, I missed that in the Docs guide, will try it out today :slight_smile:

As a note, I checked the ports on my local server using Macs port scan in Network Utility, and it showed that all the ports you mentioned were actually open. Since I kept getting the connection refused message when trying to log in from a remote computer, it most likely had to do with the SSL certificate.

So I tried opening the Error Console in my browser, and it said the following

[Error] Failed to load resource: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “” which could put your confidential information at risk. (token, line 0)

So of course it had to do with the secure https connection :slight_smile: after visiting the server IP one time with https://, and whitelisting the IP, then everything is working perfectly.

Of course the proper solution would be to get a SSL certificate :slight_smile:

I also found out on a clean Ubuntu 16.04, mongodb will not automatically start, so you have to add it manually. If you receive the message “internal server error”, then mongodb is most likely not running. I followed the guide here to make sure it automatically starts when the server restarts

Here it says:

As of publication time, the official Ubuntu 16.04 MongoDB packages have not yet been updated to use the new systemd init system which is enabled by default on Ubuntu 16.04. Running MongoDB using those packages on a clean Ubuntu 16.04 server involves following an additional step to configure MongoDB as a systemd service that will automatically start on boot.

1 Like

All good info thanks as it wasn’t that obvious that I had to create a new user as pointing to my server. After doing this and autostart MongoDB the server is up and running and recording data.

However, I am still massively confused how this local server can now be accessed via the cloud console provided by Or, am I wrong in thinking this and my local server is only available on my local network? I don’t understand how reroutes to my local install.

Any pointers?


Hi, nice you got it working! Maybe it is useful to update the docs for clarifying the MongoDB aspect. Any pull request for that? :slight_smile:

Regarding your question, the cloud console is pointing to your server as you have configured it in settings page. Notice that the cloud console is just a client that interacts with any server instance by using the server REST API. So, provides you the web client that interacts with your server, it does not render anything on the server side, just provide the client pages and scripts. In fact, I have prepared packages (that will be available quite soon) for Windows, Linux and Mac, so you can download and run the console in your local machines…

Not sure if it is clear… This is a “modern” approach that greatly differs from standard web pages, so it can confuse at the beginning.

1 Like

Would be useful to also include a line about creating a new account as it is on the local server. It shouldn’t have caught me out but did :slight_smile:

Thanks for explaining about the REST API and it does now make sense how I am picking up my local machine when on my own network and pointing to However, and it is probably still me not understanding, but should I be able to access my local servers console when away from my network by pointing to I assumed that my server would be collecting all of the data and the cloud console would be able to display it.