Unable to install frontail on fresh install OH 4

Use this script:

	curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | gpg --dearmor > /usr/share/keyrings/nodesource.gpg
	echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
	apt-get install --yes nodejs

	#NPM
	apt-get install --yes npm

	#FRONTAIL
	useradd --groups *yourUserHere*,openhab -s /bin/bash -d /var/tmp frontail
	mkdir -p /usr/local/lib/node_modules/frontail
	git clone https://github.com/Interstellar0verdrive/frontail_AEM.git /usr/local/lib/node_modules/frontail
	cd /usr/local/lib/node_modules/frontail
	npm audit fix --omit=dev
	npm update --audit=false --omit=dev
	cp frontail.service /etc/systemd/system/frontail.service
	chmod 644 /etc/systemd/system/frontail.service

file frontail.service:

[Unit]
Description=Frontail openHAB instance, reachable at http://%H:9001
Documentation=https://github.com/mthenw/frontail
After=openhab.service
PartOf=openhab.service

[Service]
Type=simple
ExecStart=/usr/local/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/local/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log
Restart=always
User=frontail
Group=openhab
Environment=PATH=/usr/local/bin:/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/

[Install]
WantedBy=multi-user.target

Make sure you uninstall all components before

1 Like