Use openHAB on an external server


is it possible to install and host openhab on a external server and use a connection like VPN to connect the server to the (router of the) home network with the smart devices?

As long as all your devices can be controlled via lan connection it should be possible. But it would probably be much easier to just run OH on a Rpi locally, and set up a connection to control that from outside instead.

What about WiFi devices?
For example a smart switch is in connection with a FritzBox router via WiFi. Is it then possbile to run OH on a rented linux server and establish a connection to the FritzBox?

Yes, wifi also. When you connect via VPN, your server is basically on the same network as ypur devices, so anything connected to your router should be accessible.

1 Like

But Why?

A complete ODroid C2 64 bit 16GB kit is less than €110, or a Raspberry Pi is <€50

How much would you pay in a year for the rental of a Linux server?

VPN / MyFritz / SSH remote connection to your own hardware via your FritzBox is surely a more secure solution?
Because then you’re only exposing a secured connection to one device, rather than streaming every last bit of data from your home automation systems.
(I use MyFritz or SSH , when not using the cloud connection, IE I want to edit big HabPanel configurations of >2000 lines, or stream CCTV content)

Its more of like a project for my company. I know that a Pi would be more useful, but the project is about hosting the OH platform and getting data of IoT-devices from other company locations.

Oh I see… :slight_smile:

Please consider what @pacive suggested.

As a use case, you’d get a much more powerful system by putting ODroid C2 or Raspberry Pi units in each client location (with or without a local UI), then get a central openHAB2 instance to poll each device for particular status’.

(Or each local device can push updates to the central system)

The openHAB2 Rest API is extremely powerful :smile:

That way, you’re only transfering essential data between sites, rather than endless pointless packets.

Just food for thought :slight_smile:

That sounds very reasonable!
Im quite new to OH, so I will have to figure out how to send device statuses from the local Pis to the central hab instance.
Thanks for your thoughts!

1 Like

I’m sure you’re not doing anything that hasn’t been tried / done before :slight_smile:

Try taking a look at these forum topics I’ve just found

And never forget that you ‘could’ run NodeRed alongside your central openHAB2 instance, as NodeRed can easily pull / push events (via the Rest API) between multiple openHAB2 instances, simply by adding multiple openHAB2 bridges / controllers.

Feel free to ask, I’m happy to create a NodeRed flow to demonstrate :slight_smile:

Thanks a lot! I think I’ll try to get something to work in the next few days, but I will definetly come back and ask because I am sure I’ll need some help with NodeRed :smiley:

1 Like

You definitely won’t need “lots of help”, it’s remarkably easy. :smile:

For info: this is not unreasonable, my openHAB setup on a commercial site runs on a server with only wired ethernet. All the end devices are TCP/IP, in reality mostly via Modbus gateways working a local cluster of simple controls/sensors.

When I wrote this i thought of lan in a broader sense, as any Local Area Network, which can be both wired and wireless, but I can understand the confusion in terminology :slight_smile: