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

fix the URL of the Thunderstore.io API call to get BepInExPack (fixes #665) #666

Closed a-sala7 closed 2 months ago

a-sala7 commented 4 months ago

Edit: For a temporary manual fix until this PR is merged and the image is updated, please check @erNail's comment here https://github.com/lloesche/valheim-server-docker/pull/666#issuecomment-2028473407

corbin-lounsbury commented 3 months ago

I have nothing meaningful to contribute other than to point out this is the "PR of the Beast" (#666) :P

a-sala7 commented 3 months ago

I had the same error. If I make a manual adjustment in docker container, according to the uploaded patch, the problem is solved.

Yes, full transparency; I had an error when trying to build the docker image, but I figured it either needed some configuration or had something to do with the fact that I'm on windows, and I was too lazy to troubleshoot that for a URL change😄

So I just docker exec'd into the container and edited bepinex updater with vim and restarted the container and boom, it worked.

The bepinex updater can be found in /usr/local/bin if you need to do this change temporarily until the image is updated with the fix.

Kiaos commented 3 months ago

Yea i changed the url to https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/ using vim and now my server works again.

andrewshpyh commented 3 months ago

Guys, can You push this commit to prod? I`m using CasaOS to run the server, changed link via nano, but still server stuck on this error, even after restarts of container\server.

corbin-lounsbury commented 3 months ago

Guys, can You push this commit to prod? I`m using CasaOS to run the server, changed link via nano, but still server stuck on this error, even after restarts of container\server.

As a workaround, you could pull the repo down locally, make the changes, and run docker build. It would give you a working version until the main repo is updated. All you would need to do is switch the image source.

TheStig022 commented 3 months ago

Please tell me in more detail how I can change the address? I can’t get access to BepInEx updater

UPD. I figured it out, all I had to do was google a little and with 0 knowledge everything worked out :)

Seanzuwu commented 3 months ago

Please tell me in more detail how I can change the address? I can’t get access to BepInEx updater

UPD. I figured it out, all I had to do was google a little and with 0 knowledge everything worked out :)

Can you please point me in the right direction? I'm struggling to figure this out, thanks.

UPD: I also fixed this myself, hurrah!

Tronceon commented 3 months ago

I apparently can't google as I can't locate the updater file to modify. Any clues to get me down the right path?

Seanzuwu commented 3 months ago

I apparently can't google as I can't locate the updater file to modify. Any clues to get me down the right path?

Hello!

The file is located in - usr/local/bin

then use vim or whatever you have installed to edit the file, if you don't have vim installed on the container you can

apt-get update apt-get install vim

firefox 28-03 1711626443
Tronceon commented 3 months ago

I apparently can't google as I can't locate the updater file to modify. Any clues to get me down the right path?

Hello!

The file is located in - usr/local/bin

then use vim or whatever you have installed to edit the file, if you don't have vim installed on the container you can

apt-get update apt-get install vim

Thank you for that info... I, in my true noob self, was looking for the container files within my portainer install images instead of running the container console.....

Works like a charm now.

Kiaos commented 3 months ago

is the maintainer gone or is he waiting till ashelands?

erNail commented 3 months ago

Can confirm that this fix works. For anyone looking for a workaround until this Pull Request is merged:

  1. Find the name/ID of your running valheim-server docker container

    docker ps
  2. Enter the filesystem of the running valheim-server docker container

    docker exec -it <VALHEIM_SERVER_CONTAINER_ID> /bin/bash
  3. Open the file usr/local/bin/bepinex-updater:

    vi /usr/local/bin/bepinex-updater
  4. Replace https://valheim.thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/ with https://thunderstore.io/api/experimental/package/denikson/BepInExPack_Valheim/

  5. Wait until the docker container tries to access the BepInEx URL again (I am not sure if this happens with the file change, or in regular interval)

a-sala7 commented 3 months ago

Thanks a lot @erNail, been wanting to write that but I was too lazy to be honest 😄

I'd like to add a bit of clarification on 4 and 5.

  1. To edit the url for utter vi/vim noobs such as myself, to fix the url you're gonna want to move the cursor to stand right before the "valheim" word and press D and then W twice (short for "delete word") to remove "valheim" and the dot from the url. Then write :wq and enter to save your changes.
  2. You'll just have to restart the container with docker restart <VALHEIM_SERVER_CONTAINER_ID>, for me the container simply sat idle and didn't do anything forever after encountering the bepinex url error.

Happy gaming

russwe commented 3 months ago

https://github.com/users/russwe/packages/container/valheim-server-docker

If you just need to pull a container and be done. More than happy to MR some of the changes/tweaks back if desired, and quite happy to shut mine down once the fix is in ^_^

aCursedComrade commented 3 months ago

Bumping for attention, can confirm this PR fixes the bepinex-updater issue

clarkent86 commented 3 months ago

Also confirming it works!

I built this and pushed it to my docker hub if anyone wants to use it: clarkent86/valheim-server

Mathiasduc commented 3 months ago

Can a reviewer have a quick look at this PR ?

Mathiasduc commented 3 months ago

Can a reviewer have a quick look at this PR ?

Does anybody beside @lloesche have review/merge rights ? Is this a solo project ?

Gyrofalcon commented 3 months ago

Im trying to change the url in bepinex-updater, and get Apr 12 17:12:46 supervisord: valheim-server DEBUG - [157] - Valheim Server is not yet downloaded - waiting 2024-04-12 17:12:49,842 INFO success: valheim-server entered RUNNING state, process has stayed up for > than 10 seconds (startsecs) Apr 12 17:12:49 supervisord: valheim-updater valheim-server: started Apr 12 17:12:53 supervisord: valheim-server DEBUG - [157] - Valheim Server is not yet downloaded - waiting

The last line repeats it self. The server can't be seen in the server list. If I update my container and setting BEPINEX to false, all is good.

Any suggestion?

Edit 17th of April. After much head scratching, my linux bistro didn't want to play with me anymore, so I had to scrap the VM and set up everything from zero. Very happy I have backups and documentation on my build, so it was a bit easier this time around. Now the edit works, and so do BepinEx.

Kiaos commented 3 months ago

I see him committing stuff on other things Not sure he cares about this project. He needs another reviewer incase something happens to him.

lloesche commented 2 months ago

@a-sala7 thank you for your PR!

Hey all, sorry for the late reply. I haven't played Valheim in over a year, so rarely check here. There are four other collaborators with commit access on this repo, but I guess they're in the same boat.

I'm open to adding additional active collaborators. Let me know if you have a good understanding of the components this repo is made up of (Docker, Go, Python, Bash) and I'll add you.

Again sorry for the delay.

a-sala7 commented 2 months ago

@lloesche of course man it's totally understandable, no worries. I'd honestly offer to join but I'm absolutely abysmal at the black magic that is Bash and "meh" at Go. 😂 Best of luck and thanks again for this image.

Mathiasduc commented 2 months ago

Thanks 👍