Can openLuup Serve from Standard Ports?

Hi again @akbooer. Here’s another question. Can I run openLuup on HTTP port 80?

Here’s the thing. After you enlightened me to Data Historian on openLuup I had to open my openLuup:3480 instance to the Internet (noooo…) so Grafana could read in the variables data.

Actually it worked great. I want to set up authentication but that will need to be done over TLS.

I have an ingress controller on my cluster that will automagically create a TLS endpoint for me but the server it is proxying to needs to be on port 80. Or at least I haven’t figured out how to make it work with any other port.

I found this in http.lua

PORT = tostring(config.Port or 3480)

and I manually changed the PORT to 80, and it seems to work ok. But am I shooting myself in the foot somehow by doing this? Assuming this is possible (and smart) to do, is there a place in the config where I can override the default? Short of modifying code?


Oh, interesting one!

My first question would actually be why are you bothering with the web version of Grafana? It’s clear that you have the skills to run this locally, probably on the same virtual machine on which you run openLuup? This is what I do on a Beaglebone Black for my ‘production’ system.

Although it’s not obvious, you can set the HTTP server port in the Lua Startup code:

luup.attr_set ("openLuup.HTTP.Port", "80")

which should have the same effect as what you have done. However, there are three caveats just at the moment:

  • I note that since you mention the http.lua file, so I can tell that you’re not running the latest development version (which is 19.9.14)
  • In the latest version that module has been split into server.lua and client.lua, and I note to my shame that for expedience, I hard-coded “3480” into the client module. I will change this.
  • You are almost definitely going to break a number of plugins which rather assume that 3480 is the port in question. But they may not be ones that you are using.

I built in this flexibility to allow running of multiple openLuup instances on the same machine during development, but TBH, have not found the need to do that recently.

Unless you really need to do otherwise, I’d encourage the use of your own local install of Grafana. There are pre-built images which make this easy (not, it seems, that you need ‘easy’.)


LOL. Well, it’s not because I’m lazy. But I was able to get something up and working well, free, and quick. Grafana wasn’t on my list but at some point I can certainly try some of those images. Your points are well taken.

About the same time I was trying to figure out how to get my ingress controller to recognize openLuup:3480 generally, with little luck. When I switched it to port 80 it got picked up right away.

Thanks for the info. It’s very helpful. --dk

Happy to report all my plugins are working fine. And I’ll certainly keep your caveats in mind but this thing is working great. Now I’ve got https://openLuup/ vs http://openLuup:3480/ sweet. I’m going to tap on you again in a new topic :slight_smile:

1 Like

Fixed in latest development version 19.10.14

I upgraded to 19.10.14 and everything is still working well on port 80. I also changed my build to always install the latest from development.

There was one new error message that popped up on the Alt UI.

10/14/2019, 11:41:47 AM	#19:Mqtt Triggered MultiSwitch:[string "I_MSwitch.xml"]:167: bad argument #1 to 'lines' (/etc/cmh-ludl/D_MSwitch.json: No such file or directory)

But this is clearly a plugin problem with a hard coded path. I got rid of the error.

Cool. Thanks

OK, that’s great. Thanks for raising the issue once again. It’s inspired me to use the feature more in testing.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules