Starting HA Core

Installed HA Core on Ubuntu. Working wonderfully, Configured a few devices, all working fine.
Rebooted…
How do you actually start HA Core? Where are the docs for using HA Core, after the installation?
Yep, total HA newbie…

Thanks.

You should start it as systemd service.
Here is my systemd unit.

igor@hass:~$ cat /etc/systemd/system/[email protected]

[Unit]
Description=Home Assistant
After=network-online.target

After=zigbee2mqtt.service
#Requires=zigbee2mqtt.service

#After=mosquitto.service
#Requires=mosquitto.service

[Service]
Type=simple
User=%i
ExecStartPre=/bin/sleep 60
#ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
ExecStart=/srv/hass39/bin/hass -c "/home/%i/.homeassistant"
Restart=always

[Install]
WantedBy=multi-user.target

My unit here is just for reference, you need to change it according yours configuration.
After creating systemd unit, you need to refresh daemon config, activate and start it:

sudo systemctl daemon-reload
sudo systemctl enable [email protected]
sudo systemctl start [email protected]

Is there a particular command to shutdown?
I shutdown the server, and on restart complained about a dirty database…

The system could not validate that the sqlite3 database at //home/homeassistant/.homeassistant/home-assistant_v2.db was shutdown cleanly

Thanks.

shutdown: sudo shutdown -h now
reboot: sudo reboot

Did that, and got the message as per above…

I really don’t know what you did. Maybe you didn’twait to power off sequence finished and powered off the machine?

Can it be shutdown, without shutting down the pc?

sudo systemctl stop [email protected]

Wondering why the file to start/stop the service is not created automatically on the installation of the system? Well, wasn’t in my case…

Probably because the way you’ve installed HA is not the most recommended way, thus not well supported?

@hornetster: it was in the docs before but seems to have fallen off.

I was searching for the same and bumped on this topic.
Maybe not bad to mark IgorZg’s answer as the solution so others can benefit from this as well.