Project Zomboid

Project Zomboid

Stanke Jun 29, 2022 @ 7:19am
Arm64 Server Binaries - A Small Big Request
What is this post about?

We are attempting to run a Project Zomboid Server natively on an ARM64 Linux Server.
Thoughout this forum, since my original posting, we discussed and detailed our efforts and difficulties in doing so, specifically regarding the lack of ARM64 native support in SteamCMD (Which has proven to be the greatest point of failure on this endeavor) and some Java-specific issues which we can't control due being more related to the devs side (Not trying to throw them under the bus in any way).

Key Insights

1) SteamCMD Dependency
- That cute little thing has zero support for ARM64, which forces users to either use x86/x64 processor architectures or rely on emulation (Sometimes, nested emulation) - Which results in EXTREMELY degraded performance and compatibility issues.
- We have done a few Proof of Concepts which demonstrated feasibility, but their setups are overlycomplex, error-prone and very unstable.

But it runs. The computing power exists.
I wish Valve would aim a bit for Arm64 environments, we could embbed alot.

2) Java Compatibility
- Project Zomboid relies on Java (which was designed for portability) - but its current server execution is tied to x86/x86_64-specific checks and dependencies in its scripts (start-server.sh and some other moments during execution)
- Editing these scripts and using ARM-Compatible Java Versions (OpenJDK 19 for example) works but it has not been seamless.

But it also runs. The computing power is more than capable of.
I wish PZ Devs would release a Arm64 compatible version of their server - although I believe that they can't do that, unless SteamCMD is included (We all know why)

3) Efforts with Docker/VMs
- Running the server within emulated environments like QEMU is possible but resource-intensive and impractical for robust usage.
- Dockerized approaches with ARM64 layers are promising, but there are challanges with Java's architecture determination. There is a lot that needs to be improved in these tries.

But it does run. Played quite a bit and experimented alot with 300+ mods - taking a LONG time to bootstrap, running quite well but eventually crashing or constantly freezing when loading too many locations at once.

4) Community Attempts:

We have been trying to experiment with various solutions: symlinking folders, modifying scripts, manual tweaks and lots of odds and ends - Dyarven even posted a script in GitHub which automatizes the entire implementation. And it works quite well.

5) Devs response so far:

- Official Support for ARM64 Binaries for PZServer from the developers or SteamCMD from vale is UNLIKELY in the near term.

- SteamCMD is a SIGNIFICANT roadblock here, as multiplayer servers rely on Steam for player/license authentication and visibility.

Show your Support!

The more people we get to comment here, to test and try, to invent and modify - the more we can get responsible attention.

I truly believe that this can be benefical for Project Zomboid and its community as a whole - although I lack the technical dexterity at the moment to find solutions myself, I will continue to advocate for ARM64 suppoort and try to engage people on this effort.

Thank you all! You've been the BEST!


Originally posted by My Original Post:

-- Re-posting this on the correct category --
(If anyone is willing to help me make this work, I'm eager to learn and experiment!)

First of all: I KNOW! Project Zomboid _currently_ does not run under ARM Processors and therefore mimimi

The thing is:

The ARM architecture is getting more and more capable by the day - after I went to Oracle's presentation the other day on a business connect event in my city, I glanced and glimmered on the future possibilities for all kinds of people using low-cost and low-carbon-footprint solutions.

We live in an incredible era where people with no income like me can actually have a pretty decent computing power FOR FREE (or at low cost) - For example, you can get a Quad-Core 24GB RAM 200GB SSD with GIGABIT connection Server for ZERO COST in Oracle Cloud, this can be used for anything you want and scalability is at hand when you have something to make money with - just being creative.

In the last week I've spent entire days trying to figure out some sort of way of running a Project Zomboid Server on my ARM64-based server - and I've hit the same walls many others did:

SteamCMD has no ARM candidate (And apparently there are few to none discussions on this, and I wonder Valve don't give much of a crap to it anyways - at least not until it can be profitable) henceforth it cannot be used under ARM64 environment to get game's files.

Project Zomboid is in Java (yaaay!) but apparently it depends on stuff or it works in ways that whenever trying to run it on Arm64, Java can't define the architecture.

The only form that I can think of this working is via emulated x86 or x86_64/AMD64 environment inside the ARM64 (degraded performance expected - or not so much) using Box32 (I don't even consider 32-bit because of 4GB limitations) or Box64 (or even CHROOT - which I tried but my limited knowledge only took me to sucessfully emulate a Debian 64bit or 32bit environments which bugs out on SteamCMD because of errors I can't understand).

SO!

I've seen various people that want to have a private server to play on with their families or friends - or even a big server at reasonable cost - but they simply can't.

And I really don't understand why something that can stupendously run Forge/Fabric heavily modded Minecraft and even Valheims servers (And they done that on Raspberry Pis) to not be able to run a vanilla or even a modded Project Zomboid server.

I was able to run a Project Zomboid server on a late 2008 low-end Celeron notebook I had, and it fricking worked (slow as hell because of low CPU GHz and low RAM at 32-bit) and even on a early 2006 MacBook (A1181 if Im not mistaken) that also had struggles due low speed and memory - but the thing is: It worked. It could load mods, I could log in and kill zombies - the only big issue was chunk loading that was terrible due technical limitations of almost 20yo machines.

I am currently using all my spare time in Zomboid Modding and learning everything I can in order to contribute with the community and even some day get to do something nice for this incredible game. But I feel like I reached my patience limit on the ARM64 server issue - and my ignorance leaves me no other choice if not come here and hear so many reasons for "why not".

But I truly believe that incredible things can come when we look at those that most don't - and free servers that are given to the people, if capable, can generate more servers from the people for the people. I can see myself using my only free server and dedicating it to run a PZ server to test out my mods, maps, concepts and even running my own community with friends. I wonder if others would do the same, as I'm not the only one that enjoy this game so much.

So, if this ever reach out to the ones that are willing to help to make this possible - or even the ones that can make this possible - I hope that someday PZ can get to be run under Arm64 environment - even though I understand that the conglomerate of STEAM will need to make their platform to be there first, I know that many play this through GOG - I really wish PZ's devs would make this effort - even if its to explain the reasons "why not".

I believe in ARM as part of our current time and as an ideal ally in the future of computing - and therefore, in the future of gaming.

Until then, I ask: Why not?
Last edited by Stanke; Nov 26, 2024 @ 4:11am
Originally posted by makosski52:
I managed to run zomboid server on same Oracle's Ampere VM.Standard.A1.Flex shape (4 cores , 24Gb ram) server. And it is running pretty stable with ~230 mods.

I used Docker for running SteamCMD for ARM : https://hub.docker.com/r/teriyakigod/steamcmd
then after installing zomboid server files i ran "start-server.sh" file using FEXBash included in docker container.
I can make more detailed guide if anyone is interrested.

I am pretty sure it can be done without docker, just by installing FEX-emu but i haven't tried that.

Edit: i am gonna make it anyway: :praisesun:

1) You need to install docker: https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/

2) After installing Docker, use this command to pull docker image of SteamCMD i talked about earlier:
docker pull teriyakigod/steamcmd:arm64

3) After image has installed, you need to create docker container using that command:
docker run --entrypoint "/bin/sh" -p 16261:16261/udp -p 16262:16262/udp -it -u root teriyakigod/steamcmd:arm64

4) In that container you are logged as root, so you can install some text editor if you want it can be handy. And forward required ports:
# Open the ports sudo ufw allow 16261/udp sudo ufw allow 16262/udp # Reload the firewall to make the added rules go into effect sudo ufw reload
Then you login as user 'steam' and launch "steamcmd.sh" using:
FEXBash ./steamcmd.sh
and proceed to install zomboid server files using:
login anonymous app_update 380870 validate

5) After installation you can go to server files directory and run "start-server.sh" also using FEXBash.

If something is unclear or does not work then let me know.

Edit2: Common issues and fixes:

1)While trying to run SteamCMD.
"Unable to determine CPU Frequency. Try defining CPU_MHZ."
Open steamcmd.sh in text editor and add this line before
"cd "$STEAMROOT".
(2000 = 2 GHz) export CPU_MHZ=2000

2)If you have simillar error like here (server does not start) https://theindiestone.com/forums/index.php?/topic/47417-dedicated-server-on-linux-vps-jre-crashes/
Try editing the ProjectZomboid64.json file
Change the "UseZGC" line to "UseG1GC"
Then start the server again.
< >
Showing 1-15 of 75 comments
Stanke Jun 29, 2022 @ 9:54am 
By the way:

I found this >> https://hub.docker.com/r/renegademaster/zomboid-dedicated-server <<

But I have no idea how this works - people been commenting that this "docker server" can run in arm64 - but I've been trying and nothing been working. If you know how to do this, please help me out ;O
Stanke Jun 29, 2022 @ 10:18am 
And apparently this was done years ago on a even more simplistic ARM equipment:
https://theindiestone.com/forums/index.php?/topic/6823-running-build-25-server-on-arm-rpi/

(Obviously with older version of PZ - nevertheless: it was done before)
Stanke Jun 29, 2022 @ 2:03pm 
Update:

I found something that I'm currently trying now.
As per the below, someone had success running SteamCMD on Box86 via Schroot with a debian-armhf.

https://askubuntu.com/questions/1395178/running-steamcmd-on-box86-with-schroot-c-debian-armhf

https://wiki.dawico.de/display/WIKI/7+Days+To+Die%3A+dedicated+Server+auf+Debian+installieren

I'll try and hopefully this will work - I'm praying at this point lol
And talking to myself on a probably already dead post xD
Let me know if it does, im trying to accomplish the same thing using OCI’s ampere spec’d servers.
Stanke Jul 6, 2022 @ 10:52pm 
At this point I have given up.
Without ARM64-Compiled Binaries for Project Zomboid Server there is currently no way of executing this.
I tried everything I could, running it under SCHROOT and/or BOX86/BOX64 - at this point you can manage to run SteamCMD and Download the server Binaries but both Oracle Java and OpenJDK are unable to be used to execute Project Zomboid - In the past this was possible, but now, server-start.sh is a script that forcibly checks the version to be either x86 or x86_64/AMD64 Java - I WONDER if it can actually just be edited to run under ARM64 Java - however, I do not posses the knowledge to edit that .sh in order to do so - for now, I consider that only PZ's Devs can make this happen.

I REALLY wish they would do so, it would expand Brazil's player community alot as many players just won't multiplayer for lack of server or lack of computing power to run both client and server - but oh well. I'll leave this here.

Add me on steam and I'll let you know if I figure out anything
LowfatEnvelope Jul 7, 2022 @ 10:51am 
Hey guys! Funny this should get revived today, I just got this working this morning!
(To clarify this is on Oracle's Ampere VM.Standard.A1.Flex shapes)

My compute instance is in San Jose. I'm Mid-East US and get a ping of 80-110, and it seems to run just fine for me. It can take a bit on the initial asset load once you are visually in the game, but after that it seems good to go.

Important notes:
1. With only a couple mods it can take about 20 minutes to boot the server

2. I get occasional ping spikes, but I haven't noticed this affecting playability

3. I'm not sure how much performance is affected with other users on the server; haven't tested this much

4. This may not be a really viable way to host a server, but if it's your only option (since it is free) it'll probably work in a pinch as long as you don't throw anything too complex at it?


I'm planning on making a guide after I have my server setup more finalized, but if you want to poke around here's the general steps. Note this is quite time consuming and I'll be more specific when I make a guide for this process. Also this uses qemu-system (so you're basically going to be running a VM in a VM), and as such is a bit slow to do, but the server performance seems totally playable (I need to test more).

Also note this may not be best practice as I'm a total linux noob (but it does work, assuming I can get it so everything autoloads on server reboot and you don't have to keep your ssh sessions open), but here you go:

1. Set up oracle and allow project zomboid's required ports through a network security rule

2. Set up your compute instance (the one I made for zomboid uses 3 OCPUs and 20GB RAM, and a 80GB boot volume)

3. SSH into your instance and install qemu-system

4. Setup RDP (I used a guide for xrdp) so you can RDP into the desktop and not only use SSH https://www.youtube.com/watch?v=C0nxOZBo6Dw

5. Use qemu to make a .raw image file

6. Find a .iso you want to use (I used Ubuntu server since it's smaller than Ubuntu desktop)

7. Use qemu-system-x86_64 to launch the .iso and install it onto the .raw image you created. DO THIS WHILE RDP'd INTO YOUR ORACLE COMPUTE INSTANCE. You can probably use -nographic or -curses somehow, but after hours of trying to get that to work I was not able to, and that's why I ended up setting up xrdp

8. Follow the instructions to install Ubuntu server. Do not install openssh and do not use LVM when you get those prompts

9. After Ubuntu server is installed, close the qemu session (shut it down properly, not sure if it matters but I did just in case)

10. You're now basically set, and you can exit your RDP session now if you want to. It might be visually helpful to do the next steps while RDP'd but it's not required for sure

10b. run: tmux new -s sessionNameHere
->You can detach with ctrl+b + d after running qemu, and then close your ssh session and leave qemu running in the next step

11. use qemu-system-x86_64 to launch your .raw image you created (which now has Ubuntu server installed on it). This is the command I use for this step explicitly (if you are still RDP'd don't use -display curses):

qemu-system-x86_64 -drive file=name-of-your-file.your-extension-name,format=raw -m 16G -display curses -net nic -net user,hostfwd=tcp::2222-:22,hostfwd=udp::8766-:8766,hostfwd=udp::16261-:16261 -smp $(nproc)

12. If you're doing this through your SSH session and not RDP, give it a bit and launch another SSH session

13. SSH into your qemu VM with: ssh -p 2222 Name_you_made@localhost (Note that this may take a bit before you can as the qemu VM has to fully start up)

14. Follow the project zomboid dedicated server instructions for linux as normal and you should be golden. Before running your zomboid server, tmux again so that you can detach and close your ssh session while leaving the server up

If you have any questions or concerns just let me know, and I'll also update this as I have more information, and will post here when I make a more formal guide lol


Last edited by LowfatEnvelope; Jul 8, 2022 @ 11:18am
Stanke Jul 7, 2022 @ 3:15pm 
Oh my....

I'll try this right away! I'll come back soon!

Thanks SO MUCH in advance! This made my day!
FerLuis Aug 16, 2022 @ 8:50pm 
Did you try? Can you explain a little bit more or send a guide about the steps 5 to 7? I'm new to qemu in general
Stanke Aug 19, 2022 @ 10:09pm 
I did, it works! However, its really unpractical at this point - It only serves as PoC for comproving that Arm64 has what it gots to run PZ server - but with this technique, as we are "double virtualizing machines" just to make the processor run the java server, it takes forever to load (once it loads, the server runs fine! However, mods enabled will make loading times waay longer).

Its been a while now since I got this running, I don't rememeber all the steps by head, LowFatEnvelope might be able to help you with this throughly - I will come back to this once I have my Arm64 servers back on

But as a personal advice, its too frustrating and for now we should keep hoping for native Arm64 binaries.

However, if you really wanna try it - I might be able to help in a couple of days
LowfatEnvelope Aug 25, 2022 @ 6:57pm 
Hey guys! Sorry, I've been out of pocket as well lately. I do agree it's not worth the hassle unless you REALLY want to do it, or possibly if you just want a server for you and a buddy without many mods. I can try and write those steps out a bit better this weekend possibly though!

If you just want something headache free and just for a bit I'd recommend using the Google Cloud free trial/credits; you can have a server that'll handle whatever you throw at it for free (but only for about 3 months, after that it definitely would not be worth the cost). You don't have to use Arm64 though, so you can just follow the normal dedicated server instructions for linux to get it up and going
Last edited by LowfatEnvelope; Aug 25, 2022 @ 6:57pm
commenting to revive this thread, more relevant than ever. devs please compile arm binaries for the dedicated server
Last edited by Garry (Yup... From Garry's Mod); Oct 24, 2022 @ 9:36am
Stanke Nov 2, 2022 @ 12:22pm 
Small update:

Me and LowfatEnvelope were able to run Project Zomboid by emulating a 32-Bit Machine emulating a 64-bit Machine - It takes a long time for the server to bootstrap but it actually runs pretty well (Even though its double-emulating and with recently made software 86box and other kinds of cpu-emu for linux).

The thing is, the Proof of Concept was a succcess but it is not practical for most people.

Nowdays we have a great computing power with great connection for FREE and people can leverage this and even make their own game servers (as not everybody have good computer power at home to run both the game and server).

I understand many of the reasons why devs might have not done this, such as the fact that SteamCMD is not Arm64 ready yet (and might not be so soon).

Still, I kindly ask for the devs for an input on this - I understand that there are libraries dependencies etc... But I am sure that the community would gladly help with any issues on boarding this.

Even if its a big "No, we can't" it would be awesome to understand this better!

Thanks alot!
EL-S Jan 19, 2023 @ 7:34am 
Solid effort, but I'm positive there is a better way. Did anyone ever take a look at server-start.sh or the steam cmd binaries?
Stanke Jan 20, 2023 @ 8:30pm 
Its been quite a while since I`ve been investigating this and my current conclusion is that SteamCMD requires libraries which ARM64 currently does not support - not that it is not capable of running and doing everything that is needed, but just that Steam has not yet made SteamCMD progress towards ARM64 - which makes it very hard for Project Zomboid devs to (even if they wanted) to walk towards it - although, I know it is possible and the team can make native ARM64 binaries, however, that means No-Steam (and we all know that they won`t be doing that, because they got bills to pay as well).

Sum of it all: We need either Valve or Zomboid Devs to move towards ARM64 - it is possible and our PoC show that.

Anyone willing to takes matters into their own hands, its just a question of tweaking the JavaVM for the Zomboid Server (No-Steam) - or, finding a way to complie/make SteamCMD run in the ARM64 enviroment - after that, its just a question of configuring the start.sh

Nowdays, one of the biggest issues within communities is having enough PC power to run, play and manage big modded servers, or even small servers (but people can`t play and run server at the same time at ease).

I haven`t got time anymore to deal with any of this anymore, my life is in shackles xD
I really hope this get an update soon! It would really bring ALOT of players into because people would be able to run powerful servers for free and spare their PC processing so that they can simultaneously play (and bring their friends on!)
Alphanoobmeric Feb 1, 2023 @ 12:45pm 
@Stann0x
I recently setup Valheim on one of the Ampere instances. I believe that required implimentation of Steam on the server. I'll look up what I had to do and relay that back here.
< >
Showing 1-15 of 75 comments
Per page: 1530 50