Creating a SysV-style init script for starting is not difficult but the details depend on your particular OS flavour/distribution.

The tricky part is that requires an X server to work. On a headless server, you can use Xvfb as a dummy display for

However since 2.3 an X server server is no longer needed; it is now possible to start in “true” headless mode simply by making sure the DISPLAY environment variable is not defined:

$ unset DISPLAY
$ soffice -headless -accept="socket,host=,port=8100;urp;" -nofirststartwizard