Openhabian needs login after every restart

Hello Everyone,

I have a problem after installing Openhabian on an SD card for my RPI3B+.
The problem is after rebooting the PI it always asks for the login creditentials to start Openhabian.

I’ve searched in google and on the forums, found several posts from 2016, but I’m getting nowhere with those.

After I enter the defaul openhabian username and password, it logs in, I can open the http://openhab:8080 webpage too, but it is really annoying to plug a keyboard to a PI just to log in and then control the PI from putty later on.

I’ve also checked the openhabian-config but did no luck…

Do you know any way to let the PI login to openhabian after restart? So I can restart the PI through ssh, and i will still be able to reach the openhab without manual logging in?

openHABian is supposed to run 24/7 and even after a reboot it will automatically run openhab.
You don’t need to login or interact.
If yours does not run then probably installation did not succeed.
Try systemctl status openhab2.service
See /boot/first-boot.log and if files /opt/openHABian* exist (sign that install hasn’t finished).

1 Like

Hello Markus,

Thanks for the quick reply. I’ve checked and after PI restart, I can connect to it via Putty. The service is up and running (openhab2.service)

“[16:18:07] root@openhab:/# systemctl status openhab2.service
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2019-08-11 12:42:47 CEST; 3h 35min ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Main PID: 444 (java)
Tasks: 97 (limit: 2319)
Memory: 333.0M
CGroup: /system.slice/openhab2.service
└─444 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/li
aug 11 12:42:47 openhab systemd[1]: Started openHAB 2 - empowering the smart home.”

Also I’ve checked the firstboot logfile. on 1st and 2nd time the install failed because i forgot to plug in the LAN cable. On 3rd the install was successful.
In /opt/ i can see that the update should be OK.

“[16:17:13] root@openhab:/opt# ls
afterfirstboot.lock jdk openhabian openHABian-install-successful vc”

It seems that after a PI restart the system is back online, but when I check the PI’s screen directly, i can see that it asks for login name and password. Although the site is reachable on openhab:8080

what do you mean by “the PI’s screen” ? A terminal session ? Of course you have to authenticate on logins. But you don’t need to login for openHAB to work.
Or are you asked when accessing the webpage http://openhabianpi:8080/ from a browser ?

1 Like

PI’s screen: I mean when I plug a monitor to the PI’s Hdmi port. After restart I see that the PI is booting openhabian but at the end of the boot it asks for login. Also the we page is accessible on openhab:8080 for me.

Of course. Just like any modern computer does. There are means to work around that but since you obviously are not familiar with UNIX I strongly recommend against trying. It’s not needed, as I said openhab will start independent of if you login or not.

1 Like