Thanks Oliver, but I found a solution using systemd here with more info here
I am using the Ubuntu Nextcloud Appliance which I am pretty sure is the Snap on Ubuntu Core