Soooooo, I got a little gift for this community...
The last time I played FS on PC was probably the 2011 installment. After that I moved from PC gaming to consoles because I got tired of having to upgrade my PC all the time. I've gotten FS19 on PC during the free hand-out on Epic Games, and I was smart enough to claim a second copy because I knew i'd want to run a server someday.
After fiddling around a few hours getting it up and running properly i can finally say I've managed to tick all my requirement boxes:
- Manage (start / stop / configure / monitor) the server through the Giants Dedicated Server management website (i.e using the dedicatedServer.exe, how GIANTS intended)
- Automatically start the server when windows is started (i.e. after a reboot)
- No need to have a user actively logged on the dedicated server (i.e suspended remote desktop session)
- No need to have the Epic Games Launcher running actively, as it was eating up 90% of CPU
Disclaimer: While this guide goes into details on how to setup a server and get it running, it does not go into details on how to configure it (with mods and the likes, as I don't know this yet)Also any port forwarding or firewall modifications are assumed to be done already, or that you have the know-how of how to do this.To continue with this guide, I expect you are at least a little tech savvy!
So, here's how I pulled it off:
- Install the Epic Games launcher on your server (I assume you will use the default installation location)
Here are some optional things you can do, in order to smooth the experience of using the Epic Games Launcher over remote desktop:
Disable Run When My Computer Starts in the Epic Games Launcher settings.
Disable Show Free Game Notifications and Show News And Special Offer Notifications in the Epic Games Launcher settings. - Install FS19 using the Epic Games launcher (I assume you will use the default installation location)
- Open Epic Games launcher settings, scroll down to Manage Games and expand Farming Simulator 2019. Tick the Additional Command Line Arguments box and add
Code: Select all
-server
- Launch Farming Simulator 2019 through the Epic Games launcher library.
If you get an error message about 3D and missing drivers, you can click on No.
If the game continues to load in a command window, close the window.
After this, you can safely exit the Epic Games launcher. - Create a folder that will hold the dedicated server stuff (i.e. C:\GIANTS Dedicated Server)
- Copy the following files from C:\Program Files\Epic Games\FarmingSimulator19 into the folder created in #4:
dedicatedServer.exe
dedicatedServer.xml - Create a folder called x64 inside the folder you created in #4
- Inside the x64 folder, create a batch script (i.e. run.bat) with the following contents:
Replace xxx with your Epic Games account and password
Code: Select all
@ECHO OFF CD "C:\Program Files\Epic Games\FarmingSimulator19" FarmingSimulator2019.exe -AUTH_LOGIN=xxx -AUTH_PASSWORD=xxx
- Open an elevated command prompt in the directory created in #4 and run the following commands:
Code: Select all
mklink /d pdlc "C:\Program Files\Epic Games\FarmingSimulator19\pdlc" mklink /d web_data "C:\Program Files\Epic Games\FarmingSimulator19\web_data"
- Edit dedicatedServer.xml with a text editing tool (i.e. notepad) and make the following changes:
Line 17:change this toCode: Select all
<game description="Farming Simulator 19" name="FarmingSimulator2019" exe="FarmingSimulator2019Game.exe">
This tells the dedicatedServer.exe to run the batch file when you click Start in the management portalCode: Select all
<game description="Farming Simulator 19" name="FarmingSimulator2019" exe="run.bat">
Line 6: (sort of optional)change this toCode: Select all
<password>XXXXX</password>
If you do not do this change, the first time you run dedicatedServer.exe it will change it for you and generate a new random password.Code: Select all
<passphrase>XXXXX</passphrase>
Line 5: (optional)Change the value of admin to whatever you want, if you want to use a different username on the management portal to authenticateCode: Select all
<username>admin</username>
Line 8: (optional)change this toCode: Select all
<tls port="8443" active="true">
This tells the dedicatedServer.exe to not bother hosting an HTTPS variant of the control panel.Code: Select all
<tls port="8443" active="false">
While from a professional point-of-view i can only applaud that they have this setting but there are a few issues with it:
It generates a self-signed certificate and it expects a.pem and b.pem to exist as well, and I haven't found those inside the FS19 installation.
If you do plan on using it, may I suggest getting a proper DNS hostname for your server, along with a free SSL certificate from LetsEncrypt.org - Run dedicatedServer.exe from inside the folder created in #4
- Open your browser and navigate to or
Code: Select all
http://<your server>:8080
and login with the credentials specified in the dedicatedServer.xml file (see #10.2 / #10.3)Code: Select all
https://<your server>:8443
- Update the settings of the game server and press Save when you are done.
The notification at the top » Game is not activated. A separate Farming Simulator 19 license is needed for each Dedicated Server. can be safely ignored
If there's a notification » Game log contains errors, you can get rid of this by clearing game.log - Press start.
It may or may not say that it failed to start the server but be patient.
After a few seconds, you should see the server start via your remote desktop session.
If you then refresh your browser, you should see the stats of the server (i.e. CPU load, RAM usage, ...) - At this point, you should be able to stop / restart / start the server using the management panel.
- Test your server by connecting to it with your client
So the last thing on my list was that I wanted to be able to run (at least the management panel) automatically whenever my server got rebooted.
This way, i can easily access the management panel and start the game server if required.
In order to achieve this, I downloaded a tool that allows you to create and manage services called NSSM - The non-*censored* service manager
Feel free to use any other tool you might have at your disposal, but this is what I went with because its free and easy to use.
- Go to their website and download the nssm 2.24-101-g897c7ad pre-release build.
- Extract the contents of the ZIP somewhere on your hard drive.
- Go into the extracted folder and into the win64 sub folder, to locate the nssm.exe
- Open an elevated command prompt and run the following command:
Code: Select all
nssm install FS19DedicatedServer
- This will open a small GUI that you can use to configure the service:
- Tab Application:
- Set Path to point to the dedicatedServer.exe using the ... button.This should automatically fill out Startup directory for you.
- Tab Details:
- Set Display name to GIANTS FS19 Dedicated Server
- Optionally fill out a Description. i.e something along the lines of "This service runs the GIANTS dedicated server
- Tab Log on
- Use the option This account
- In the largest box, fill out your windows account name
- In the 2 other boxes you need to fill out your windows account password
- Finish by clicking on Install service
- Tab Application:
- If at this point your game server and/or the dedicatedServer is running, you should stop them.
- In the elevated command prompt, run this command:It should reply with FS19DedicatedServer: START: The operation completed successfully.
Code: Select all
nssm start FS19DedicatedServer
- Attempt to access the management panel again through your browser and everything should work.
- At this point, you can log out on the server itself
- Start the game server through the management panel
- Happy farming \o/
Troubleshooting
- When clicking Start, the game server refuses to start
Please check Task Manager on the server machine and look for any EpicGameLauncher process.Kill it if it exists. But please allow some time (i.e. 30 seconds to a minute) for everything to load properly once you press start.
Here's a small update from my part after running the server for a few days now...
It seems that Epic doesn't like it that much when you run a game 24/7 so after a while, the frequent checks the game does with the Epic server returned an error, which force closed the server.
To deal with this, I have enabled the "automatic restart" option under settings > miscellaneous in the dedicated server control panel.
Now, for all Epic is concerned i'm playing the game for less than 24/hrs in one go. After that, the server is relaunched, which means it also re-authenticates with them