Remove Frontail completely from OH 3/4

Hi All,

is there a documentation on how to completely remove frontail and its components and dependencies - in case - from the openhabian system?
Any info is highly appreciated as i cannot find it online nor in the OH docs.

You can remove it from the Optional Components menu in openHABian-config.

But in Menu 21 i can only remove the logs and not the viewer and service itself…

I don’t have access to an openHABian instance at the moment. Show what you mean because there should be nothing in that menu that doesn’t anything but adding/removing third party software, like Frontail. It doesn’t touch the actual logs.

Hi, please see below from OH 4 M1

Menu 21

Remove log from viewer:

No menu to remive frontail completely.

If you scroll down? The scroll bar on the right indicates there are more entries in the list.

If it’s not there it might be under menu option 30.

In a pinch from the command line you can run sudo apt purge frontail, however, I’m not sure that removes it from the list of other UIs from MainUI. It would be better to remove it through openhabian-config.

Unfortunately not. Also menu 30 does not have any related entry to remove frontail.

:person_shrugging: I guess the maintainers of openHABian consider Frontail to be a critical component. I know it’s also used during that first start up to get to the initialization logs too, not just in OH. You’ll have to remove it manually. To remove it from MainUI, I think there is a file under $OH_USERDATA/config/org/openhab that lists the other UIs where you can remove it too.

No we don’t. To be honest, I don’t like it myself.
There’s no menu option to remove it but to be frank I don’t see any reason for doing that.
You can use systemctl disable --now frontail.service .

Ok maybe i should give a bit of background why i want to remove frontail:
I often see issues with frontail not working because of wrong formatted output files or wrong node versions etc. So my intention was to completely remove it for a clean reinstallation and not waste time time on checking if a template has errors or the versions are not compatible.

Why not install openHABian from scratch and import your old config.

But doesn’t openHABian add a line to the config so it shows up in MainUI (I thought so)? If someone wants to remove Frontail should they have to remove it there manually? It seems like if openHABian does something, openhabian-config should offer a way to undo it too, unless it’s a core requirement that shouldn’t be undone.

But doesn’t openHABian add a line to the config so it shows up in MainUI (I thought so)?

No it runs on a separate port.

It seems like if openHABian does something, openhabian-config should offer a way to undo it too

Well for new features that’s what we do but frontail’s been there ever before and I won’t be investing any more time.

Doesn’t is show up here?

I don’t think anyone is asking you to implement this. But if a PR were provided, would you reject it?

Oh, right. Haven’t used that in a while.

No of course not. But messing with nodejs modules has been a hassle to get right.

On my system it looks like frontail is linked into the modules directory:

ls -ld /lib/node_modules/frontail
lrwxrwxrwx 1 root root 21 Aug 10  2021 /lib/node_modules/frontail -> ../../../opt/frontail

What I would do if I would like to remove frontail would be:

  • remove / delete the link to the /opt/frontail directory
  • rename the /opt/frontail directory ( can be deleted later if you really would like to get rid off it )
  • remove three lines from runtime.cfg file ( lines contain the string frontail )
1 Like

Because i’m scared. My system has been upated from OH 2 onwards until now.

Basically same for me.

openhabian@openhabian:/var/lib $ ls -ld /usr/lib/node_modules/frontail
lrwxrwxrwx 1 root root 21 Sep 26 17:53 /usr/lib/node_modules/frontail -> ../../../opt/frontail

But will i, or lets say openhabian-config then correctly reinstall if i trigger it via the menu 20?

I expect it to work. What could happen is that the underlying nodejs will be installed in a newer version. Its dependencies might not be compatible with frontail resp. its required npm modules.
But this is nothing that can be influenced by using the menu.

If you have a tested backup (i.e. you know how to restore from it and you’ve shown it to be complete), that fear can go away. If things blow up you are only out a little bit of time to go back to where you started.

Limping along patching this existing system is probably something to fear more than starting fresh and importing.

If you don’t have a backup than that’s really something to make you afraid and you shouldn’t even be contemplating mucking around with the system.