Тёмный

Minecraft Server in Docker - How to Setup/Backup/Restore your Minecraft Server 

Raid Owl
Подписаться 100 тыс.
Просмотров 110 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 97   
@meatpixel256
@meatpixel256 Год назад
Thank you. You are the only place I was able to find out how to access the server command line in docker.
@neo924
@neo924 2 года назад
I'm new with docker but your demo was very helpful and easy to understand, thank you very much !
@HecUnderscore
@HecUnderscore 2 года назад
if you're using plugins, i would recommend NOT using Bukkit, instead use either Paper or Spigot. Spigot is based on Bukkit and provides better plugin support than Bukkit, and Paper is a more optimized version of Spigot. also, if you set EXEC_DIRECTLY=true as an environment variable and enable tty and stdin_open support, you can instead attach to the server (docker attach {container} or click the attach button in portainer) and get a more useful console.
@RaidOwl
@RaidOwl 2 года назад
Dope! Thanks for tips homie
@dustind9242
@dustind9242 Год назад
Thanks... I'm running this on an Orange pi5. My kids are stoked!
@nightseer1663
@nightseer1663 2 года назад
There may be some people who don't realize this. I just started doing this myself, so I didn't. The .yml file cannot have the TAB character in it, you have to use spaces. I got the best luck just using a single space in place of a tab, as opposed to four like you normally would if you can't use tab.
@DragoSpiro98
@DragoSpiro98 Год назад
Use Visual Studio Code and Docker plugin and you can use tab. The plugin checks for you
@joea2484
@joea2484 Год назад
Also, the Yaml Lint plugin helps a lot with any YAML syntax and spacing errors
@randoguy7488
@randoguy7488 Год назад
In VSCode you can also just press F1 (Or Ctrl+Shift+P) and type "convert". Two options should pop up, one to convert Spaces to Tabs and vice versa
@Wing_Nite
@Wing_Nite 8 месяцев назад
This video saved me 7+ years of pain.
@chumakov
@chumakov 2 года назад
As someone who si really new in having a home server, I learned a lot with this video. Thank you
@iamabes1
@iamabes1 Год назад
This is great stuff, thank you for this. Clearest explanation I've found yet. Any thoughts on how to extend this to backing up multiple Minecraft server containers, and how to add steps to stop the containers before backing up, and then resuming them once the backups are complete?
@iamabes1
@iamabes1 Год назад
Answering my own comment, after some experimentation I added the following to determine whether the server is running or not, and send some Rcon messages to the players to let them know what's happening: # Stop container if it's running CONTAINER_RUNNING=0 if [ "$( docker container inspect -f '{{.State.Running}}' ${CONTAINER} )" == "true" ]; then CONTAINER_RUNNING=1 echo "Container ${CONTAINER} is running, stopping before running the backup..." docker exec ${CONTAINER} rcon-cli --password xxxxx "say 5 Minutes: Just letting you know this server will stop briefly in 5 mins in order to do a backup, it will come back up again after a few minutes. You can carry on playing right up to the point the server shuts down, you don't have to log out." sleep 240 docker exec ${CONTAINER} rcon-cli --password xxxxx "say 1 Minute: Just letting you know this server will stop briefly in 1 minunte in order to do a backup, it will come back up again after a few minutes. You can carry on playing right up to the point the server shuts down, you don't have to log out." sleep 60 docker exec ${CONTAINER} rcon-cli --password xxxxx "say Ok, stopping the server now, should only take a couple of minutes..." sleep 5 docker stop ${CONTAINER} echo "${CONTAINER} stopped, backup starting" else echo "Container ${CONTAINER} is not running, moving straight to backup" fi The point of the 'echo' lines it to capture the output in the backup log referenced on the crontab task. I also added the following to restart the server, if it was running in the first place: # Restart container if it was running before the backup if [[ $CONTAINER_RUNNING = 1 ]] ; then echo "Backup finished, restarting container ${CONTAINER}..." docker start ${CONTAINER} else echo "${CONTAINER} wasn't running before the backup, leaving in down state" fi I created multiple crontab lines to run the backups for each of the servers (currently 5 separate servers, of which 1 or 2 will be running at any one time).
@daveforrester126
@daveforrester126 17 часов назад
Great video, just wondering if there is a way to update the server to the latest release?
@TripOnSpot
@TripOnSpot 2 года назад
“Hell yea let’s do it” Was so good
@DamoclesMedia
@DamoclesMedia 2 года назад
For those who didn't notice it's: docker-compose up -d --force-recreate
@0xfourfive
@0xfourfive 2 года назад
if you specify a filepath instead of a volume, will the script fail? I don't currently have a volume setup for the server I am running
@lutherkhantuter
@lutherkhantuter 9 дней назад
Is this strictly for java or can i use it for bedrock as well
@MR.Peanut2
@MR.Peanut2 Год назад
Don’t know if someone else asked but how do we make a modded server?
@donkey7921
@donkey7921 2 года назад
Did you not need to do the -e MEMORY=2G command to make the server use more than the default 1G? I can't for the life of me get the stupid docker working and the truecharts version has no memory settings. other than the normal resource settings all truenas scale apps have, which I don't think have anything to do with the minecraft server settings/ launch parameters.
@EyeFullBlooD
@EyeFullBlooD Год назад
I'm in a similar predicament, did you manage to figure this out, cause im kinda stuck atm.
@silverfishseagrass
@silverfishseagrass 2 года назад
Unfortunately in my case the backup script didn't create the zipped docker volume. It didn't throw a error but also wouldn't create the .tar backup file. My quick workaround was to modify the if statement where the $ALL variable is checked for true and then the list of volumes is created. I changed the if statement from "if $ALL ; then" to "if [[ $ALL == true ]] ; then". This fixed my problem and created the .tar backup. I only tested the script for one specified volume but not for the case where you want to backup all volumes.
@TheDarkextasy
@TheDarkextasy Год назад
nice that made me crazy. when i execute the docker run command manual the .tar file was created. But when i run the script it didnt work. Now its working. Thank you.
@Scooter_213
@Scooter_213 4 месяца назад
Thank you mate you fixed my same issue
@wcellon
@wcellon 7 месяцев назад
Thanks for the video. I set this up last week and it has been running great. I am new to Docker and was wondering why the name of the container is "minecraft-minecraft-1"? Note that apparently Docker now uses dashes instead of underscores. Is this because we didn't give the container a name? I would like it to be just "minecraft" for ease of typing. After watching this video, I also setup a Terraria server and it did the same thing. It is named: terraria-terraria-1.
@RaidOwl
@RaidOwl 7 месяцев назад
Yep you can add the name in your compose file
@OschannelDotCom
@OschannelDotCom 2 года назад
Great Content.. Keep up the good work..I'm gonna try this for sure ..
@walter77gamer
@walter77gamer Год назад
One question you have do one or two volumes because of plugins
@gabezerbe9092
@gabezerbe9092 Год назад
Hey this might be a dumb question but when trying to install plugins I'm getting an mc-image-helper error saying "Failed to sync and interpolate /plugins into /data/plugins : plugins/plugin-name.jar" Is there anything I need to do with folder/file permissions to make sure this works properly?
@MrAdamseslar
@MrAdamseslar 6 месяцев назад
How do you go about making this multiplayer as in someone outside of your home playing?
@gannonbest7251
@gannonbest7251 2 года назад
Thank you I'm using pterodactyl and couldn't figure out how to access my minecraft folders to change mod configs appreciate you
@freakshowboy9
@freakshowboy9 9 месяцев назад
when the script backup the server, does it create the backup while the server is live or during reboot? if live, i believe it can create issues with the server map files
@romeo2417
@romeo2417 6 месяцев назад
How would the performance be in a windows docker system with 4gb ram capacity? My users connect via their nintendo switch or ios. Is bedrock server system still available today?
@virtualink5
@virtualink5 2 года назад
Running Java Minecraft so soon after the Log4j vulnerability release. I too like to live dangerously.
@RaidOwl
@RaidOwl 2 года назад
It’s running in the same VLAN as all my Nic Cage fanfics…we’re safe
@uniqueprogressive9908
@uniqueprogressive9908 2 года назад
The vulnerability is patched
@TheBinklemNetwork
@TheBinklemNetwork Год назад
Attempting to help a friend who followed this guide, how does one access the volume created (or volumes in general) by this guide? While I have years of server experience, I never touched docker. I've looked at a handful of docker docs and don't actually understand how to access the volume created in this guide
@RaidOwl
@RaidOwl Год назад
Check in /var/lib/docker/volumes on your host
@TheBinklemNetwork
@TheBinklemNetwork Год назад
@@RaidOwl cheers, I think we checked there (will check again) is there a way to force recreate the volume? Edit: we checked again and the directory doesn't exist. He can take the file tree down to /lib/
@wcellon
@wcellon 8 месяцев назад
@@TheBinklemNetwork You can do: docker volume inspect minecraftdata to see the path
@TheBinklemNetwork
@TheBinklemNetwork 8 месяцев назад
Thanks! ​@@wcellon
@gumshoe-tech
@gumshoe-tech Год назад
thanks for the Minecraft vid, I just setup Minecraft on ubuntu, I should have watched this first! now to setup minecraft on docker, Glad you got married.....
@GrahamMessadieh
@GrahamMessadieh 2 года назад
Is there a way to connect to the server off network and on consoles?
@oSpecialx
@oSpecialx 6 месяцев назад
Thank you
@phillipmartinez583
@phillipmartinez583 2 года назад
Thanks nerd. Kids are gonna love the Xmas present.
@RaidOwl
@RaidOwl 2 года назад
Hard mode for sure
@desocietate9135
@desocietate9135 Год назад
Very good. This video is very good
@YHK_YT
@YHK_YT 6 месяцев назад
I can’t scp for some reason it just says something about no permission, I then tried from the same machine to scp it and it didn’t work either I changed the ssh to disable inheritance and I still couldn’t ssh to it (maybe from the other machine? I don’t think It has open ssh) I’m so confused
@Baezor
@Baezor 4 месяца назад
"it doesn't seem that running a Minecraft server really too hardware intensive" ... me allocating 20gb of ram so my network doesn't implode over here
@kiaan00008
@kiaan00008 10 месяцев назад
helpful but can you tell me how to turn off online mode?
@couzin2000
@couzin2000 2 года назад
well, I get errors in the yaml text when I try to start it up... not happy with this.
@everettcass7904
@everettcass7904 2 года назад
I have an issue with my docker minecraft server that has plugins, specifically with EssentialsX, it doesn't save any warps that I setup on a restart, it says it saves in a .tmp file when I create the warp but upon restart or reload, that file seems to get deleted because the warps set disappear
@aihereplia
@aihereplia Год назад
Hi, I want to add voice chat mod where it needs to use port 24454 upd. How do I config that?
@floaca002
@floaca002 Год назад
I have done all the steps corectly but when I run the command docker-compose up -d --force-recreate it does not show up in portainer. any suggestions?
@RaidOwl
@RaidOwl Год назад
Feel free to join the discord and we can help over there
@josejoelramostanca4897
@josejoelramostanca4897 4 месяца назад
Me indica error con el servidor pero por no poder verificar el nombre de usuario, como se puede configurar esa parte?
@williamstickles6062
@williamstickles6062 4 месяца назад
Was able to make a Modded Fabric Server work with just a few changes.
@kypac99
@kypac99 3 месяца назад
hey, can you share the yml file for it?
@williamstickles6062
@williamstickles6062 3 месяца назад
@@kypac99 not sure how to share to youtube
@darienverdugo290
@darienverdugo290 Год назад
Do i have to install rcon cli separately?
@RaidOwl
@RaidOwl Год назад
Nope
@kreakdore
@kreakdore Год назад
I'd like to know what the benefit is of doing it this way vs other ways like maybe the way described by Minecraft on their site's documentation. I think I did that but I wrapped the server command to execute in a .bat file.
@sodhu4478
@sodhu4478 2 года назад
how can i modify the server.properties file? i can't find any minecraftserver file neither the server.properties
@chumakov
@chumakov 2 года назад
It should be in the volume path, if you did it like in the video it may be /var/lib/docker/volumes/minecraftdata/_data (I'm farily new to this so I hope it helps)
@ballsuckervr
@ballsuckervr 5 месяцев назад
r/riskyclick
@CampRusso
@CampRusso Год назад
🤔 my portainer kung-fu is weak. Did I see there is a place you can cut n paste the compose file contents? Then portainer will create the container?
@RaidOwl
@RaidOwl Год назад
Yep go into App Templates > Custom Templates > Add Custom Template
@kacpergurtowski3644
@kacpergurtowski3644 Год назад
which ip should i put? 09:40
@zyra337
@zyra337 2 года назад
How to install fabric server
@nerolized1209
@nerolized1209 2 года назад
does it run for 24/7 if we close our pc?
@arkarin0135
@arkarin0135 2 года назад
When you shut down the Pc which docker is running on, the Minecraft server will also shut down. For a 24/7 set up. 1. You need a Pc (server) which is running 24/7. 2. Install docker on it. 3. Install Minecraft server using this vid.
@MrZeval
@MrZeval Год назад
what if I have a windows server?
@NicMG
@NicMG 2 года назад
Pinecraft would have made your life easier, although this is still great content and a cool idea.
@RaidOwl
@RaidOwl 2 года назад
Yeah there are def one-stop-shops out there but I wanted to do it the vanilla way to learn a more about docker and setting up custom backups.
@neal-047
@neal-047 2 года назад
How to get open ssh client ?
@reyleonilreyes2606
@reyleonilreyes2606 Год назад
did you manage to open the ssh?
@savekillqqpsounds8473
@savekillqqpsounds8473 Год назад
And how do i put mods in it?
@ChrisHodgesGB
@ChrisHodgesGB 9 месяцев назад
I would also like to know
@abdulkadireraslan2330
@abdulkadireraslan2330 2 года назад
how can someone outside my network connect?
@Bardum22
@Bardum22 Год назад
you need to configure port forwarding in your router using the mc servers ip and port
@bruhmaster4207
@bruhmaster4207 Год назад
Please help, when trying to access the server cli I encounter a RCON error: Failed to connect to RCON serverdial connect: connection refused
@arcaneklownz9081
@arcaneklownz9081 Год назад
I have watched so many videos and none of this makes sense.
@cruelness55
@cruelness55 Год назад
it's saying permission denied
@AdrianuX1985
@AdrianuX1985 2 года назад
16:15.. Dude.. A true nerd does not publicly admit to using "nano". "nano" is for lame people. ;-]
@RaidOwl
@RaidOwl 2 года назад
Don’t tell me you use vim 😳
@HecUnderscore
@HecUnderscore 2 года назад
@@RaidOwl its vim or death
@AdrianuX1985
@AdrianuX1985 2 года назад
@@RaidOwl The YT bot is very sensitive to everything and does not let my comment through which is why I did not reply.
@RaidOwl
@RaidOwl 2 года назад
@@AdrianuX1985 thats weird..
@JHess
@JHess 2 года назад
you kids are funny. as an og nerd i used vi in the 70s, then i used vim, then nano. it's called evolving :P oh, and i'm using a flatscreen instead of a crt nowadays too ;)
@Patryc
@Patryc 2 года назад
gross u use guis 🤢
@RaidOwl
@RaidOwl 2 года назад
Yum guis
Далее
Building the ULTIMATE Minecraft Server
18:07
Просмотров 3,8 млн
I tricked MrBeast into giving me his channel
00:58
How We Run & Host Hermitcraft
11:57
Просмотров 899 тыс.
Young People Try Windows XP
14:19
Просмотров 1,6 млн
EASY Budget Minecraft Servers With Crafty
37:22
Просмотров 874 тыс.
Ultimate Linux Minecraft Server: Step-by-Step Guide!
28:32
you need this FREE CyberSecurity tool
32:06
Просмотров 1,3 млн