Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Starting an Ubuntu Minecraft Server, need advice etc.

  1. #1
    Join Date
    Jan 2011
    Beans
    9

    Starting an Ubuntu Minecraft Server, need advice etc.

    Hi everyone!

    Ok so i'm going to explain my situation tot he best of my ability. I've been a mostly unsatisfied Window's user all my life, and always have just stayed with MS because of the common reasons i'm sure you Linux guys all have heard before. A little sidenote, my uncle has always been a linux guy, and upon researching the os personally i was reminded of fond memories of him trying to explain the OS and why it was so great. I was reminded of random linux terms like 'Gnu' and such.

    So anyways, to the main point. I've been running a successful Minecraft server (http://www.minecraft.net/download.jsp) for the past couple months and it got to the point where even having a decent dual core cpu and 8 gb of ram wasn't cutting it when it came to running the server (hey0 actually) and myself playing in the server at the same time, pretty java intensive, and i dont think even 8 gb's of ram wasn't working well as the world/server files got larger and larger. So i decided to rent a dedicated game server from xenonservers.com. Well long story short that was a lesson learned, lag wasn't solved and it seemed i was actually paying for a downgrade and not an upgrade at all.

    So that brings us to present time. After seeing many signs of what looked like many people saying that a linux server definitively beats a Windows run server any day, i decided i was going to go that route. I purchased a Dell Poweredge 1850 off ebay, has 8 gb of ram and dual 64 bit 3.4 ghz Xeons'. I'm planning on just running the machine in my room, i even have a perfect cubby in my desk that rolls out where i'm planning on putting it. I purchased a KVM switch as well, for ease of operation. I'm going to be running Ubuntu Server on it, i already followed the steps the Ubuntu website provided for putting it onto a usb drive and installing it from there. I am excited to get it all set up and learn the new OS!

    So basically i am making this thread asking for advice regarding my plans.. are there certain things i should/could do to make it run most efficiently? Hows the best way possible to go about doing this? Are there other distros that would be a better choice?

    Thanks everyone, i really appreciate any help/advice anyone could provide.


    Edit:

    I'm sorry for the duplicate threads, it wasn't loading...

  2. #2
    Join Date
    Mar 2008
    Location
    Indore, India
    Beans
    233
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    your plans are perfect and Ubuntu server is a good choice. make sure that its a LTS version. the current LTS version that you should use Ubuntu 10.04 64bit server.

    Thats my personal choice of using LTS and i see it more stable from the others.


    Good Luck!!!


    meanwhile can you explain me what minecraft is...... If its something related to games i am interested in it.

    plese get back to me on swapnil dot indore at gmail dot com

  3. #3
    Join Date
    Jan 2011
    Beans
    9

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Quote Originally Posted by sj1410 View Post
    your plans are perfect and Ubuntu server is a good choice. make sure that its a LTS version. the current LTS version that you should use Ubuntu 10.04 64bit server.

    Thats my personal choice of using LTS and i see it more stable from the others.


    Good Luck!!!


    meanwhile can you explain me what minecraft is...... If its something related to games i am interested in it.

    plese get back to me on swapnil dot indore at gmail dot com

    Thanks for the response!! Thanks for the input. Minecraft is a open world exploration & construction are the main aspects of the game. Its super fun and quite addictive! The variety of construction possibilities is very wide! Here are a couple youtube videos of some amazing things people have built!

    http://www.youtube.com/watch?v=MMW_jraSjq8

    http://www.youtube.com/watch?v=kn2-d5a3r94

    it's a pretty java intensive program!

  4. #4
    Join Date
    Mar 2008
    Location
    Indore, India
    Beans
    233
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Thanks a lot. Pretty interesting.

    Actually i am looking for some game developers so thought it might be helpful. Thanks a lot.

  5. #5
    Join Date
    Aug 2010
    Location
    hole
    Beans
    419
    Distro
    Ubuntu

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    good choice ubuntu..
    10.04 LTS is my version also.
    if you needs is just to host this game it will probably bee more then you really need.
    notice that you can make it work faster and redundent with raid arrays..

  6. #6
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Yes as everyone else said, go with 10.04. This way the server is supported for 5 years and once you set it up you won't have to do too much to keep it going.

    I would follow the minecraft guides
    http://www.minecraftwiki.net/wiki/Tu...a_server#Linux
    http://www.minecraftwiki.net/wiki/Server_startup_script

    With server version you don't get a GUI, but that's good because then you're not wasting ram . Make sure to either install OpenSSH so you can connect into it and edit settings, or have a monitor/keyboard hooked up to it. So some of the linux steps on that guide are made for GUI, just adapt to command line (like making a folder is mkdir foldername)
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

  7. #7
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Yes as everyone else said, go with 10.04. This way the server is supported for 5 years and once you set it up you won't have to do too much to keep it going.

    I would follow the minecraft guides
    http://www.minecraftwiki.net/wiki/Tu...a_server#Linux
    http://www.minecraftwiki.net/wiki/Server_startup_script

    With server version you don't get a GUI, but that's good because then you're not wasting ram . Make sure to either install OpenSSH so you can connect into it and edit settings, or have a monitor/keyboard hooked up to it. So some of the linux steps on that guide are made for GUI, just adapt to command line (like making a folder is mkdir foldername)
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

  8. #8
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    (stupid server. doublepost :s )
    Last edited by Thirtysixway; January 15th, 2011 at 07:41 PM.
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

  9. #9
    Join Date
    Jan 2011
    Beans
    9

    Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Quote Originally Posted by Thirtysixway View Post
    (stupid server. doublepost :s )

    Hey thanks for the advice! Yeah i was getting trolled by the lag too yesterday XD.


    SO the server i bought (coming in the mail soon) the details on it said no RAID. I don't really know that much about what raid does a friend of mine tried explaining it like it's makes HDD's backup to the other one? Sorry if that's a stupid question...

    Also, so the version i put onto my usb drive (http://www.ubuntu.com/server) is by default GUI-less? So basically i will be operating it from a command line? (That's what i wanted).

    Can someone explain OpenSSH for me? Is there anything else that i need to do to the server before setting it up for minecraft? Again i'm a total newb with linux! Some links you guys could provide?

  10. #10
    Join Date
    Sep 2008
    Beans
    18
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Thumbs down Re: Starting an Ubuntu Minecraft Server, need advice etc.

    Hi willy,

    i've been running a minecraft server (ip: minecraft.co.in) on an old acer dual core machine running ubuntu 10.04 LTS, since November 2010. its got a 2.0 ghz processor, 2gb ram and a 320gb hdd.

    Its not the fastest machine i have (i play on that one ) but it gets the job done. As my server became more popular, a lot of people started complaining of lag. Now, being the good admin i am, i scoured the internetz for a solution, and heres what i came up with.

    The two main choke-points were the internet connection and the size of the world. Im getting a new connection right now, so that should solve the internet problem. For world size, there's lots of posts saying that a SSD can improve the server speed. This is because the minecraft map is stored in a HUGE number of individual files for each 'chunk' (16x16x128 blocks) of the world. ATM my world is ~112mb and ~34000 individual files (Here's a MAP). For each player online, the server loads a 40x40 chunk 'Active' region around them, and the balance chunks loaded are dependent on their view distance. The 'Active' region is basically where mobs spawn, trees grow etc. So, for EVERY player, there are a lot of HDD reads and writes that have to take place. This is where an SSD with its blazing r/w speeds comes in handy.

    I personally cannot afford a SSD at the moment so i went and did one better, i used a RAMdisk. While the average SSD reads at ~700mbps, a RAMdisk reads at ~1300mbps. (i read these figures somewhere, i dont remember exactly where and they might not be accurate but RAM is a helluva lot faster than any SSD). The disadvantages of a RAMdisk is the volatility of your data, which basically means that if the power dies, your data goes too. This can be avoided with a regular backup and some smart scripting. Ubuntu has a default ramdisk (located at /dev/shm) which takes not more that half your ram. Which basically means that in my setup, i have a 1gb (max) ramdisk, which is more than enough to run my world.

    So here's what i did.

    Assuming that you have a folder layout like this:
    /home/$USER/Desktop/MCSERVER
    /home/$USER/Desktop/MCSERVER/world/
    /home/$USER/Desktop/MCSERVER/minecraft_server.jar
    etc.

    Step 1. Move world to permanent storage
    Code:
    cd /home/$USER/Desktop/MCSERVER
    mv world/ world_storage/
    Step 2. Link the world to ramdisk
    Code:
    mkdir -pv /dev/shm/minecraft/world
    ln -s /dev/shm/minecraft/world/ .
    You will now have a folder called world in you MC directory which is a symbolic link to the folder on the ramdisk.This folder is currently empty, and we will populate it with our modified startup script:

    Code:
    #!/bin/sh
    
    RAM="/home/$USER/Desktop/MCSERVER/world/"
    HDD="/home/$USER/Desktop/MCSERVER/world_storage/"
    
    mkdir -pv /dev/shm/minecraft/world
    rsync -r -t -v "$HDD" "$RAM"
    
    java -Xms1024M -Xmx1024M -jar Minecraft_Mod.jar nogui
    So when we start the server(even after a power outage), the world gets copied to the ramdisk and then the server starts. We now need to create a script which will copy the world from the ramdisk back to the hdd at regular intervals. Save the following script as saveworld.sh


    Code:
    #!/bin/sh
    RAM="/home/$USER/Desktop/MCSERVER/world/"
    HDD="/home/$USER/Desktop/MCSERVER/world_storage/"
    
    rsync -r -t -v "$RAM" "$HDD"
    Now all we have to do is add a simple cron job and we're done

    Code:
    crontab -e
    This will open the editor to add a cron job. I am saving my files every 5 minutes but you can change that to suit your needs.

    Code:
    */5 * * * * bash /home/<your username>/Desktop/MCSERVER/save_world.sh &>/dev/null
    That's it... Your Done...

    A little advice against griefers: TAKE MULTIPLE BACKUPS

    I use Back in Time (available in the repos) to backup my entire minecraft folder every 15 minutes. Its hassle free, lets you restore from multiple restore points and saves only changes into the backup. So if your world is ~20mb and players make changes worth ~1mb, the second backup will not be 21mb but just 1mb, which saves A LOT of hdd space, and game time lost to griefers.
    Last edited by darthrax; February 19th, 2011 at 04:33 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •