lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.89k stars 269 forks source link

Cannot run docker image #671

Closed fizch closed 2 months ago

fizch commented 2 months ago

Following the setup instruction on a clean ubuntu 22.04 install, I cannot get the docker image to run. Using the systemd and docker method, I was not getting any feedback after starting valheim.server. The image did not get pulled and I could not see any explanation, so I pulled the image down manually using the information from the valhem.service file. Then I manually executed the docker run statement and I am getting "no such file or directory" for /etc/sysconfig/valheim-server. The file exists in the specified location. Any help here would be great.

/etc/sysconfig/valheim-server

SERVER_NAME=my.servername.tld
SERVER_PORT=2456
WORLD_NAME=My World Name
SERVER_PASS=supersecret
SERVER_PUBLIC=true
SUPERVISOR_HTTP=true
SUPERVISOR_HTTP_PASS=supersecret
SUPERVISOR_HTTP_USER=mostlysecret
SERVER_ARGS=-crossplay

docker run command: sudo docker run --name valheim --pull=always --rm --cap-add=sys_nice --stop-timeout=120 -v /etc/valheim:/config:Z -v /opt/valheim:/opt/valheim:Z -p:2456-2458:2456-2458/udp -p 9001:9001/tcp --env-file /etc/sysconfig/valheim-server ghcr.io/lloesche/valheim-server

fizch commented 2 months ago

It turns out that the problems I was facing were caused by using the snap install of Docker. I had to uninstall the snap version and install docker from apt.