[Support] ich777 - Gameserver Dockers


Recommended Posts

Just now, NotYetRated said:

Thanks for all of the work on these, @ich777. Valheim is up and running beautifully.

 

One question, if anyone knows, how can we access the console within the docker? I want to set up a cron for some save/stop/restart automation.

You can just open the OS console by clicking the Valheim docker icon and selecting "console".  That will get you to a Linux shell prompt, but do note that anything you setup in there would get wiped out in a docker container update, or if you changed a docker setting that redeployed the docker (such as server name, ports, etc.)

 

 

  • Thanks 1
Link to comment
8 minutes ago, NotYetRated said:

Thanks for all of the work on these, @ich777. Valheim is up and running beautifully.

 

One question, if anyone knows, how can we access the console within the docker? I want to set up a cron for some save/stop/restart automation.

You can use the 'User Scripts' from the CA App (this app supports cron and user scripts).

 

You can stop the docker with the command: 'docker stop DOCKERNAME' and start it with 'docker start DOCKERNAME' from the User Scripts or the Unraid command line.

 

Doesn't the world save if you stop the container, if not and access to the console of the game is needed I have to add screen to the container but I would strongly avoid that if possible...

 

And everything that @luckyy said is true if you do anything inside the container and I push an update of the container everything that you done inside will be wiped (just to be clear the savegame and world will stay in there, only if you change anything inside the filesystem that is outside of the /valheim path inside the container is affected).

Link to comment
4 minutes ago, ich777 said:

You can use the 'User Scripts' from the CA App (this app supports cron and user scripts).

 

You can stop the docker with the command: 'docker stop DOCKERNAME' and start it with 'docker start DOCKERNAME' from the User Scripts or the Unraid command line.

 

Doesn't the world save if you stop the container, if not and access to the console of the game is needed I have to add screen to the container but I would strongly avoid that if possible...

 

And everything that @luckyy said is true if you do anything inside the container and I push an update of the container everything that you done inside will be wiped (just to be clear the savegame and world will stay in there, only if you change anything inside the filesystem that is outside of the /valheim path inside the container is affected).

 

I actually set up user scripts this morning to do that, so it would restart/auto update in the wee morning hours.  Just "docker restart Valheim" worked as a user script :)    For me I did a custom schedule cron entry of "0 5 * * *" which means 5am, daily.

 

And I made some world changes, and then logged out and immediately restarted my Docker, and those changes were gone when I logged back in (just threw down some ladders as a test).   So I would say no, an immediate restart of the docker is NOT saving the world file.  I also tried it at about waiting 10 minutes, then restarting and looking for the changes/save.  But they were missing then as well.

 

That said, I waited about 30 minutes after I logged out, and restarted the Docker and went back in, the changes were preserved.  So I think it's more a matter that the server is auto-saving the world file every so often.  And that generally restarting the docker will not lose any changes/progress.  But that said, if you were just building or doing something, and the docker restarted immediately, some progress would be lost.   I'll update if I can figure out anything more specific in my trials :)

 

  • Like 1
  • Thanks 1
Link to comment
22 minutes ago, luckyy said:

I actually set up user scripts this morning to do that, so it would restart/auto update in the wee morning hours.  Just "docker restart Valheim" worked as a user script :)    For me I did a custom schedule cron entry of "0 5 * * *" which means 5am, daily.

Nice.

Yes this command would also work, just saw someting of stop/start/save... :D

Only thought if someone want's to build a simple script that saves the whole savegamefolder to a path on Unraid eventually compressed and delete the oldest backup after 10 backups are found... :)

 

24 minutes ago, luckyy said:

And I made some world changes, and then logged out and immediately restarted my Docker, and those changes were gone when I logged back in (just threw down some ladders as a test).   So I would say no, an immediate restart of the docker is NOT saving the world file.  I also tried it at about waiting 10 minutes, then restarting and looking for the changes/save.  But they were missing then as well.

So what is needed for this, is there a consle command, then I would rebuilt the container with screen and add the save command to the termination handler...

 

25 minutes ago, luckyy said:

That said, I waited about 30 minutes after I logged out, and restarted the Docker and went back in, the changes were preserved.  So I think it's more a matter that the server is auto-saving the world file every so often.  And that generally restarting the docker will not lose any changes/progress.  But that said, if you were just building or doing something, and the docker restarted immediately, some progress would be lost.   I'll update if I can figure out anything more specific in my trials :)

I think this will be solved or even can be set later if the game is more mature... :D

I'm not really the Discord guy but eventually you or someone else can ping the developers of the game about that that there would be something like a configuration file nice or if a server shutdown is detected that the game automatically saves the world.

Link to comment

@ich777 Seen a lot of back and forth about mods and the Ark container.
It took me a few searches and re-reads but if you just update your template with the two extra paths below everything just works out the box. When someone googles "how to add mods to linux ark" the official steps will work with your template.

 

/mnt/cache/appdata/steamcmd/steamapps

Container Path: /serverdata/Steam/steamapps

 

/mnt/cache/appdata/steamcmd/steamapps

Container Path: /serverdata/serverfiles/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps

 

Thanks again for all your hard work!

Also thanks to fellow ark players that worked out this pathing issue

 

  • Like 1
Link to comment
35 minutes ago, Dvonte93 said:

Can someone help me with adding mods to the arma 3 server I have tried everything and still unable to get it to work. 

 

-config=server.cfg -mod=/serverdata/serverfiles/@cba_a3

 

@cba_a3 | @cba_a3 | false | false | NOT FOUND | | 

 

Shouldn't there be a subdirectory to the mods?

Is this a mod that can run on Linux?

Link to comment

Valheim server doesn't work for me ;/ I tried your csgo server but that worked just flawlessly but valheim just keeps restarting.. I tried with verify installation true and false but that didn't change anything. I tried with my own steam account and also anonymoys one, no luck :(

Quote

---Checking if UID: 99 matches user---
usermod: no changes
---Checking if GID: 100 matches user---
usermod: no changes
---Setting umask to 000---
---Checking for optional scripts---
---No optional script found, continuing---
---Starting...---
---Update SteamCMD---
Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
---Update Server---
Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Success! App '896660' already up to date.
CWorkThreadPool::~CWorkThreadPool: work processing queue not empty: 1 items discarded.
---Prepare Server---
---Server ready---
---Start Server---
---Checking if UID: 99 matches user---
usermod: no changes
---Checking if GID: 100 matches user---
---Checking if UID: 99 matches user---
usermod: no changes
---Checking if GID: 100 matches user---
usermod: no changes
---Setting umask to 000---
---Checking for optional scripts---
---No optional script found, continuing---
---Starting...---
---Update SteamCMD---
Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
---Update Server---
Redirecting stderr to '/serverdata/serverfiles/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Success! App '896660' already up to date.
---Prepare Server---
---Server ready---
---Start Server---

 

 

Link to comment
18 minutes ago, fonex said:

Valheim server doesn't work for me ;/

Can you try to start over? Delete the container and also the directory for valheim that is created in your appdata directory.

 

Have you installed a cache drive? If so please be sure to set the it to use Cache Only or Preferr.

20 minutes ago, fonex said:

I tried with verify installation true and false but that didn't change anything.

Are you sure that you set the password to at least to 5 characters?

 

Eventually this post helps:

 

Link to comment

Using the Valheim template, and following a server update, I restarted the container, and the world reset.   

 

Anyone else experience this on container restart?   Im at a loss for what happened.   I do see a world db file that matches the world name I am using, but not sure if something else is occurring.

Link to comment
7 hours ago, ChillZwix said:

Still not possible for Space Engineers?

You can try to make a template on your own for that container but keep in mind that you sent over an archived repo.

In the repo is a notice about other containers that work and are currently maintained.

 

I try from time to time a Docker for Space Engineers but it is most of the time slow or even crashes after a few minutes and for me it's not worth the effort to maintain such an unstable container.

Hope that's understandable.

 

7 hours ago, hyperhtml said:

Using the Valheim template, and following a server update, I restarted the container, and the world reset. 

Did the whole world reset or only the last things you built/changed?

 

Have you a Cache drive installed in your server? Please make sure that you have Use Cache Drive set to 'Only' or 'Preferred' in the Share settings for the share where the folder forl Valheim is.

  • Like 1
Link to comment
9 hours ago, Dvonte93 said:

If someone could share their config I'm sure it would probably help me out. 

Maybe you could ask on the ARMA3 forums or in the sub forum for this mod since my container isn't anything else than if you run it on a bare metal so to speak on a dedicated Linux machine.

Link to comment
On 2/11/2021 at 10:00 AM, hyperhtml said:

Using the Valheim template, and following a server update, I restarted the container, and the world reset.   

 

Anyone else experience this on container restart?   Im at a loss for what happened.   I do see a world db file that matches the world name I am using, but not sure if something else is occurring.

 

Your database is corrupted (or your game world is less than 30 minutes old?) - Copy the .db.old file over the .db file (or restore from snapshot if you have one)  I had my database corrupt this evening as well.

 

edit: info below is redundant thanks to docker changes - Thanks @ich777

 

PSA: Retarting the Valheim docker does not save/close the database file gracefully.

 

The Valheim server only commits the worldstate to disk every 30 minutes, so you will lose up to this, or possibly corrupt the database.  You can confirm this by checking the datestamps on .db file at:

appdata/valheim/.config/unity3d/IronGate/Valheim/worlds

 

To restart the server gracefully, create a "User Scripts" entry with the following commands:

 

#!/bin/bash
pkill -2 valheim
ping localhost -c 3 >nul
docker restart Valheim

 

This tells the Valheim server to save/close the DB file before shutting down, and then restarts the whole docker.  I run this twice daily as the game is getting constant updates at the moment.

Edited by ConnectivIT
  • Like 1
Link to comment
26 minutes ago, ConnectivIT said:

To restart the server gracefully, create a "User Scripts" entry with the following commands:

I've implemented this now into the container and it should save the world now. ;)

 

So the script isn't needed anymore, a 'docker restart Valheim' or 'docker stop Valheim' is now enough.

 

EDIT: Please force an update of the Container on the Docker page in Unraid.

Also please edit your thread about that it doesn't save/closes the database, now it does. ;)

  • Like 1
Link to comment
18 minutes ago, SolidFyre said:

Trying to deploy a Valheim server.

I have no idea what is going on with steamCMD but why is totally hammering the Steam servers to the point where I get temp banned from steam due to excessive logins from my network??

It's doing multiple logins at the same time and just loops until I shutdown the container. Anyone?

First of all I've edited your post to not spam the thread and packed it in a file.

 

 

Have you set the password to a minimum length of at least 5 characters?

This looks like a instant crash after it tries to start, this usually happens when the password is too short.

 

Can you attach a screenshot from your template file?

Also please be sure to read the recommended thread at the top for Valheim.

 

EDIT: Tried it now from scratch and it works flawlessly Valheim.log

Link to comment
12 minutes ago, ich777 said:

First of all I've edited your post to not spam the thread and packed it in a file.

 

 

Have you set the password to a minimum length of at least 5 characters?

This looks like a instant crash after it tries to start, this usually happens when the password is too short.

 

Can you attach a screenshot from your template file?

Also please be sure to read the recommended thread at the top for Valheim.

 

EDIT: Tried it now from scratch and it works flawlessly Valheim.log

 

Thanks, I tried to put it in code field to minimize bloat, apparently that didn't work.

 

Yea, tried 5 characters for password, didn't work.

Appears the minimum is 6 characters, no digits. Now it starts flawlessly every time.

 

Thanks for pointing me in the right direction, been banging my head against the wall for hours :P

Maybe update that instruction to 6 instead of 5.

Edited by SolidFyre
  • Like 1
Link to comment
On 2/9/2021 at 2:21 PM, luckyy said:

Just thought I'd share my experience setting up a Valheim server with this docker app from @ich777(thank you!)

 

 

And thanks for the instructions. I've been running this docker with Valheim since Feb 4th, and it's been very stable. Here is my user script to backup World files; I have mine set to run at 03:30 daily. Note that your destination paths will be different, so make sure you update it to match your setup.

#!/bin/bash

# Create a compressed file archive as a backup for the Valheim server

today=$(date '+%m_%d_%Y__%H_%M_%S')
backup_path=/mnt/user/CA-backups/valheim_backup
source_path=/mnt/user/appdata/valheim/.config/.
backup_file=$backup_path/valheim_$today.7z

7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off $backup_file $source_path
# Keep only the 10 newest backups
ls -t $backup_path/*.7z | awk 'NR>10' | xargs --no-run-if-empty rm -f

 

Edited by [email protected]
Capitalizatoin correction.
Link to comment
10 minutes ago, SolidFyre said:

Maybe update that instruction to 6 instead of 5.

The problem is that some say that the password also can be only 4 characters long... I will try this in the next few days and update the description.

 

3 minutes ago, [email protected] said:

Here is my user script to backup World files;

Thanks for sharing. Really nice script. :)

One recommendation would be to add a line where you it only keeps the last 10 backups and if a new one is found that the oldest one is deleted. :)

There are many ways with ls -alt or find... :)

Link to comment
27 minutes ago, ich777 said:

One recommendation would be to add a line where you it only keeps the last 10 backups and if a new one is found that the oldest one is deleted. :)

There are many ways with ls -alt or find... :)

I'm not sure how long my gaming group is going to be on the Valheim kick, and at 16mb/day, I'm not overly concerned with storage. BUT you're right; it's good practice. I've edited the script to include a clean up action. Thanks!

Edited by [email protected]
  • Like 1
Link to comment

Hi, i'm trying to get the ark survival evolved server to work but all i can get is "unable to query server info for invite", the server shows up in steam but whenever i connect i just get the previous message. i'm using all default settings except the steam port is 27016 instead of 27015 and the RCON port is 27021. i did also try with the steam port as 27015 as a testing step but that didn't seem to fix it

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.