main
ROOT /
pages /
run-as-system-service.md
24 lines | ISO-8859-1 | 1 KB

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. We assume that OneDev is installed at C:\onedev on Windows and /opt/onedev on Linux/Mac

On Windows Platform

  1. Edit file C:\onedev\conf\wraper.conf to set value of property wrapper.java.command as path to java command

  2. Open a command prompt with administrator privilege and switch to folder C:\onedev\bin

  3. Run command server.bat install, and a Windows service with name OneDev will be installed

  4. To uninstall the service, run command server.bat remove from the same folder with administrator privilege

On Linux and Mac OS X

  1. Edit file /opt/onedev/conf/wraper.conf to set value of property wrapper.java.command as path to java command

  2. By default, the service will run under root user. To run as another user, edit file /opt/onedev/bin/server.sh and uncomment below line to specify the user. Make sure specified user has full permissions to /opt/onedev and all its sub directories:

    #RUN_AS_USER=
    
  3. Run command /opt/onedev/bin/server.sh install as root user to install the service

  4. To uninstall the service, run command /opt/onedev/bin/server.sh remove as root user

Please wait...
Page is in error, reload to recover