[Support] ich777 - Gameserver Dockers


Recommended Posts

just a heads up with Eco, there is now a native linux server, should be way better for a container. 

Latest Patch Notes: 

Quote

 

Version 9.0.2 has been released and fixes the following issues:

-Linux Client is now available (Including server and - for the first time - singleplayer)

-IP binding for the webserver is now working correctly

-Maximum amount to buy in the purchase list now updates correctly

-The button to choose the type of road in road contracts can be clicked again

-The last clause of a contract can be moved and removed again

 

 

  • Thanks 1
Link to comment

Hey guys, 

 

first of all, thank you @Ich777 for all your hard work, this is a great addition to any unraid deployment! :)

 

So me and a few friends started messing around with Arma3, it's really fun but without any mods it's, well.. Arma.. :)

Any idea how you define specific mods to be added to a server deployment? I see theres a "Mod" field in the docker config but no idea how to use it.

Would love some pointers, I though maybe if the account connecting to steam are subscribed to specific mods in the workshop that it would sort it out itself. 

 

Thanks again for this great addition, have a good one! :) 

Link to comment
33 minutes ago, Abnorm said:

Hey guys, 

 

first of all, thank you @Ich777 for all your hard work, this is a great addition to any unraid deployment! :)

 

So me and a few friends started messing around with Arma3, it's really fun but without any mods it's, well.. Arma.. :)

Any idea how you define specific mods to be added to a server deployment? I see theres a "Mod" field in the docker config but no idea how to use it.

Would love some pointers, I though maybe if the account connecting to steam are subscribed to specific mods in the workshop that it would sort it out itself. 

 

Thanks again for this great addition, have a good one! :) 

Yes you can do this, here is a good starting point, that's not different to any other linux dedicated server:

https://www.armaholic.com/page.php?id=29755

(Please note that this a tutorial for Windows and not Linux, but it's a starting point)

 

You can also write a script that is exectued before the container starts and installs mods or checks if there are new mods available but please be aware that you have to install arma3 first and then add the script.

 

I'm not really familar with adding workshop content but here is a line with all variables that executed to install the app, you can modify this really simple and paste it in the console of the container and it will execute it:

'${STEAMCMD_DIR}/steamcmd.sh +login ${USERNAME} ${PASSWRD} +app_update ${GAME_ID} +force_install_dir ${SERVER_DIR} +quit' (without quotes)

 

You have to add the workshop content to this I think (I'm not to familar with workshop content).

(No worrys about the variables they are passed through the container and are all in there for example $STEAM_CMD is something like /serverdata/serverfiles)

 

Hope that helps. ;)

Link to comment

Hey Ich777,

 

Edit: darn its just the testlive one - not stable one yet. So up to you and others if you want to spend time on it yet. It seems like a popular game though. :)

 

Looks like Night of the Dead have a dedicated server now, yeah its Windows 64bit.

 

https://steamcommunity.com/app/1377380/discussions/0/2849047119419572824/

Guide

Prerequisites
64-bit Windows
Steam client
SteamCMD

Install
Install SteamCMD on your host.
Launch SteamCMD on your host and use it to download the server files.(Remove the < > and replace them with double quotes, for example, force_install_dir "C:NOTDServer")
(app id : 1420710)

Steam> login anonymous
Steam> force_install_dir <install_dir>
Steam> app_update 1420710 validate
Steam> exit


Port
We basically use the two ports below.
UDP 27015 : Game query port
UDP 7777 : Game client port

Set the ports as an exception in the firewall.
Open these ports through Port-Forwarding.

If you would like to change the port you are using, the next step will explain how to change the port.

Host
In the installed folder, open "ServerSettings.ini" to edit as desired.
Please change the default in each section to the desired value.
for example :
[ServerSettings]
ServerName=MyServerName
[SystemSettings]
SaveName=MySave
[GameSettings]
Difficulty=Legend
NoTeamKill=True

Run StartServer.bat
a. (Optional) If you want, you can edit StartServer.bat to change which port you use.(for example : LFBinariesWin64LFServer.exe ?listen -log -Port=7779 -QueryPort=27016)

Save file location : <install_dir>LFSavedSaveGames
You can save and load the save file by matching SaveName (in [SystemSettings]) and the save in the above location.


Play
Join to the dedicated server session requires same version of the server and client.
Select server_test Branch from the SteamLibrary->Night of the dead->Properties->BETAS.
(Select beta you would like to opt into : server_test)
You will be able to join the server session.

by steam user Pure:  Alright, so this guide works but you have to make sure under "Host"-->"2. Run StartServer.bat" that your file has the ports that you port forwarded. For example: "LF\Binaries\Win64\LFServer.exe ?listen -log -Port=7777 -QueryPort=27015"

Edited by Cadal
Link to comment
6 hours ago, Cadal said:

Hey Ich777,

 

Edit: darn its just the testlive one - not stable one yet. So up to you and others if you want to spend time on it yet. It seems like a popular game though. :)

 

Looks like Night of the Dead have a dedicated server now, yeah its Windows 64bit.

 

https://steamcommunity.com/app/1377380/discussions/0/2849047119419572824/

by steam user Pure:  Alright, so this guide works but you have to make sure under "Host"-->"2. Run StartServer.bat" that your file has the ports that you port forwarded. For example: "LF\Binaries\Win64\LFServer.exe ?listen -log -Port=7777 -QueryPort=27015"

I can try it with WINE but if it's in a testing phase I'm not exactly sure if it's a good idea, eventually a version for Linux from the dedicated server will be released after the test phase?

Link to comment

Hey Ich777,

 

I have a very peculiar use-case that I could use some assistance with. I'm running a 7 Days To Die instance with the Darkness Falls mod on it. The scenario is like this:

  • We have a group playing 7 Days to Die Alpha19, with Darkness Falls V3.02
  • There is an update for both 7 Days to Die (Alpha 19.1) and Darkness Falls (3.10)
  • Both of those are completely incompatible with our current game, and requires a complete map restart
  • Everyone is running a rolled back instance of 7dtd on their client and the server was not updated so we can keep playing on our current map
  • A power outage hits the server causing it to reboot
  • On boot, steamcmd runs through and updates the server 7dtd instance making the server no longer compatible with our Darkness Falls version and game save
  • I have a backup of the server files prior to today's power-outage/update
  • I can restore the files on the 7dtd server to put it back to how it was before
  • Is there any way to start the container and not have steamcmd update the 7dtd base application?

Any advice would be super helpful. 

Link to comment
4 hours ago, Holynub said:

I can restore the files on the 7dtd server to put it back to how it was before

Is this a question? If so yes you can do this but keep in mind that you have to configure everything to your preference so that the container doesn't update the files again at the start of the container.

 

4 hours ago, Holynub said:

Is there any way to start the container and not have steamcmd update the 7dtd base application?

I don't know if you can specify this for this specific game...

But look at this thread that should give you a idea of how that works: Click (like in this post you have to add to the GAME_ID '-beta alpha15.2' or whatever you want to download, but please check if it downloads the right version should be look like this '294420 -beta alpha15.2' without quotes in the template).

 

 

Sorry on the limited informations that I can give since I personally don't own the game (created it only on a request of a user here in the form).

Link to comment

Thanks Ich. To answer some things:

 

12 hours ago, ich777 said:

Is this a question? If so yes you can do this but keep in mind that you have to configure everything to your preference so that the container doesn't update the files again at the start of the container.

 

 

No, I actually have a backup of the server prior to the outage. So I can restore the files in the server folder to a pre-update state. I was mainly looking for a way to prevent steamcmd from updating or changing it to update to a specific version when I start up the docker container. Passing the beta parameter to steamcmd sounds like that would work. Would I need to change the appID in the docker config to something like: "294420 -beta alpha19.0"? Or does appID only look for an integer?

  • Thanks 1
Link to comment

Just wanted to follow up. I got everything back up and running again. That's totally a way to specify a version for steamCMD to run, at least for 7 days to die. I didn't even need to restore from the backup of the server to get it working.

 

In the GAME_ID field, you can put "294420 -beta alphaXX.X" where XX.X is the version you want, and the steamCMD will "opt-in" for that beta version. Thank god. We were prepping for a big zombie horde night and were looking forward to the chaos this weekend. Here's the procedure I did.

 

  1. Stop the docker container running the 7DTD instance
  2. Edit the config
  3. Under GAME_ID: set it to "294420 -beta alpha19.0"
  4. Start the 7DTD docker container
  5. Keep the logs open and wait for the container to finish updating
  6. Stop the container after its updated
  7. Re-copy Darkness Falls 3.02 server files into the installation (Done through either Crusader or Windows Explorer if you have it mapped)
  8. Start start the container after the server files have been pasted into the server directory
  9. Enjoy the older version of Darkness Falls
  • Like 1
Link to comment

Hi @ich777, I am trying to give access to the NWN server to somebody outside my house (but inside my VPN).

To do so I:

  • created a new user in Unraid called nwnee (uid:gid 1002:1002), to which my friends can ssh to
  • run the docker with additional options  `--user nwnee`
  • chowned -R the NWN files to user nwnee
  • also tried setting docker UID and GID env vars to 1002:1002 instead of 99:100.

However I still get this error when running the docker:

/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: "/opt/scripts/start.sh": stat /opt/scripts/start.sh: permission denied": unknown.

The docker run line is:

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='NWN' --net='lsio' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'LOG_LVL'='7' -e 'MOD_NAME'='World of Greyhawk CEP 2_65' -e 'NWNEE_V'='latest' -e 'MAX_CLIENTS'='10' -e 'MINLEVEL'='1' -e 'MAXLEVEL'='40' -e 'PAUSEAPLAY'='1' -e 'PVP'='2' -e 'SERVERVAULT'='1' -e 'ELC'='0' -e 'ILR'='0' -e 'ONEPARTY'='0' -e 'DIFF'='4' -e 'AUTO_SAV_I'='60' -e 'SRV_NAME'='giofonchio' -e 'PPW'='m' -e 'APWD'='mm' -e 'PUBLIC_SRV'='0' -e 'RLD_W_E'='0' -e 'GAME_PARAMS'='-dmpassword mmm' -e 'UID'='1002' -e 'GID'='1002' -e 'UMASK'='000' -p '5121:5121/udp' -v '/mnt/cache/appdata/nwnee':'/nwnee':'rw' -v '/mnt/user/Storage/Games/nwnee/wog':'/nwnee/Neverwinter Nights':'rw' -dit --restart=unless-stopped --user nwnee 'ich777/nwnee-server' 

Of course if I do not specify docker run --user try to access the docker as user nwnee I get permission denied:

nwnee@giofonchio> docker exec -u nwnee -ti NWN screen -xS nwnee
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/NWN/json: dial unix /var/run/docker.sock: connect: permission denied

 

I'm not sure how to fix this. Can you help?

 

Link to comment
52 minutes ago, OdinEidolon said:

chowned -R the NWN files to user nwnee

Don't do this!

The users inside the containers are 99:100 otherwise the container can't read the files!

 

I don't understand that use case...

 

I don't understand why you want to run it as another user?

The user for the container and everything else should be nobody:users 99:100.

Link to comment
1 hour ago, ich777 said:

Don't do this!

The users inside the containers are 99:100 otherwise the container can't read the files!

 

I don't understand that use case...

 

I don't understand why you want to run it as another user?

The user for the container and everything else should be nobody:users 99:100.

OK, I see. But then how can I access the container controls (via screen) without being root? I need to give access to the container to some friends who are not allowed to access my server as root.

Link to comment
6 hours ago, ich777 said:

Type this in 'su $USER' (without Quotes) from inside the container.

You can install SSH inside the container and then allow access to this container over SSH (inside the container you are not really root of your complete system).

Correct me if I am wrong.

I would do this by:

  1. Configuring the container to open port 22 to the Unraid server (to port 22222 or something)
  2. entering the container by docker exec -it NWN  /bin/bash
  3. apt update; apt install ssh
  4. edit ssh config in /etc/ssh/sshd_config
  5. service ssh start
  6. set ssh service to start on container boot (i do not know how to do this)
  7. set a new password for the nwnee user inside the container
  8. ssh [email protected] (or the exact container IP)
  9. screen -xS nwnee

Am I missing anything? The only thing I think I have no idea how to do is step 6: I have tried both creating /etc/init/ssh.conf and using update-rc.d.

Any suggestion?

Link to comment

Exactly. But I would do that in a user.sh that does this on every start of the container and checks if everything is installed and configured properly.

You can do that with a user.sh script mount it in the template simply search this thread on how to do that.

Search for 'user.sh'.

Link to comment

Hey ich777 want to say thank you seriously. been using unraid about a year now and run one or two of your containers and have never had a problem!

 

So quick question, I tried to get a Terraria server running last night for my nephew. It runs, he can connect from out of state. I can change server attributes through the console. BUT I cannot change the difficulty. Appears this has to be done in the serverconfig.txt

 

Issue I'm having is the docker container appears to never use the serverconfig.txt even though the GAMEPARAMS clearly has it set to run it by default.

 

Even on first runs (no local data, fresh install from APPS) the password for the server should be Docker as seen in the serverconfig.txt but when I log in through console, there is no password set, no player limit set, etc so it appears even first run the config file is not being utilized. I'm looking through your GitHub for that image right now, see if there is anything I am missing.

 

When I change the config file, the container crashes when I start it back up and never builds another world

 

If you have an idea, please let me know!

 

THanks!

Link to comment
15 hours ago, ich777 said:

Exactly. But I would do that in a user.sh that does this on every start of the container and checks if everything is installed and configured properly.

You can do that with a user.sh script mount it in the template simply search this thread on how to do that.

Search for 'user.sh'.

Done! Thank you so much!

 

Had to manually mount user.sh this way in the advanced docker options in Unraid:

--mount type=bind,source=/my/path/to/user.sh,target=/opt/scripts/user.sh

 

user.sh does:

#!/bin/bash
# Should be located in /opt/scripts/user.sh

SSHD_CONFIG="Port 22\nPermitRootLogin no\nChallengeResponseAuthentication no\nUsePAM yes\nX11Forwarding no\nPrintMotd no\nAcceptEnv LANG LC_*\n"
PASSWORD="myveryownpassword" # setting up keys is too much hassle ;)

if [ ! -f /usr/sbin/sshd ]; then
    echo "### Installing missing pacakges ###"

    apt update && apt-get -y install ssh nano
    echo -e $SSHD_CONFIG > /etc/ssh/sshd_config
    echo "nwnee:$PASSWORD" | chpasswd
fi

echo "### Starting ssh ###"
service ssh start

 

Edited by OdinEidolon
  • Like 1
Link to comment
On 9/24/2020 at 8:46 PM, ich777 said:

I can try it with WINE but if it's in a testing phase I'm not exactly sure if it's a good idea, eventually a version for Linux from the dedicated server will be released after the test phase?

Yeah sorry didnt notice it was test until after I posted thus the edit. Prob a good call on your part, im not sure if there will be linux server support after test.

  • Like 1
Link to comment
8 minutes ago, OdinEidolon said:

Had to manually mount user.sh this way in the advanced docker options in Unraid:

--mount type=bind,source=/my/path/to/user.sh,target=/opt/scripts/user.sh

You also can do this in the template by adding a new path but you have to type the 'user.sh' yourselfe and it will work too. ;)

Link to comment
9 hours ago, Hotschmoe said:

Hey ich777 want to say thank you seriously. been using unraid about a year now and run one or two of your containers and have never had a problem!

 

So quick question, I tried to get a Terraria server running last night for my nephew. It runs, he can connect from out of state. I can change server attributes through the console. BUT I cannot change the difficulty. Appears this has to be done in the serverconfig.txt

 

Issue I'm having is the docker container appears to never use the serverconfig.txt even though the GAMEPARAMS clearly has it set to run it by default.

 

Even on first runs (no local data, fresh install from APPS) the password for the server should be Docker as seen in the serverconfig.txt but when I log in through console, there is no password set, no player limit set, etc so it appears even first run the config file is not being utilized. I'm looking through your GitHub for that image right now, see if there is anything I am missing.

 

When I change the config file, the container crashes when I start it back up and never builds another world

 

If you have an idea, please let me know!

 

THanks!

Sorry but I really can't help since I don't own Terraria...

I got so much problems with this game that I'm thinking of pulling the images/containers from CA App.

Link to comment
1 hour ago, BadCo. said:

I seem to be getting a few errors when trying to run a Squad server. Pretty much just pulled the image and hit start and this is what it spits out:

 

https://paste.hardnet.nz/?aa23a85dc14efec8#4CKLQQdL79fMDxBL2SiF6RR9amdWNbEoQVLYWkvnpEC5

Also downloaded the container again and it is reachable and everything is working like it should...

Which errors did you mean exactly?

 

This line tells you that the server is started and ready for incoming connections:

Quote

[2020.09.27-09.36.42:015][ 0]LogOnline: GotoState: NewState: Playing

 

grafik.thumb.png.d294d0588059a5c7790894223d565214.png

 

Please be sure if you try to connect to it via your IP in the steam server browser to input the querry port, defaults to: 27165 (eg: '192.168.1.1:27165')

 

EDIT: Btw the log looks exactly as yours but some lines are marked as errors but the aren't.

Link to comment
21 hours ago, ich777 said:

Also downloaded the container again and it is reachable and everything is working like it should...

Which errors did you mean exactly?

 

This line tells you that the server is started and ready for incoming connections:

 

grafik.thumb.png.d294d0588059a5c7790894223d565214.png

 

Please be sure if you try to connect to it via your IP in the steam server browser to input the querry port, defaults to: 27165 (eg: '192.168.1.1:27165')

 

EDIT: Btw the log looks exactly as yours but some lines are marked as errors but the aren't.

Sorry I should have been clearer, it was a bit late last night by the time I gave up :D

 

The warnings start from 2020.09.27-09.36.43:884

 

I can't see the server in the Squad custom server browser. Unless I am joining wrong? I realise that you need a license to be in the main Squad Server Browser.

 

Thanks for the help Ich!

 

EDIT: Just to be sure, I have read through all the Squad Dedicated Server documentation on the wiki, and tried searching for the warnings, but haven't found anything related.

Edited by BadCo.
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.