Public Repository

Last pushed: a year ago
Short Description
Farming Simulator 2015 inside a Docker Container
Full Description

Farming Simulator 2015 on Linux

Docker container for running a Farming Simulator 2015 Dedicated Server on a Linux machine.

Requirements

  • docker (this one is obvious)
  • farming simulator 2015 license key

Setup

Perform the following steps in the written order.

  • Create a new docker volume used as the home directory within the container

    docker volume create --name docker-farming2015
    
  • Perform Docker run to build and start the Container

  • You can set the port for the Webserver as needed; 8080 (default port inside the containers dedicatedServer.xml

    docker run -itd \
      --name=docker-farming2015 \
      -p 8080:8080 \
      -p 10823:10823/udp \
      -v docker-farming2015:/home \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      -e DISPLAY=$DISPLAY \
      greyslater/docker-farming2015
    
  • Enter the container with docker exec command

    docker exec -it docker-farming2015 /bin/bash
    
  • we need to use getty tty in order to start our dedicated server with tmux later on

  • login with user: fs2015-user / pw: fs2015-user

    getty tty
    
  • We need to run FarmingSimulator2015.exe once in order to enter a valid license key

  • Note that a dedicated server needs a own license key different from any clients that will use the multiplayer server

    wine /home/fs2015-user/.wine/drive_c/Program\ Files/Landwirtschafts\ Simulator\ 2015/FarmingSimulator2015.exe
    
  • enter a valid license key for your server and exit the FarmingSimulator2015.exe

  • you can now take a look inside the dedicatedServer.xml file if you need to change the webserver port and/or the admin password for webserver login (the admin password is important to enter the webserver)
    vi /home/fs2015-user/.wine/drive_c/Program\ Files/Landwirtschafts\ Simulator\ 2015/dedicatedServer.xml
    

Starting the server with tmux

  • my Best practice to run the dedicated server in the background is with the use of tmux
  • with the argument new -s we'll create a new tmux session so we can attach again later

    tmux new -s fs15
    
  • within tmux you can start the dedicated server with

    wine /home/fs2015-user/.wine/drive_c/Program\ Files/Landwirtschafts\ Simulator\ 2015/dedicatedServer.exe
    

Monitoring the server

open a webbrowser and login with the credentials from the dedicatedServer.xml file

http://localhost:8080/
  • you can always reattach to the generated tmux session within the container, so just as a reminder
  • with getty tty - login with user: fs2015-user / pw: fs2015-user
docker exec -it docker-farming2015 /bin/bash
getty tty
tmux attach -t fs15

Additional notes and Credits

This container was built with the great tutorial from Games4Linux

Docker Pull Command
Owner
greyslater

Comments (0)