1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
5/5, 2 ratings

Running ServUO as a service on Ubuntu 16.04 with auto restarts

Summary of the tutorial

This is how to run ServUO as a service on your Ubuntu Server v16.04

First, you need to create the system file:
Code (C#):
  1.  
  2. sudo nano /etc/systemd/system/servuo.service
  3.  
Copy and paste this code:
(Note: you will need to set the WorkingDirectory and ExecStart paths according to your configuration)
Code (C#):
  1.  
  2. [Unit]
  3. Description=ServUO.MONO
  4. After=network.target
  5.  
  6. [Service]
  7. User=root
  8. Type=simple
  9. WorkingDirectory=/home/ubuntu/ServUO
  10. ExecStart=/usr/bin/mono --server /home/ubuntu/ServUO.MONO.exe
  11. Restart=always
  12. TimeoutStopSec=10
  13.  
  14. [Install]
  15. WantedBy=multi-user.target
  16.  
Now, you need to enable the service:
Code (C#):
  1.  
  2. sudo systemctl enable servuo
  3.  
Now you can start/stop/status servuo
Code (C#):
  1.  
  2. #to start:
  3. sudo service servuo start
  4.  
  5. #to stop
  6. sudo service servuo stop
  7.  
  8. #to see status
  9. sudo service servuo status
  10.  
If you want to run multiple servers, you can change servuo to something else. just be sure to use different port numbers for servers running on the same nic.