System hangs after a few hours, some times after a couple of days

I am running latest Manjaro KDE on RPI 4/ 8 GB model from a 128 GB Sandisk Extreme SD Card. I have a 4 TB external HDD attached to it through USB 3.0.
Although I have installed the KDE edition, SDDM has been disabled, so it boots in to CLI.
I have Jellyfin & BOINC (only world community grid is attached) running on it.
There is no monitor connected to the box permanently.
Once in a while I notice that the system has hanged, it could happen after a few hours or after a day or two.
How do I identify what has caused this?
I am new to Linux, so any help will be appreciated.

You could check the last lines of the journal from the previous boot, when you get it up and running again:

journalctl -b -1
2 Likes

Run journalctl in realtime in a terminal and view it when the system locks up:

journalctl -f

1 Like