Auto start/stop server when players connect {Pterodactyl} {Ubuntu Server} {Paper Server}
Can anyone help me on how I would set this up for my server I use pterodactyl:
https://youtu.be/WqvQISpr6-s?si=d1-i79xv-C0IUVEP
TroubleChute
YouTube
Minecraft: Auto start/stop server when players connect | SleepingSe...
Running a server all the time? Well, you can keep it completely off, and when a player attempts to connect to the server it will startup. After some time passes with no players on the server, it shuts down, waiting for the next player to connect. This way you can always "keep a server running", but only have it use RAM/CPU when there are players...
25 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by h_x_c#0
Why do you want this?
So that the pc's recources are free when no one is connected
I think mcsleepingserverstarter even has a pterodactyl egg
yea it does https://github.com/vincss/mcsleepingserverstarter/blob/master/docs/egg-paper-mcsleepingserverstarter.json
GitHub
mcsleepingserverstarter/docs/egg-paper-mcsleepingserverstarter.json...
Put your minecraft server to rest, while SleepingServerStarter is watching ! - vincss/mcsleepingserverstarter
just import this egg into pterodactyl and create a server with it
wdym create a server with it and egg?
So in pterodactyl, you have so-called eggs, they are like small files which tell the panel what type of server it is, how to install the server, how to start it etc. You need to download the file I mentioned and import it as an egg. Then you can create a server using it
so under nests I import egg then I just do save then server create new nest as minecraft and egg as the Paper (mcsleepingserverstarter) and leave the rest as default startup command should be (./mcsleepingserverstarter-linux)?
cant I just edit my server I already have tho?
yes
as the program runs on javascript, you'd need to change a lot of things for your server, it would be easier to create a new one and copy all of the files over to the new one
I assume it will then auto start as soon as someone connects and then I just have to install the plugin that stops the server when no one is connected?
yes
exactly
https://github.com/gekware/minecraft-server-hibernation-pterodactyl-egg i've heard this is better
fps.ms uses MSH ^
GitHub
GitHub - gekware/minecraft-server-hibernation-pterodactyl-egg: egg ...
egg for gekware/minecraft-server-hibernation. Contribute to gekware/minecraft-server-hibernation-pterodactyl-egg development by creating an account on GitHub.
is the issue ram or cpu usage? Minecraft shouldn't use much cpu when nobody is online
No issue really just good to have resources free and having the server shut down if no one is connected making sure nothing can go wrong since power outages are common here
minecraft autosaves every 5 minutes, so there's no issues with the server crashing
and wouldn't the machine need the resources free anyways if someone wanted to join?
So what happens when it auto saves at the 5 min mark and then it crashes does it revert to the 5 min mark auto save?
by default you will max loose 5 minutes of data
and thats if it crashes on autosave
So there is no real way or "small change" to lose data if the power just cuts instant?
max 5 minutes, you can even reduce it to quicker
most of the time if the game crashes it'll still save
only power cuts or linux OOM killing the process will actually cause it to rollback
Ok then another question if no one is connected are chuncks still loaded because looking at it without anyone online ram sits at 22% is there a way to so to say Pause the game or to deload things?
because of how java works, once the server allocates memory, it can't be deallocated without the java process exiting
π Ok I would feel safer if the server is off when no one is connected but I guess it does not seem like a problem
!close
post closed!
The post/thread has been closed!
Requested by h_x_c#0