but every now and then I log into the server and find its not running, so i then have to restart it and wait for it to sync from where it stopped.
Crunck
I wonder why bitcoind is doing that, It should just keep running. There may be something in the debug.log that
may explain why bitcoind is crapping out.
Have a look in this directory
https://github.com/bitcoin/bitcoin/tree/master/contrib/init. If your rig is using systemd
there is a unit there, so you can start bitcoind through systemctl. Also a couple other scripts for openrc and sysvinit.
check it out man!