Cannot Change JAR file for Balena MC Server (Raspberry Pi 4B)

I’m not sure if this is the best place to ask for help, but right now I am trying to setup a Minecraft Server on my Raspberry Pi using BalenaCloud following this article (https://www.balena.io/blog/how-to-create-a-minecraft-server-for-the-pi-4-with-balena/), and I am having trouble switching the JAR file from Paper to Spigot. I’m able to access my server’s files via WinSCP and replaced the paper.jar file with the spigot.jar file. However, I don’t know where the startup script is located so that I can change the startup java VM to spigot.jar instead of paper.jar. I tried running it through the terminal, with no success (it says the jar file could not be found). Am I doing this correctly or is there another way to change the JAR file?

Hi @ethanic17 and welcome to the forums.
May I ask you, why do you want to switch from Paper to Spigot Server?
Paper is a high-performance fork of the Spigot Minecraft Server that aims to fix gameplay and mechanics inconsistencies as well as to improve performance. Paper contains numerous features, bug fixes, exploit preventions, and major performance improvements not found in Spigot.

Regarding your question could you please try to download the jar file in the ~/server directory? I believe this is the right place to put it, but I haven’t tried this before, so please let me know if this works for you.

Georgia

Hi @georgiats, the reason I wanted to switch to Spigot was mainly because I wanted to implement a BungeeCord server in the future and connect the two, but I just found out that Paper also supports BungeeCord. For now I guess I’ll stick to Paper, so I replaced the Spigot jar I uploaded with the original paper.jar and it works again.

But in the future when I want to switch JAR files (like to BungeeCord or when I update to a future version of MC), would I still replace the JAR file? I tried dumping the new JAR file in the root (server directory) and it also didn’t seem to work.

Also this is off topic, but how would I allocate more RAM to the minecraft server? In Windows you would just change the java start code to as much RAM you would allocate, but since I can’t find the start script, would I have to implement it in another way? In the guide I linked previously it says to set DOUBLE_RAM to true. Would I add that as a device environment variable or is there a setting to change that? Sorry if I am a bit rusty at configuring stuff like this because this is my first time using Balena Cloud.

Hi @ethanic17, welcome to balena forums and nice to hear you are trying out this project on balenaCloud : )

I myself don’t have much knowledge about Minecraft or this setup specifically. Then I see this commit from the project’s author: https://github.com/AlexProgrammerDE/balena-minecraft-server/commit/f0a6a50f47293f02d721936bb909b8628ba83de7
Seems like originally the project was using Spigot.jar as well.

You could test out loading Spigot.jar instead of Papar.jar and change the references to see if it works. It’s best to raise such potential changes directly to the author in the Github repo. If this change is interesting to you, the chances are there would be other Minecraft players who would want them.

To answer your question. We see that this .jar file is downloaded as part of the start.sh script which is called in the Dockerfile here: https://github.com/AlexProgrammerDE/balena-minecraft-server/blob/5386f8e8d4c0047d57f26e56cb2e3d69ff452a55/mc-server/Dockerfile.template#L14

balena devices run containerized applications. All the files that the server needs are downloaded and prepared within scripts. So it’s easier to maintain and re-run the same application across various devices – since they all follow the same setup instructions. You could read more about Docker in our masterclass here: https://www.balena.io/docs/learn/more/masterclasses/docker-masterclass/
It’s better for you to update the setup instructions to replace the jar file for instance.

Finally, I see this section in the repository’s readme to configure the memory usage:

Hope these are useful.

I’ll try looking through the docs u sent and figure something out. I’m still a noob when it comes to balena cloud but thanks for providing the resources @gelbal.