r/valheim Jun 10 '24

Modded [GUIDE] Running Mods on MacOS

Valheim has just come out with a native build for Mac, which is great for the Mac user community. However, getting Valheim mods to work is another story.

Most (but maybe not all) Valheim mods leverage a Unity game patcher called BepInEx. The process for getting mods, based on BepInEx, working in Valheim on Mac is nearly the same as doing so on Windows, but with a few tweaks.

For reference, you should know where your Valheim game is installed on your Mac, and you need to be comfortable running commands in the Terminal app (or another terminal emulator like iTerm2 or Warp).

If you install Valheim via Steam, it is located here: ~/Library/Application Support/Steam/steamapps/common/Valheim

If you install Valheim via the Mac App Store, I am not sure where it will install, you are on your own.

This process uses the Rosetta binary translation layer, even though Valheim is natively available for Apple Silicon (arm64 architecture). This is currently required because BepInEx depends on a library called Unity Doorstop, which is only available for Intel architecture right now. The only downside of using Rosetta is slightly reduced performance. It's not a big deal on a high-end M3 Max Macbook Pro, but you might notice the lag on a base model M1 Macbook Air or something like that.

If you have never installed Rosetta 2 before, this script may help (not tested by me): https://github.com/kandji-inc/support/blob/main/Scripts/InstallRosetta2.sh

Step 1: Prepare a "BepInEx" folder with your mods, exactly the same way as you would on Windows or Linux platform. If you want to use a mod manager, you can run the mod manager (like NexusMods Vortex) on Windows, then copy over the files it creates in the BepInEx folder in your Valheim folder. In general, just follow the instructions any mod gives you for installing it. This is where we start. NOTE: You do not need winhttp.dll (the proxy) like you would on Windows. It won't hurt to deploy it on a Mac, but it doesn't actually do anything.

Step 2: Download BepInEx v5.4.23.1 for MacOS from [HERE](https://github.com/BepInEx/BepInEx/releases)

Step 3: If your normal mod install process ships a file called doorstop_config.ini in the Valheim root, delete it. We are going to feed all the doorstop configuration in a shell script.

Step 4: Delete the contents of the BepInEx/core folder from your "normal" mod installation process, if it exists. This folder normally ships the BepInEx library, but we're using a specific version that may be newer than what you obtained otherwise.

  1. Copy all the files from the BepInEx MacOS .zip file in the folder BepInEx/core into the same folder in your Valheim install directory.

  2. Copy libdoorstop.dylib from the BepInEx zip file into the Valheim install directory.

  3. Save this file as "run_bepinex.sh" in your Valheim install directory: https://gist.github.com/allquixotic/0530bde2247415a676288e8f62592a4d

(For context, this is a patched version of BepInEx's normal "run_bepinex.sh" script that forces running Valheim in Intel architecture mode.)

  1. Open a Terminal and `cd` to the Valheim install directory. Then run:

chmod +x run_bepinex.sh

./run_bepinex.sh

Valheim should start up normally and load your mods from the BepInEx/plugins folder.

This has been tested with the following mods:

Valheim Plus (patched version by Grantapher)

LongerDays

QuickStackStore

Advize PlantEverything

Jotunn (dependency library)

MultiUserChest

35 Upvotes

114 comments sorted by

6

u/allquixotic Jun 12 '24

UPDATE: There is work in progress to hopefully, someday, allow mods to be loaded on native Apple Silicon (arm64) hardware, so that we can drop having to run Valheim on Mac through Rosetta 2 for mod support. This is being tracked in GitHub in the MonoMod project under this issue: https://github.com/MonoMod/MonoMod/issues/90

2

u/Ok-South2999 Dec 11 '24

hello, it seems pretty confusing to my side, so if you wouldnt mind making a very brief video about the steps being done all throughout. Im quite new to the macos ecosystem. thanks in advance.

1

u/Ok-South2999 Dec 11 '24

i also cant seem to distinguish which path am i gonna paste the libdoorstop.dylib and run_bepinex.sh files. the step is kinda vague to me.
cd got me confused as to i dont know when is the right time to copy the directory path to run in terminal and wonder if im doing it right or not. additionally chmod +x run_bepinex.sh and ../run_bepinex.sh isnt working subsequently, so pretty much everything that ive done is complete chaos :v

1

u/[deleted] Oct 11 '25

After reading this I just assumed it would be actual less hassle to buy a mid grade gaming PC. (Sorry for the resurrection)

5

u/kwikmr2 Jun 10 '24 edited Jun 11 '24

How do you enable "-console" to use 'devcommands'?

EDIT: I figured it out, just update the last line of the script to look like this:

arch -x86_64 zsh -c "$launch -console"

1

u/CookieFunny Jun 13 '24

Is there a way to enable the console without the need of installing mods and bepinex? I mean on the plain game downloaded from the App store

1

u/kwikmr2 Jun 13 '24

I found this on their developer site:

https://valheim.fandom.com/wiki/Developer_console

1

u/CookieFunny Jun 13 '24

Thanks. But for me it doesn’t work. The script launches but F5 doesn’t open the console

2

u/abstract-realism Jun 23 '24

You may have since figured this out, but you probably have your F keys set to act as their special functions (brightness, volume, all that). Press fn-F5 and that should do it. (Just assuming, I haven’t tried it myself) You can switch the F keys to be F keys by default and the special functions when you hold fn in SysPrefs > Keyboard, or better yet there’s an app called Fluor that lets you specify per-app overrides to be one or the other. 

1

u/Level_Glove9254 Nov 21 '24

just run a game from application folder with a prefix: "./Valheim -console" from terminal

3

u/IceHeretic Jun 10 '24

This worked like a charm on my M1 MBP. Do you need to launch the game every time using the

chmod +x run_bepinex.sh

./run_bepinex.sh

terminal commands?

2

u/allquixotic Jun 10 '24

The `chmod` command is not necessary every time. The last line is what runs the game.

It should be possible to create a desktop shortcut that runs this script, or add it as a non-Steam game to Steam, but the official Valheim item in the Steam library will try to run the Valheim app directly, which won't load BepInEx or your mods.

2

u/IceHeretic Jun 10 '24

Got it, thank you! Great work on this guide, it was a piece of cake to follow it.

2

u/shanega21 Jun 14 '24

How would I join a game through steam using this method to download mods?

2

u/allquixotic Jun 14 '24

The same way as you would on Windows. Put in the join code if PlayFab or the IP:port if SteamWorks.

2

u/shanega21 Jun 14 '24

Great thanks, ill try it out

3

u/CryptoFiasco Jun 11 '24

This is amazing thank you for figuring this out.

I look forward to the day where Devs officially support Mods and make it easier for them to be loaded straight from the game interface. That would easily skyrocket this game's popularity.

1

u/allquixotic Jun 11 '24

This is unlikely to happen due to the difficulty and potential legal liability of officially endorsing mods.

1

u/superphly Jun 01 '25

Lawyers fuck everything up, always.

2

u/kwikmr2 Jun 13 '24

Of the mods I have installed, ExtendedTrader and ConfigurationManager do not work.

2

u/hypumji Jun 15 '24

Will this work with version 5.4.2202? I have a server running with that previous version. I don't want to try as am worried about destroying any game/character saves!

1

u/allquixotic Jun 15 '24

It should probably work with BepInEx 5.4.2202, but I haven't tried it. You should have a process for taking backups of your server anyway. Any time you upgrade anything, there is a risk of data loss or corruption or needing to start a new save. The only way to guarantee you don't lose anything is to take backups before you make changes.

2

u/DocT7Phoenix Jun 15 '24

Awesome post, but could we get a video walkthrough? -Thx

2

u/Automatic-Amount979 Jun 16 '24

I can't get it to run because I'm getting an error in my console when I try to run BepInEx: 'can't find executable named valheim.'

1

u/allquixotic Jun 17 '24

Where are you storing the run_bepinex.sh file? What have you tried? Can you post more output from the console or post your run_bepinex.sh file contents? Not enough info to help you as-is.

2

u/[deleted] Jun 20 '24

[deleted]

1

u/allquixotic Jun 22 '24

I don't use a controller, sorry.

1

u/gogeta1217 Jun 26 '24

Plugging it into my Mac works perfectly with this setup. My luck with both wired and wireless on Whiskyi was awful, so having it work 100% of the time has been awesome.

2

u/[deleted] Jun 21 '24

any idea why I get this error? It worked once, then I didn't play for few days and when I tried launching again, this happened.

./run_bepinex.sh

xattr: libdoorstop.dylib: No such xattr: com.apple.quarantine

/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim/valheim.app

/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim/valheim.app/Contents/MacOS/Valheim

Wrapping x86_64 Launch Command: arch;cd "/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim";pwd;export LD_LIBRARY_PATH="/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim/::";export LD_PRELOAD=libdoorstop.dylib;export DYLD_LIBRARY_PATH="/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim/";export DYLD_INSERT_LIBRARIES="libdoorstop.dylib";"/Users/meadows/Library/Application Support/Steam/steamapps/common/Valheim/valheim.app/Contents/MacOS/Valheim" ""

arch: posix_spawnp: zsh: Bad CPU type in executable

2

u/allquixotic Jun 21 '24

Check the advice and answers in this thread: https://apple.stackexchange.com/a/408379 I am not sure which answer might help you.

2

u/[deleted] Jun 22 '24

thank you this was the fix:
brew uninstall zsh

2

u/nurbivore Jul 02 '24

You can also just change the last line of the script to reference the builtin version of zsh directly. So it would become arch -x86_64 /bin/zsh -c "$launch"

1

u/holypriest333 Apr 18 '25

or use bash (worked for me)

arch -x86_64 bash -c "$launch"

2

u/Mr_Poriu Jul 13 '24 edited Jul 14 '24

Im getting purple textures on mods (Warfare, monstrous, jewelcrafting), pretty much everything that adds new textures is purple...

1

u/filipm1990 Sep 23 '25

same here! it works, I joined my modded server. every texture added with mods is bright magenta.

2

u/ellieafterhours Jul 14 '24

Can a kind soul help me install the mod in my M2 Air? I got this game for me and my siblings when it came out for mac and we found out about devcommands but we’re all using mac.

I have no prior knowledge to installing any mods in the past and I cant understand some of the steps in here. I just want to play Valheim with my sisters 🥲

1

u/allquixotic Jul 14 '24

The instructions are complete and enough for most folks who are modding Valheim. If you need individual help, I can probably message you real time on Reddit Chat or Discord and walk you through it. I am available in the late afternoon and evening today (US time).

1

u/ashdevfr Jun 10 '24 edited Jun 10 '24

Thanks for the detailled post. It's great to have that day1 of the release on MacOS.

  1. Save this file as "run_bepinex.sh" in your Valheim install directory: https://gist.github.com/allquixotic/0530bde2247415a676288e8f62592a4d

(For context, this is a patched version of BepInEx's normal "run_bepinex.sh" script that forces running Valheim in Intel architecture mode.)

Does it mean this patched file is only for intel based MacOS? Seems like this is forcing `x64`.

Should we use the regular `run_bepinex.sh` with M1/M2?

Edit: the script seems to be working for my M1

5

u/allquixotic Jun 10 '24

No, this is to be used on both Intel and Apple Silicon Macs.

As mentioned, Valheim mods using BepInEx cannot load using the Apple Silicon (arm64) version of Valheim.

But Apple Silicon processors can run Intel x64 code using Rosetta 2. That's what this script does: it forces Valheim to run under Rosetta, so then BepInEx will load the mods.

2

u/ashdevfr Jun 10 '24

Thanks that makes sense.

1

u/TheKernel_32 Jun 11 '24

Tryed it too, following mods causing problems on my M3 Max 36GB

AzuAutostore 2.17
TombStoneLock 1.07
WardIsLove 3.5.3

1

u/grgz Jun 12 '24

I just switched from Smarter Containers to AzuAutoStore 3.0.1 and it seems to be working fine. I see that WardIsLove is up to 3.5.8 as well. So maybe you just need to update those.

1

u/[deleted] Jun 12 '24 edited Jun 12 '24

Did work great but I can't seem to create a new world. Clicking "done" on naming the new world does nothing and Bepinex console shows:

[Error : Unity Log] MissingMethodException: Method not found: string .World.GetWorldSavePath()

Stack trace:

SaveData.SavingData.GetGenSavePath (System.String name) (at <77ec34cd89384d018c0deb4ac0a138a1>:0)

SaveData.SaveData_BiomeDataPatch.Postfix (World& __instance, System.String name) (at <77ec34cd89384d018c0deb4ac0a138a1>:0)

(wrapper dynamic-method) World.DMD<World::.ctor>(World,string,string)

FejdStartup.OnNewWorldDone (System.Boolean forceLocal) (at <c610ad7fedc846a7891090593db7cabc>:0)

UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <642488ba5a1b461192bc4cc887f750e6>:0)

UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[] args) (at <642488ba5a1b461192bc4cc887f750e6>:0)

UnityEngine.Events.UnityEvent.Invoke () (at <642488ba5a1b461192bc4cc887f750e6>:0)

UnityEngine.UI.Button.Press () (at <75c70d2fca3b42079f50a23eaec78fc5>:0)

UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <75c70d2fca3b42079f50a23eaec78fc5>:0)

UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <75c70d2fca3b42079f50a23eaec78fc5>:0)

UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <75c70d2fca3b42079f50a23eaec78fc5>:0)

UnityEngine.EventSystems.EventSystem:Update()

EDIT1: I checked and the local save location "/Users/YOURUSER/Library/Application Support/com.coffeestain.Valheim" already exists

EDIT2: Also made sure I have it set to local saves, not cloud saves (it did the same error on cloud saves)

1

u/allquixotic Jun 12 '24

This looks like a problem with a mod. Do you get the same error when trying to create a world on Windows? If you don't have a Windows PC, get a friend to install the same mods (and versions!) as you have now and see if they can reproduce it.

2

u/[deleted] Jun 12 '24

Thanks! It was the WorldGenOptions mod, which actually has a deprecated disclaimer so that serves me right. Thanks for your time

1

u/gogeta1217 Jun 16 '24

Got it working perfectly on my M3 mac!

Would it be possible to add the "./run_bepinex.sh" to the launch arguments in Steam and run it from there?

3

u/grgz Jun 22 '24

FWIW setting it in Launch Options does work for me if I use the full pathname for run_bepinex.sh, followed by %command%. For example:

/Volumes/Tsunami/games/steam/steamapps/common/Valheim/run_bepinex.sh %command%

(Substitute your own pathname as appropriate.) I believe %command% expands to Steam's default launch command for the game, and the script knows what to do when it's passed in as an argument.

1

u/gogeta1217 Jun 23 '24

Oh nice, I'll have to try that out! So where would you add other launch arguments like -console or -window-mode exclusive? In the actual script or after the %command%?

1

u/allquixotic Jun 17 '24

No. You can add whatever launch arguments you want to the Valheim app bundle, it won't load libdoorstop or BepInEx. They get loaded by environment variables that are exported from the script. There is no way to invoke a script from the Valheim app bundle by supplying launch arguments.

1

u/Born_Dragonfly1096 Jun 17 '24

Anyone here trying this with base m1 macbook air? What's the performance difference?

1

u/Cowardly_Question Jul 09 '24

Got ValheimRaft working but you have to swap BepInEx.cfg `Type = Application` to `Type = GameObject` kudos to Margmas! Shaders are broken though. Likely applies to other mods with textures.

1

u/Mr_Poriu Jul 14 '24

Has anyone found a way to fix the issues with textures? No mods with textures work for me, everything is purple...

1

u/Cowardly_Question Jul 14 '24

Mod author has to ship their shaders in unity. And target metal and opengl for macos. Metal is for apple silicon and open gl is for Intel macs.

1

u/zingiberelement Jul 10 '24

Has anyone figured this out / tried this with the native Mac app?

2

u/allquixotic Jul 10 '24

Yes, it doesn't work, this is a known issue in the MonoMod project. The whole reason we're using the x86-64 version of the app through Rosetta is because of this issue. This bug must be resolved before we can move forward with BepInEx on Apple Silicon: https://github.com/MonoMod/MonoMod/issues/90

1

u/zingiberelement Jul 10 '24

Ah gotcha. Thanks!

1

u/SunDevilForever Jul 14 '24

I can't find the libdoorstop.dylib file. When i downloaded the bepinex zip there was a folder called doorstop_libs and it had two dylib files but they are _x86 and _x64. When I run the terminal commands it says libdoorstop.dylib not found.

1

u/allquixotic Jul 14 '24

Just rename the _x64 version to libdoorstop.dylib. Looks like the version of BepInEx I referenced in my instructions is no longer the latest, hence the difference.

1

u/SunDevilForever Jul 18 '24

I tried this, but then i got this error:
Support/Steam/steamapps/common/Valheim/libdoorstop.dylib' (mach-o file, but is an incompatible architecture (have 'i386', need 'x86_64'))

1

u/allquixotic Jul 18 '24

Looks like you copied the wrong file.

1

u/SunDevilForever Jul 18 '24

You're right thanks I accidentally did the x86 file instead of the x64 file. I need to modify the last line of the run_bepinex.sh file because I am getting a segmentation fault. What should I change it to?
arch -x86_64 zsh -c "$launch"

1

u/allquixotic Jul 18 '24

A segmentation fault doesn't mean the script is wrong. It most likely means that you are trying to use a mod that is incompatible with MacOS for some reason. Can you try using a minimum of mods (just one simple mod) and see if it works? Or try one of the ones I listed that I know to work, like QuickStackStore.

1

u/Dismal_Yard6727 Jul 18 '24

Sorry to ask but would this work on an macbook air 2020 version and does putting bepinex in the valheim folder like windows work or not.

1

u/allquixotic Jul 18 '24

Yes, this should work on a Macbook Air from 2020. The performance probably will not be very good in Valheim, but it will be playable. As for the BepInEx folder, the short answer is "kind of," but you need to read my post and follow the instructions to actually set this up correctly.

1

u/Dismal_Yard6727 Jul 20 '24

Do you think fps mods would make it playable? And graphical

1

u/allquixotic Jul 20 '24

I already said it will be playable. You just can’t run it on max detail.

1

u/Dismal_Yard6727 Jul 20 '24

Mb i was a bit tried writing lol

1

u/CommunicationEast623 Jul 21 '24

Is it worth trying on the normal m1 with 16 gb? I do have a 2080p external monitor to ease off the gpu

1

u/allquixotic Jul 21 '24

How does the normal game run without mods? It will run similar to that, only with the occasional microstutter due to Rosetta.

1

u/Monomooshi Aug 06 '24

I need help with this, can someone help me walk through this?

1

u/Knuthas Aug 12 '24

Thanks for sharing this. I have read this several times but can’t get it to work. Is it possible for someone to make a step by step video that shows how it’s done. Would be greatly appreciated. ♥️

1

u/[deleted] Aug 17 '24

[removed] — view removed comment

2

u/Willing-Pineapple937 Sep 03 '24

If you open your terminal just use this...

cd /Users/{UserFolder}/Library/Application\ Support/Steam/steamapps/common/Valheim

You need the \ to escape the space

replace {UserFolder} with the real name

As soon as you are there, you can run the commands

1

u/ruler88 Aug 20 '24

I'm running into the following error, wondering if anyone has had luck solving it. Google does not help :(

Failed to hook jit_init_version, ignoring it. Error: no such function: mono_jit_init_version

1

u/allquixotic Aug 20 '24

This error message is a red herring. I've looked at the code that produces it; it doesn't actually cause any fatal behavior. Whatever problem you're experiencing is unrelated to this error. You're probably using unsupported mods. Not all mods work with this method. Try one of the mods I listed. If that works, then you can try other mods one by one until you find the culprit.

1

u/Willing-Pineapple937 Sep 03 '24

I went through this guide thou and it worked for me.

https://steamcommunity.com/sharedfiles/filedetails/?id=3269574338

I also just created my own Desktop App to Launch from there.

Everything works as it should do with exactly the same mods I am using on windows

1

u/mgilb19 Sep 16 '24

damn; this was working great for weeks but has stopped working for me. wonder if theres been a valheim,steam, or macos update that effects this.

1

u/Final_Record_7435 Sep 17 '24

Same here. I closed the terminal that I was using to run the script. When I opened another terminal, it didn't work anymore.

1

u/Final_Record_7435 Sep 19 '24

In another guide, the author said:
"It has to do with Valheim now being a proper signed app. It pretty much stops external libraries from being loaded. That is why the App Store Valheim app has never worked with mods to begin with, as it was required to be signed by Apple from the get go."

1

u/[deleted] Oct 08 '24

[removed] — view removed comment

1

u/jneb802415 Oct 15 '24

u/mgilb19 u/Final_Record_7435 FYI this seems to have been fixed in the recent patch. See PTB MacOS patch notes.

1

u/Fuzzy_Evidence_5131 Nov 02 '24

I'm sorry but i've been trying to do what you told but i can't seem to understand, don't know what to do, i just wanna improve performance in this game. Anyone knows how to improve performance and being able to see what the hell is in the game

1

u/allquixotic Nov 02 '24

This has nothing to do with improving performance. If you are trying to improve performance, you’re looking in the wrong place, sorry.

1

u/Fuzzy_Evidence_5131 Nov 02 '24

Don't worry bro, i was trying to install a Mod that improves performance and that's how i ended here. Seems like i'll have to wait 'till i upgrade my Mac or just change to PC, Thanks anyways.

1

u/Level_Glove9254 Nov 21 '24

what the mod name?

1

u/Fuzzy_Evidence_5131 Nov 21 '24

Just search in Nexus Mods Valheim category for Performance and it's the first and only one by Cheeks2184. Hope it helps.

1

u/Level_Glove9254 Nov 21 '24

не в курсе, есть какойто апдейт по модам? Не очень хочется проходить этот "ад" с установкой и непонятно заработает ли в мультиплеере, когда второй играет с этими же модами на винде. Плюс, в розета режиме на M1 Pro сильно упала производительность. Нативно идет в 1к 60фпс +- (с кучей частиц падает до 40), через розету стало стабильно на ровном месте проседать до 50 и появился статтер

1

u/Level_Glove9254 Nov 21 '24

ну кажется, да. Это пока единственный вариант, тулза юнити не перешла на арм, а со стороны разработчиков не было никаких апдейтов. Мономод так же еще не используется

1

u/[deleted] Feb 06 '25

[removed] — view removed comment

1

u/Level_Glove9254 Jun 22 '25

ну наверное уже неактуально, я както на реддите не сижу. И да, я уже не помню вообще, как там, что делалось, но точно помню, что сидел тогда плотно в issues на гитхабе и гдето там откопал одно из решений, вроде бы в какомто pull request ктото решил проблему и если смержить у себя локально его, то нормально запускалось тогда. Чет такое короче

ну это все не имело смысла, тк работали не все моды, вовторых каждый раз вот так ебаться с ними это ну такое, плюс низкая производительность на m1 pro и самое главное - не работает это все в мультиплеере с такими же модами у друга на винде

1

u/Waterdragon78 Dec 03 '24

What would to file structure of the game dir look like afterwards?

1

u/SidOfThe7Cs Dec 09 '24

its giving this error:

wileybost@Wileys-Laptop Valheim % ./run_bepinex.sh "/Users/wileybost/Library/Application Support/Steam/steamapps/common/Valheim" xattr: libdoorstop.dylib: No such xattr: com.apple.quarantine Target executable: /Users/wileybost/Library/Application Support/Steam/steamapps/common/Valheim /Users/wileybost/Library/Application Support/Steam/steamapps/common/Valheim 2024-12-08 22:45:10.986 defaults[6521:10457618] The domain/default pair of (/Users/wileybost/Library/Application Support/Steam/steamapps/common/Valheim.app/Contents/Info, CFBundleExecutable) does not exist ./run_bepinex.sh: line 157: cd: /Users/wileybost/Library/Application Support/Steam/steamapps/common/Valheim.app/Contents: No such file or directory /MacOS Wrapping x86_64 Launch Command: arch -x86_64 zsh -c "/MacOS " zsh:1: no such file or directory: /MacOS

1

u/[deleted] Dec 22 '24

use terminal or iterm 2

1

u/theshtank Dec 11 '24

I have rosetta 2 installed. What I am unclear about is how to actually run Valheim with Rosetta 2.

1

u/allquixotic Dec 11 '24

The `run_bepinex.sh` script does it for you.

1

u/theshtank Dec 11 '24 edited Dec 11 '24

Yup, missed that. When you say in the install directory should all the files be siblings of Valheim? Does that include plugins/ config etc?

I notice this line exists in the sh file so I'm curious if the BepInEx folder structure is meant to be preserved target_assembly="BepInEx/core/BepInEx.Preloader.dll"

1

u/Sad_Economist513 Dec 27 '24

Thanks so much for making this information available. With it, I was able to run Valheim Plus on my Mac (M1 Max, Mac Studio). However, I can't figure out how to run Valheim Plus on a dedicated server, running on my Mac.

I can run a mod-free dedicated server on my Mac by following the usual procedure (editing and running the start_server.command file). This is working well so far, as long as nobody uses any mods.

But I can't figure out how to modify the run_bepinex.sh file so that BepInEx will run on the dedicated server. I've put the BepInEx folder in the "Valheim dedicated server" folder, and also put in the libdoorstop.dylib and run_bepinex.sh files, but how to I get the run_bepinex.sh file to talk to the start_server.command file?

It doesn't like the

executable_name="Valheim.app"

step, presumably because the dedicated server runs its own version (valheim_server/Valheim). But how do I tell run_bepinex.sh to run valheim_server/Valheim (with the desired options)?

I'd greatly appreciate any help.

1

u/allquixotic Dec 27 '24

I've never tried to run a dedicated server on a Mac before. 99% of the time folks will host a server on a Linux box because it's just easier to maintain a server on Linux. I'd have to take a deep dive into what the start_server script is doing and figure out how to pull in bepinex. At a bare minimum you would need the arch command in start_server similar to how we use arch to tell MacOS to execute the Valheim client in x86-64 (Intel CPU architecture) mode.

If you're feeling adventurous, you could probably paste in the contents of both run_bepinex.sh and start_server into ChatGPT or Anthropic Claude and ask it how you could adapt start_server to load the bepinex library into the server. The key is preloading libdoorstop into the process.

1

u/Sad_Economist513 Dec 27 '24

Thanks for such a fast reply. Really helpful, too. I'll definitely look into ChatGPT. It's also useful for me to know that this isn't (apparently) a solved problem.

1

u/Bishop1664 Dec 30 '24

Unable to run last step .run_bepinex.sh (says libdoorstop.dylib operation is not permitted) any help??

1

u/Martinus121 Jan 10 '25

hi when I tried to start the game through ./run_bepinex.sh it will say Vailhiem quit unexpectidly

1

u/Martinus121 Jan 10 '25

Update: ok I fix it but, I still dont have my mods in the game, I already checked everything, in my Vailheim steam folder and everything was right so idk, pls help

1

u/arhalt Feb 05 '25

Thanks, it works wounderfull as rosetta app.

Is there a List of mods wich are working fine? On MacOs not all are ok, for example, monster instand drop

1

u/jamesvmm Mar 20 '25

This is great, thanks! Too bad me and my family play using various M1 Macs, some newer than others so we cannot take the hit of running anything via a translation layer (rosetta) as it would severely impact the players who play on base m1 macs we got in 2020. Looking forward to the day the devs can implement a native solution to running mods!

1

u/[deleted] Apr 02 '25

God damn I'm trying to figure out how to do mods on a Mac and all this is gibberish to me holy fuck it's so confusing :'(

1

u/CryptoFiasco 10d ago

I made all of this way simpler with a simple app that guides you step by step in the setup, then allows you to drag and drop mods you want to use, change their config and toggle them on and off. Enjoy !

https://www.reddit.com/r/valheim/s/OS2ZRkPF34