Jump to content

MineCraft Server- Ubuntu


Recommended Posts

i have a couple questions regarding hosting a mine craft server on ubuntu:

first off i am still new to ubuntu and am using this as a way to become more familiar with it.

current system specs:

dell 690 precision  work station,

2x Intel Xeon 5240 3.33

ram 4 gig ram 667Mhz,

i am planing to upgrade to 16 gigs of ram after i get everything setup


Wakeonlan implementation:

I want to be able have the computer go in to a standby/ hibernation if no on is on the server for a prolonged time just a time out and when someone tries to access the server. im trying to keep it completely server side, where when someone checks to see if the server is active it takes the computer out of standby. I am pretty sure this can be done ill be doing more research into it. I am just wondering if anyone has any idea and links i can look at.


next is im trying to run multiple servers on my machine. i am hoping to run a vanilla server, pixel mon and a forge server(with multiple mods). my issue is when i install a new server, i try to put it in its own folder but it seems to reference the home (in Ubuntu) folder for all the server files (properties, world folders and mods). so all the servers try to use the same files and folders and it causes issues.

thats it for now, if you have anyidea to help me let me know


Link to comment
Share on other sites

This is the wrong forum to ask this question, which is really involved, and has nothing to do with minecraft per se. You can put your server in S3 standby (hibernate aka S4 involves paging out the entire contents of RAM and shutting down, I doubt you want that, it would be too slow to resume and cause a timeout) using acpi or apmd features, which you should google since there's more you need to know before messing with that. Waking is a whole other kettle of fish, and I'd be surprised if what you want to do is even possible. The main problem being that WoL (wake on lan) is a low-level BIOS feature that doesn't know tcp/ip, and thus can't be configured to do things like "wake up if someone tries to connect to port 25565" or what-have-you. Operating under minimal power, the network interface listens for a special wakeup packet sent on the local network, targeted by mac address (I think, don't quote me on that, it might be broadcast). This means you need some sort of proxy to listen for connections and wake your host up then proxy the connection for you, similar to like what nat/port forwarding does. You could jimmy something together using a second server, but this would totally defeat the purpose (understand that this feature is primarily used in IT infrastructure, to save money by sleeping all the workstations during off-hours/lunch/etc while still allowing bulk management ops when needed, such as patching servers, updating AV, blah blah). Otherwise you need your router to support acting as the proxy. I only know of apple airport routers supporting this with zeroconf/bonjour (they call it sleep proxy), but afaik you need newer apple hardware and osx to make use of it. zeroconf is a replacement for upnp, which you are more likely to find in other routers. I have no idea if it does something similar, and I'd be surprised if it worked well if so -- or at all, honestly, upnp is notoriously bad -- but it's worth checking I guess. Be prepared for defeat, especially if you have your heart set on using Linux. There are a bunch of solutions for more advanced wake on lan, but they are largely commercial and windows. You should also check your server's user manual and dell support forums, as hardware-specific solutions abound beyond WoL, and Dell is likely to have something proprietary, being the staple of corporate desktop machines. Whether it's something you can leverage involving nothing but your router, while using Linux, I couldn't guess, but be prepared for disappointment.


Some other things to consider: The server query that populates a client's server list with number of online players and motd uses the same port as a connecting client, merely sending a different initial packet. No generic solution is going to be able to tell the difference, thus anybody with the host/ip in their saved servers is going to wake it from standby just by going to that screen, even if they don't connect, and if they idle there, it'll keep the server awake, as it refreshes pretty often. This alone might defeat you completely, depending on how many people that might be and how often they play etc.


Second, if the server doesn't come back from S3 standby for some reason, this will have a similar effect as a power outtage or kill -9 the java process. In other words, if changes to the map haven't been flushed to disk, it can (and will, in my experience with the linux OOM killer sending SIGKILL unexpectedly) cause corruption of chunk files. For this reason, I'd want to make sure the map was force-saved before going to standby. The crude way to do this is to force a save with cron + rcon frequently enough that it's guaranteed to have run during the timeout period at least once.. but ideally some script that issues the sleep commands does this first, though. You could also check how often it naturally saves the map, set the standby timeout accordingly and hope that doesn't change underneath you, but is (IMO) kind of reckless.


In any case, your best bet is to check the user manual for that model and/or dell support forums for terms like: wake on lan, wol, zeroconf, upnp, power management, sleep proxy, acpi. A quick search shows some promise, but I didn't really look farther.

Link to comment
Share on other sites

As for your other question, all the files use paths relative to the working directory of the java process, that is, the directory you are in when you run "java -jar path-to-server.jar". You should cd into a different directory for each server beforehand (you can reuse the same jar, located elsewhere, if you want). Some of the paths can be changed with server mod startup flags, but even if you do that, you really want to cd to the proper directory first anyway because plugins won't honor any of that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.