Recent Discussions

Minecraft Bedrock server auto start and stop

Unanswered
Palomino posted this in #questions
Messages17 messages
Views0 views
PalominoOP
Hi,

I want to set up a small Bedrock server on a dedicated PC (preferably Linux) with the following features:

- When signaled by a Raspberry Pi, the PC will turn on or exit hibernation, then launch the Minecraft server at startup
- When no players are connected for a configurable amount of time, the server will stop and the PC will shut down or hibernate

What sort of setup would be best for this on a small scale?

1. How can I use a Raspberry Pi to wake up the PC? Would wake-on-LAN work reliably for this?
2. How can I then launch the Minecraft server once the PC is started?
3. How can I detect that no players are connected to the Bedrock server? Would a plugin do this?
4. How can I run the stop command on the server once I detect that no players are connected for X minutes?
5. How can I shut down or hibernate the PC when it's time to do so?
American black bear
https://github.com/gekware/minecraft-server-hibernation can help you with the server start/stop part
Idk how you would connect the rasberry pi though
PalominoOP
The instructions mention Java, is this only for Java servers? I'm currently using Bedrock
@Palomino The instructions mention Java, is this only for Java servers? I'm currently using Bedrock
Asiatic Lion
Sadly no bedrock support unless you use Java with Geysermc to support bedrock
American black bear
for lazymc which is another server sleeper project
someone got it working but they had velocity running the whole time with no floodgate, so definitely not ideal
PalominoOP
I see, I noticed that the logs show me when a player connects or disconnects, if there aren't any existing solutions for Bedrock, I guess I can pipe the log output to a file and try to write a script that takes monitors that to track player counts
@American black bear Idk how you would connect the rasberry pi though
Australian Stumpy Tail Cattle Dog
i did this like last week it’s pretty easy there’s a bunch of guides online
use etherwake and enable “wake on magic packet” on your pc
if they’re on the same LAN it will work
Philippine Crocodile
so, I have a couple dumb questions

- could you just run the bedrock server directly on the rasberry pi? If just the rasberry pi performs well enough, then you might not even need a full computer to run it
- have you measured the idle power draw of the computer? Maybe try changing the power profile to a lower one? If the computer only draws 20w idle from the wall, then it's probably not worth your time to rig a WoL system for it
@Philippine Crocodile so, I have a couple dumb questions

- could you just run the bedrock server directly on the rasberry pi? If just the rasberry pi performs well enough, then you might not even need a full computer to run it
- have you measured the idle power draw of the computer? Maybe try changing the power profile to a lower one? If the computer only draws 20w idle from the wall, then it's probably not worth your time to rig a WoL system for it
PalominoOP
I haven't tried running it on the Raspberry Pi, but I want to avoid potential performance issues so I haven't really considered that as an option since I might have up to 10 friends using this server at a time.

The PC is a mini PC, so it probably is pretty efficient, but I also just want to try setting this up as a hobby project
@Palomino I haven't tried running it on the Raspberry Pi, but I want to avoid potential performance issues so I haven't really considered that as an option since I might have up to 10 friends using this server at a time.

The PC is a mini PC, so it probably is pretty efficient, but I also just want to try setting this up as a hobby project
Philippine Crocodile
yeah, I do want to mention that bedrock itself is designed to run on mobile phones with [slow] arm CPUs.

It depends on what server software you'd be using, but you can probably use a proxy (such as waterdogPE or velocity) to hold the players in while the PC "wakes up".

If you have programming skills, then go for it, but realistically idle mini PCs are designed to be very power efficient. They might not idle at the 3w an rpi does, but would be surprised if it idled at more than 15w. (for reference, 20w 24/7 for a month would cost me like 4gbp, and the UK has an unusually high power rate compared to NA)
also realistically, I'd much rather just click on the server and be able to join instead of waiting a minute or two for the server to boot up, but it's up to you
Loading...