With some work, it is possible to run the Headless Server Software on ARM-based machines, such as the Oracle Cloud free tier.
Do note this page concerns aarch64
CPUs. If you are using a different kind of ARM CPU, those instructions will not apply and further steps will need to be taken.
Similarly, this page assumes you are using a Linux-based system.
Steps
Pre-requisites
Several pre-requisites are needed to run the Headless:
- .NET 8 SDK
- You will need this for
ilspycmd
- You will need this for
- .NET 9 Runtime
- ILSpy Command Line Tool (
ilspycmd
on most distributions)- You can install it using
dotnet tool install --global ilspycmd
- You can install it using
- Either SteamCMD or DepotDownloader to Download the headless
- SteamCMD is not officially supported on ARM
Downloading the Headless Server Software
SteamCMD
Downloading the Headless Server Software through SteamCMD is done as following:
steamcmd +force_install_dir /path/to/install \ +login YOUR_STEAM_USERNAME YOUR_STEAM_PASSWORD \ +app_update 2519830 -beta headless -betapassword HEADLESS_BETA_CODE validate \ +quit
DepotDownloader
Downloading the Headless Server Software through DepotDownloader is done as following:
DepotDownloader -app 2519830 \ -username YOUR_STEAM_USERNAME -password YOUR_STEAM_PASSWORD \ -branch headless -branchpassword HEADLESS_BETA_CODE \ -dir /path/to/install
Getting native libraries
The Headless Server Software needs a number of native libraries to function properly.
A set of libraries pre-compiled for ARM is available, courtesy of J4. More information is available on its website.
First, download and unzip the libraries:
wget https://i.j4.lc/resonite/libraries-arm.zip unzip libraries-arm.zip
Then copy the libraries to the directory in which the Headless Server Software is present:
find . -type f -exec cp {} /path/to/install/ \;
Finally, rename libfreetype
to ensure compatibility with the one needed:
mv /path/to/install/libfreetype.so /path/to/install/libfreetype6.so
SteamWorks.NET
Among the libraries needed for the Headless Server Software, SteamWorks.NET
is a special case as it is simply not available for ARM systems at the moment, due to the native library not being available for ARM. Failing to load the binding library will result in an exception that prevents Resonite from detecting types contained in FrooxEngine, which makes it enter a broken state later on when loading the world. This means the library needs to at the very least be loaded, even though it will fail initialization.
You will need to recompile it with the correct architecture, which can be done like so:
Create a de-compilation directory, then de-compile SteamWorks.NET to it:
mkdir decomp && cd decomp ilspycmd /path/to/install/Headless/Steamworks.NET.dll -r ./ -p -o .
Open the Steamworks.NET.csproj
with a text editor (nano
and vim
are commonly used), and edit the PlatformTarget
and PlatformTarget
tags so they match the following:
<PlatformTarget>x86</PlatformTarget>
And:
<PlatformTarget>AnyCPU</PlatformTarget>
You can then build the library using dotnet build -c Release
.
Once the compilation is finished, you can copy the built DLL library file to the headless location:
cp bin/Release/netstandard2.1/Steamworks.NET.dll /path/to/install/Headless/Steamworks.NET.dll
Launching the Headless Server Software
You can now launch the Headless Server Software like on x64-based machines:
dotnet /path/to/install/Headless/Resonite.dll
Modding
Modding is somewhat tricky due to lack of aarch64 linux support in MonoMod (used by Harmony), while there has been some effort put into Android and Apple Silicon support, it seems to have gone somewhat stale. Thankfully it seems like a combination of different arm64 branches rebased on a recent version of MonoMod works quite well, but it should be noted I have no idea what I'm doing and I've never touched IL or much of C# in my life, this is copy pasted code, use at your own risk.
To use it:
- Install RML itself as usual
- Download the thin version of Harmony from https://github.com/pardeike/Harmony/releases
- Download MonoMod from https://github.com/OrionMoonclaw/MonoMod-arm64/releases/ or build it yourself, and put it alongside 0Harmony.dll
Now your mods should be working.
Troubleshooting
If you are having any issues, please ask in the Resonite Discord, in the "Headless on ARM" thread (requires account).
Acknowledgements
Several people made running Resonite on ARM-based machines possible:
- Orion Moonclaw for helping and testing native libraries, janky arm64 MonoMod branch
- WattleFoxxo for compiling the information and writing the original version of this guide on Discord
- J4 for providing build processes and pre-compiled native libraries