-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't recreate the entire server on restart #46
Comments
It doesn't though. This is where it checks if it is necessary to redownload. The only thing that is redownloaded on a restart is the SteamCMD binary updating itself. If you are finding that it redownloads every time, then you must be providing a new Volume every time. |
Well it starts off like this after I restart the server
After a few minutes of sitting there like that, it starts going into the verifying install state
This takes about 10 minutes on a 4GB 4vCPU locally housed server. |
docker-compose.yml in case you need it services:
server:
image: renegademaster/zomboid-dedicated-server:2.1.0
container_name: zomboid_server
ports:
- 16261:16261/udp
- 16262:16262/udp
- 8766:8766/udp
- 27015:27015
volumes:
- ./ZomboidConfig:/home/steam/Zomboid
- ./ZomboidDedicatedServer:/home/steam/ZomboidDedicatedServer
|
And there is absolutely no chance that the files it downloaded are being deleted? It only ever updates like that in two situations:
Also, this concerns me Are you running this a a |
I doubled checked while restarting and there was no evidence any files from
Docker runs as root by default and it doesn't appear that you've setup a non root user in the Dockerfile. This is indicated by the owner of the files in the folders themselves.
I checked and that file appears to be empty. |
Ah, they are all owned by Try to run the following: sudo rm -rf ./Zomboid*
USER_ID=$(id -u)
GROUP_ID=$(id -g) Then modify the version: "3.8"
services:
zomboid-dedicated-server:
build:
context: .
dockerfile: docker/zomboid-dedicated-server.Dockerfile
image: "docker.io/renegademaster/zomboid-dedicated-server:latest"
container_name: zomboid-dedicated-server
restart: "no"
user: "<user_id>:<group_id>" and try again. Then shut it down, and start it up again. Do not use sudo when running anything to do with this server. |
Was just working on that before you replied, however I get some interesting errors when running as non-root.
I've chown'd everything in ZombidConfig and ZomboidDedicatedServer. |
Also, I ran |
You have to delete the folders now. They belong to |
I don't mean to argue but i'm not inexperienced with docker or linux. And this image is not rootless. There is no
|
And if I try to run your cloned repo as
|
According to the README, your actions are supposed to be:
Can you please confirm that following those steps results in the same issue? |
This project previously included the If you really want to run it rootlessly, use Podman rather than Docker. This image does what it can to facilitate running as any user, but running it as |
I followed the instructions with a fresh clone of this repo. The following are the commands I ran in the order I ran them.
Here is the exact docker-compose.yml, only modified with version: "3.8"
services:
zomboid-dedicated-server:
build:
context: .
dockerfile: docker/zomboid-dedicated-server.Dockerfile
image: "docker.io/renegademaster/zomboid-dedicated-server:latest"
container_name: zomboid-dedicated-server
restart: "no"
user: 1000:1000
environment:
- "ADMIN_PASSWORD=changeme"
- "ADMIN_USERNAME=superuser"
- "AUTOSAVE_INTERVAL=15"
- "BIND_IP=0.0.0.0"
- "DEFAULT_PORT=16261"
- "GAME_VERSION=public"
- "GC_CONFIG=ZGC"
- "MAP_NAMES=Muldraugh, KY"
- "MAX_PLAYERS=16"
- "MAX_RAM=4096m"
- "MOD_NAMES="
- "MOD_WORKSHOP_IDS="
- "PAUSE_ON_EMPTY=true"
- "PUBLIC_SERVER=true"
- "RCON_PASSWORD=changeme_rcon"
- "RCON_PORT=27015"
- "SERVER_NAME=ZomboidServer"
- "SERVER_PASSWORD="
- "STEAM_VAC=true"
- "UDP_PORT=16262"
- "USE_STEAM=true"
ports:
- target: 16261
published: 16261
protocol: udp
- target: 16262
published: 16262
protocol: udp
- target: 27015
published: 27015
protocol: tcp
volumes:
- ./ZomboidDedicatedServer:/home/steam/ZomboidDedicatedServer
- ./ZomboidConfig:/home/steam/Zomboid/ |
Thank you for the log. I do appreciate the effort. This is odd. If you created the folder. Then you are doing everything right, and this is very strange. I'll try to run it fresh myself tomorrow on a VM, but I have to leave support for now. It's 00:20 🙂 |
I think you're confusing running docker "rootless" and running as a non root user in a container. They're different things and aren't interchangeable. The standard docker installation runs the docker engine as root which is fine in most instances. However running as root inside of a long running container is a security risk. I'm already working on fixing the non root user issue. Id gladly submit a PR if you'd like. Id be interested in the problems folks ran into running as non root. |
They run into the same issue. "Permission denied" for anyone that attempts to run this as "root". This image makes no mention of "users" anymore, in either this image, or the one it is based on. For the most part that works. In my own deployments, I either:
I would be interested in seeing how you would improve this situation though. It would be really appreciated if you have suggestions. If I can make this truly "rootless", I believe it would make it more compatible with K8S deployments also (which has been an issue in the past). |
Reinstalling the Project Zomboid files every time the container restarts takes a great deal of time. Is there a way to check if the server files need updating before reinstalling?
The text was updated successfully, but these errors were encountered: