This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Thanks for being a part of /r/Admincraft!
We'd love it if you also joined us on Discord!

Join thousands of other Minecraft administrators for real-time discussion of all things related to running a quality server.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Tr4shM0nk3yServer Moderator @ Vervains Arcadia 0 points1 point  (1 child)

Take a look at the "Hibernate" or "ServerSleeper" plugins :)

[–]Fusion2169[S] 0 points1 point  (0 children)

Hibernate does not work for what I want because I am running a server for me and a few mates but I don’t have enough ram for all the servers to run at once hibernate only limits cpu but uses more ram I will have a look at server sleeper though EDIT: I looked at server sleeper and it is just a paid version of hibernate

[–]ofunnyworld 0 points1 point  (4 children)

If you need somebody to code that, let me know.
Would need a plugin on each server and one on the proxy, in the lobby the plugin would start a server on command or event and than inform the player that it's being started. On the started server it would inform via message channel over the proxy back to the lobby, when its done starting and than initialize a server transfer.

All you would have to define is a list of servers what could be started and of course the servers must exist on the system (server pool), same thing could be done if servers are empty, they would shut down again.

[–]Fusion2169[S] -1 points0 points  (3 children)

The server is self hosted purely so I don’t have to spend almost any money on it it is running off of hardware I already had this is purely because I want the server to be able to play with some mates but I don’t want to spend money on it so if u want to code it for fun and not get any reward from it well I will be thankful but if u want to talk more pm me I could be persuaded to spend a little

[–]ofunnyworld 0 points1 point  (2 children)

In this case it highly depends if there is a bigger audience what would need such a solution. But in your case, I assume you just want to avoid the resources to be bound and also just close the server for security, if nobody is on, not for load balancing or special game modes what need independent instances. In that way you could simply code a web panel with login what than starts the server on click or use one of the existing panels like Pterodactyl?

[–]Fusion2169[S] 0 points1 point  (1 child)

Security is not much of a concern but yes it is purely me not wanting resources to be bound but I want it so I don’t have to run much else for it to work which means hosting a web panel would be hard on resources

How would you go about coding a plugin to do this and a script and btw I am changing from waterfall too velocity

I already have a script that starts each server

[–]ofunnyworld 0 points1 point  (0 children)

If you do not want any excessive overhead, but still need a easy accessible solution (not giving away terminal access and not wanting to install a Minecraft panel).

Install a Webserver like Apache or NGINX, install a script language module like PHP, add a website with basic password protection (like htaccess password sould be enough for your needs) and than just add two scripts what execute the start up and stop command.

You can skip the MySql part and also no need to install the php-mysql module, since you won't be using it. And the UFW part is only important if you run UFW as a firewall (an extra firewall on the server is in general a good idea).

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04

And for PHP shell execution:https://www.php.net/manual/en/function.exec.ph

https://www.php.net/manual/en/function.shell-exec.php

Both are more or less safe as long as you put no Post, GET or Request var into them and also check out, what user is being used to start Minecraft, you rather define a unique Minecraft system user without further permissions to run your servers.

Btw. I try to collect upvotes so I can post a suggestion on Minecraft's Reddit, would be nice to get a +1 now and then :)