Setting up a server (Linux)

This tutorial requires basic linux knowledge as well as a server you have SSH access to.

Hosting a server using webspace/web hosting is technically not possible!


Tools used in this tutorial:

  • WinSCP
  • Putty


This guide should work on all systems that use apt as a package manager. I use Debian but Ubuntu should work as well.

  1. Connect to your server as root via SSH (if installed, you can also use sudo and your regular user to install packages)
  2. Update your packages (optional, but mostly useful):
    apt-get update
    apt-get upgrade
  3. Install the dependencies MD needs:
    Please note that you will have to choose the correct version of the libenet package for your distribution. You can find an overview of package and OS versions on the project page.

    apt-get install mono-complete libenet7
  4. For running the server in background I use screen:
    apt-get install screen
  5. Create a new user for running the MD server (same procedure as should be done for every server software):
    adduser manicdigger
  6. Now close the root terminal connection and connect as the user you just created
  7. Create a new directory inside your home directory to hold the server files (e.g. testserver)
  8. Download the latest Manic Digger binary from here (SourceForge) or here (GitHub) to your PC, unzip it and upload its contents to the directory you just created on your server
    You can also do so directly on the server, but I won’t explain that here.
  9. Once complete you should have a folder with all the files you also have in your normal Manic Digger installation
  10. Connect to your server (via SSH) as the user you created (not as root!)
  11. You should start in the home directory. Switch to the folder you just created:
    cd testserver
  12. You’re ready to start the server. To start the server using screen, use the following:
    Don’t forget to set UniqueNameOfTheInstance to something different for every process you start using screen.

    screen -S UniqueNameOfTheInstance mono ManicDiggerServer.exe
  13. If everything worked you will see the server start and ask for some basic parameters.
    As soon as the server started (and created it’s initial configuration) you can shut it down again for further changes.
    Entering the command /shutdown will shut down the server.
  14. Once you are done you can start the server again using the same command as before.
  15. This time you’ll want to detach from the process instead of terminating it. Do so by pressing Ctrl+A+D
    You’ll get the message: “Detached from …”
  16. The server is now running in the background. If you want to get back into the server console enter the following:
    screen -r

    This will open up the last screen you were connected to.
    If you are running multiple servers using this method you can display a list of all running screen processes using:

    screen -list

    You can then jump into a server console by typing:

    screen -r <process_id>

And that’s it. I hope I could help some of you getting your Manic Digger server set up.


If you find any errors in this tutorial or have any suggestions, feel free to post in the comments below.

Comments are closed.