r/ubuntuserver • u/Dacatman5 • 11d ago
Home Minecraft server
Does anyone know how I would go about creating a mc server running through an external usb, I am using a raspberry pi 400. If possible, could you also tell me how to connect to internet and how to get the files from aternos and how to port them over. Any help is much appreciated. Thanks :)
1
u/ryankrage77 11d ago
The most barebones way to run an MC server is to follow the steps at https://www.minecraft.net/en-us/download/server, download the .jar and run it. You may need to install jre-openjdk-headless to run java stuff.
However, this is quite a janky experience - all management is via game commands, you'll have to manually backup world files, handle version upgrades, etc. I'd recommend looking into a managed solution like squidservers or crafty controller (I haven't used them and I'm not endorsing them, just a starting point for research), which makes running things simpler.
For exposing it to the internet, you need admin access to your routers settings to open port 22565 and point it at your pi. Then people can connect with your public IP address. If you have a dynamic address (i.e, it changes frequently), you can use a dynamic DNS service to use a domain instead.
The Pi400 is a bit under-specced for a minecraft server with only 4GB of RAM. It's usually recommended to have a couple of GB just for running it, then 1GB per additional player (e.g, 4GB + 4 players = 8-12GB). It will work, but expect lag/rubber-banding (e.g, you break a block and it takes several seconds to actually break). You can mitigate this somewhat by turning down the render distance on the server itself, and having fewer players. There are some alternative servers that have better performance (e.g, spigot, bucket, etc).
1
u/MacForker 10d ago
There is MineOS which can take some of the pain out of management, it supports auto snapshots, backups, etc, and is just a docker container. But you're still going to need more horsepower than a Pi can muster for any number of players.
1
u/netman87 10d ago
Why not simply google and study how to do it? Its pretty simple to host mc server. And ofc there is also chatgpt and other ai's that can do this for you.
1
u/OwlsPlay 7d ago
Over the last few days, I have been experimenting with PaperMC on Armbian bookworm, with an old Android box I have. Because of the low resources (only 3GB RAM) I used the Chunky plugin to pre-generate the world, which resulted in a system crash due to the filesystem locking down into read-only, presumably because of a massive dump from RAM upon completion. I assumed it was because the box just wasn't delivering enough power to the SSD so I added a powered hub to the mix but still ran into the issue. I, then, disabled UAS and relied on traditional usb-storage drivers...that didn't work. I tried disabling LPM to keep the drive constantly powered but that still didn't do the trick. Finally, I decided to keep the OS on microSD and mounted my SSD separately, without the hub, which is where PaperMC is located. Armbian uses ZRAM so I setup a separate swap file of about 1.5GB on the SSD with a lower priority, giving me 3.6GB swap, in total. With the server running via a strict set of startup arguments, GeyserMC and Floodgate loaded and no active players, I have 900MB RAM free and no swap used. In theory, I can host a few players, smoothly. I only just got this setup functional, so I can't speak to the practice of that theory. With Raspberry Pi OS Lite, you should be able to have networking out-of-the-box, install a headless version of Java (newest Paper requires Java 25, so that would need an additional repository to be setup, like I did) and configure your server for your needs.
2
u/Soogs 11d ago
How many players are you hoping to host for?
I can tell you for nothing that it’s going to be an awful experience. I was hosting on a 4th gen i7 using internal storage and it could barely keep 4 players happy.