I have an openhab2.5.5 running on an Ubuntu Server 16.04 (on my old laptop). I can start the openhab with the following command:
sudo service openhab start
The problem is, when I do this, the console starts and if I leave the console, or close the terminal, or type “logout” (or Ctrl+D), the openhab service stops every time. I would like to start the openhab as a daemon.
The SystemD on that version of Ubuntu is pretty old. I wonder if the way it handles the service files has changed. It is supposed to start up the service in the background as a service and that is how it works on more recent Linux systems. I think your best bet is going to look at the .service file compared to the docs for the version of SystemD that you are running and see if it relies on stuff that was not supported in that older version.
Alternatively updating to a more recent LTS version of Ubuntu will bump you up to a later version of SystemD.
I am running OH 2.5.8 on a cubietruck which runs Ubuntu 16.04.7 LTS.
The openhab.service file that is provided by the dep package works with this version of Ubuntu.