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

SERVER_ARGS not passing. #641

Open prime001 opened 10 months ago

prime001 commented 10 months ago

valheim-server line:112 need to update $SERVER_ARGS to "$SERVER_ARGS".

This fixed it for me! I couldn't get Crossplay to work because it wasn't passing the arguement.

lloesche commented 9 months ago

The problem with "$SERVER_ARGS" is that you can then only pass a single arg. Since everything inside the quotes is handled as one argument. The quotes are deliberately left out here so that you can pass more than one arg to the server. Ideally we'd use an array, but since these variables are coming from the environment that's not an option.

prime001 commented 9 months ago

That makes sense but for what ever reason the server_args aren't being passed through until I put them in quotes.. So maybe something else is broke?

On Mon, Sep 25, 2023 at 7:08 AM Lukas Lösche @.***> wrote:

The problem with "$SERVER_ARGS" is that you can then only pass a single arg. Since everything inside the quotes is handled as one argument. The quotes are deliberately left out here so that you can pass more than one arg to the server. Ideally we'd use an array, but since these variables are coming from the environment that's not an option.

— Reply to this email directly, view it on GitHub https://github.com/lloesche/valheim-server-docker/issues/641#issuecomment-1733450141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFQCKVA23A6PQYYI37VZDX4FQ33ANCNFSM6AAAAAA47CPNUI . You are receiving this because you authored the thread.Message ID: @.***>

blaklabz commented 7 months ago

aye i have a question in the same vein, how do i pass multiple varriables is it server_args= "-preset blah1","-modifier blah1" or each has to have server_args=?

blaklabz commented 7 months ago

aye i have a question in the same vein, how do i pass multiple varriables is it server_args= "-preset blah1","-modifier blah1" or each has to have server_args=?

So figured this out, -e SERVER_ARGS="-modifier combat veryhard -modifier raids muchmore" just incase anyone else was trying to figure this out

Pablizzo commented 3 months ago

Sorry to revive this thread, but I seem to be having issues with multiple args in my .env file where only the crossplay & portals are being applied. Any help would be truly appreciated and thanks for the awesome write-up!

My file looks like SERVER_NAME=Server WORLD_NAME=World SERVER_PASS=password SERVER_PUBLIC=true SERVER_ARGS=-crossplay -modifier Portals casual -modifier deathpenalty easy -modifier raids none -modifier Resources muchmore -modifier Combat easy BEPINEX=true