How to Keep My Minecraft Server Running After Reboot?

0
3
Asked By GamerNinja42 On

Hey everyone,

I'm trying to set up a Minecraft server using the itzg/docker-minecraft-server image on my Ubuntu Server, but I'm having some trouble. Every time I reboot my system, the Docker container seems to disappear, and I don't want to lose my progress either.

So I have two main questions:

1. How can I make sure the Docker container restarts automatically when I reboot the server?
2. What do I need to do to ensure that my world saves properly so that I can continue where I left off after a reboot?

I'm still a bit new to working with Ubuntu Server, even though I come from an IT background, so I'd really appreciate any guidance you can offer! Thanks!

1 Answer

Answered By TechWizard99 On

To get your container to restart automatically, you can use the `--restart` flag in your Docker command. Setting it to `always` will ensure your container runs whenever your server boots up.

For saving your game world and making sure it persists between reboots, look into creating a Docker volume to store your Minecraft data. This way, your worlds will survive even if the container goes down.

CuriousCoder77 -

Got it! So if my original command is `docker run -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-server`, would I add the restart policy like this: `docker run -d -it --restart always -p 25565:25565 -e EULA=TRUE itzg/minecraft-server`? Just checking!

Related Questions

Raffle Ticket Generator

Sudoku Solver

Tambola Number Generator

Tambola Ticket Generator

UK Bingo Card Generator

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.