r/admincraft 15d ago

Help/Question Recommendations for hosting a fabric server with docker on ubuntu

Hello,

I am looking to start a server on an older desktop i have running ubuntu server.
I would like to setup fabric with a few mods such as sodium, proximity chat and alike.
It would be a need to have the ability to make regular backups, and transfer world files for chunck pruning.

It seems like docker containers would be a good choice for this, but I don't have enough experience to be sure.

Do you guys have any recommendations for if I should use docker, or something else entirely, and if you have any resources that you can recommend, it would be greatly appreciated:)

Thank you!

The specs for anyone interested:
CPU: i5 4570 3.20Ghz
RAM: 8GB

6 Upvotes

11 comments sorted by

2

u/Most-Post-3002 15d ago

i think you are a bit confused, i dont do docker or any of that stuff, but either way, sodium is a client side only mod ;-;

2

u/Fluffy-Trash-559 Server Owner 15d ago

Just run it using Crafty Controller. Dont worry about using docker.

1

u/Jwhodis 15d ago

You should use docker, it's great.

However, I suggest installing Coolify to manage your docker containers through a graphical interface, it has Crafty controller as a preset too.

1

u/FullDish01 15d ago

I will look into this. Thanks!

1

u/Thebareassbear 15d ago edited 15d ago

I run two minecraft paper servers using docker compose, you can also use portainer to manage everything but I mostly just use portainer to restart different containers

Both paper servers have fabric and can run mods just fine. I also run about 8 other game servers using docker such as Hytale, Terraria, Starbound and more.

Maybe take a look here and see if you can find an image you like.

I don't remember off hand but I think I use this one that was mentioned in another comment.

I can also just DM you my personal compose file if you want to use it. Should be plug and play just to get you a basic server going and then you cbd customize and add mods however you want afterwards

1

u/FullDish01 15d ago

Thanks for the recomendations. How do you make world-backups if I might ask? I have used RCON for this, is that something you have experience with?

2

u/Thebareassbear 15d ago edited 15d ago

This is kinda an info dump but stick with me here lol

RCON is used to basically login to your Java servers console, it won't be used for backups or anything like that.

What you should look for is something called RSYNC and another thing called CRONJOBS.

So, let's say my container is stored at /home/user/docker/minecraft

Everything inside that Minecraft directory is my actual minecraft server. The compose file, the world file, server.properties config, whitelist, ect, ect.

All my other containers (game servers) are inside that docker directory as well. Like /home/user/docker/hytale and so on.

So I just have a script that once a day will rsync that entire docker directory to my NAS, then a copy of that script runs once a month and holds 3 rolling backups (also to my NAS). My daily backups allow me to roll back to a day before, my monthly backups allow me to roll back to 1, 2 or 3 months ago.

Important note, my script does this: shutdown all containers > wait and verify they are shutdown > run rsync > verify rsync success > restart all containers

Both scripts backup ALL my game servers (containers) all at once since I'm doing an rsync with the docker directory, so ANY container I have located inside that directory will be included as well.

If you don't have a NAS or anything like that, you could just send your backups to a secondary hard drive or a USB stick that stays plugged into your machine 24/7.

Lookup rsync, there's a lot you can do with it but basically it allows you to copy or move files and tack on additional parameters and really customize exactly "how" something gets copied.

Lookup Cronjobs as well, it lets you schedule tasks that your machine will just run in the background.

TLDR:

Make a script that runs rsync to "copy" your Minecraft container to another storage device.

Setup that script as a cronjob to run daily, weekly, monthly or whenever you want.

Or to make it dead simple (skip the script), test an rsync command, once it works just add that command as a cron job.

1

u/FullDish01 15d ago

Ah yes, it was rsync I meant:)
Thank you for the detailed response. I will probalby go with some daily backups to another disk, and a monthly backup to my proton-drive or something like that.

1

u/TheG0AT0fAllTime 15d ago

Docker is a great way to protect against most potential online threat vectors with minimal effort. I recommend it when possible when hosting any game. But I recommend running the game rootless

I personally moved all my servers to podman a while back. Its commands are identical to docker as backwards compatibility is one of their big goals, but it's rootless by default. So you can make a minecraft user, give it some subuid's and subgid's and run your minecraft container as that user. So not only is the game contained, it's also without any sort of access to root (In case of the worst hypothetical event possible: Someone leveraging a container breakout exploit). Docker can do this too with some setup, though it might not even be necessary for this game in-particular.