This document explains how to configure OneDev to run as system service so that it runs in the backend and can start automatically when system starts
On Windows Platform
-
Edit file
<OneDev dir>\conf\wraper.conf
to set value of propertywrapper.java.command
as path to java command if it does not exist in system path -
Open a command prompt with administrator privilege and switch to folder
<OneDev dir>\bin
-
Run command
server.bat install
. A Windows service with name OneDev will be installed -
To uninstall the service, run command
server.bat remove
from the same folder with administrator privilege
On Linux and Mac OS X
-
Edit file
<OneDev dir>/conf/wraper.conf
to set value of propertywrapper.java.command
as path to java command if it does not exist in system path -
By default, the service will run under root user. To run as another user, edit file
<OneDev dir>/bin/server.sh
and uncomment below line to specify the user. Make sure specified user has full permissions to OneDev directory and all its sub directories:
#RUN_AS_USER=
-
Run command
sudo <OneDev dir>/bin/server.sh install
to install the service -
To uninstall the service, run command
sudo <OneDev dir>/bin/server.sh remove