r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Wed Feb 20, 2013 12:26 am

ChrisJW, use NoSpawnChunks like jamesmd95 suggests, and search for plugins which control NPC quantities (the number of animals/monsters/NPCs which can spawn). I've tried one and it seems to cull CPU usage somewhat the more you limit the max number of active mobs.

ChrisJW
Posts: 8
Joined: Mon Feb 11, 2013 8:13 am

Re: Minecraft server - How To

Thu Feb 21, 2013 5:17 am

Yes, I am running nospawnchunks as mentioned on the previous page of this thread. It seems to be cpu more than ram that is the limiting factor.

kworley97
Posts: 9
Joined: Sun Dec 30, 2012 5:02 am

Re: Minecraft server - How To

Sat Feb 23, 2013 11:08 pm

Is anybody else having trouble port forwarding to the pi? For some reason the port wont open up.

randrade
Posts: 79
Joined: Thu Dec 27, 2012 8:42 pm
Contact: Website

Re: Minecraft server - How To

Sun Feb 24, 2013 12:16 am

kworley97 wrote:Is anybody else having trouble port forwarding to the pi? For some reason the port wont open up.
That depends on your router. Some are easier to set up than others.

If you're running Bukkit, use this plugin to automatically forward port 25565: http://dev.bukkit.org/server-mods/auto-port-forward/ (or, if that one doesn't work, http://dev.bukkit.org/server-mods/upnp/ )

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Sun Feb 24, 2013 12:49 am

Hi first off great thread was helpful to me in getting my set-up but im a little on step 16

16) To run the actual server," sudo /opt/jdk1.8.0/bin/java -Xms128M -Xmx256M -jar /home/pi/minecraft_server.jar nogui"

Im running the 512mb Rev B with 16mb to the gpu. I have amended the above to

sudo /opt/jdk1.8.0/bin/java -Xms256M -Xmx496M -jar /home/pi/Minecraft_Server/minecraft_server.jar nogui

But I keep getting error message. Have I done anything wrong.

ALso when using windows i have a bat file with the above info in, is there a way to have something similar on the RPi save having to type that in each time?

randrade
Posts: 79
Joined: Thu Dec 27, 2012 8:42 pm
Contact: Website

Re: Minecraft server - How To

Sun Feb 24, 2013 3:15 pm

KRIS537 wrote:Hi first off great thread was helpful to me in getting my set-up but im a little on step 16

16) To run the actual server," sudo /opt/jdk1.8.0/bin/java -Xms128M -Xmx256M -jar /home/pi/minecraft_server.jar nogui"

Im running the 512mb Rev B with 16mb to the gpu. I have amended the above to

sudo /opt/jdk1.8.0/bin/java -Xms256M -Xmx496M -jar /home/pi/Minecraft_Server/minecraft_server.jar nogui

But I keep getting error message. Have I done anything wrong.

ALso when using windows i have a bat file with the above info in, is there a way to have something similar on the RPi save having to type that in each time?
What error message do you get?

Just create a bash script (sudo nano minecraft.sh) and type it in. To run it, sudo bash ./minecraft.sh

User avatar
cheesepig85
Posts: 2
Joined: Mon Feb 25, 2013 1:52 am
Location: Milky Way Galaxy

Re: Minecraft server - How To

Mon Feb 25, 2013 2:08 am

Hi, I followed your instructions, but when I try to join the Pi server I am greeted by this error:
error.png
The follow is the error I am receiving.
error.png (60.47 KiB) Viewed 5335 times
Does anyone have any idea how to fix this? Much appreciated.

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Mon Feb 25, 2013 8:32 am

randrade wrote:
KRIS537 wrote:Hi first off great thread was helpful to me in getting my set-up but im a little on step 16

16) To run the actual server," sudo /opt/jdk1.8.0/bin/java -Xms128M -Xmx256M -jar /home/pi/minecraft_server.jar nogui"
Im running the 512mb Rev B with 16mb to the gpu. I have amended the above to
sudo /opt/jdk1.8.0/bin/java -Xms256M -Xmx496M -jar /home/pi/Minecraft_Server/minecraft_server.jar nogui
But I keep getting error message. Have I done anything wrong.
ALso when using windows i have a bat file with the above info in, is there a way to have something similar on the RPi save having to type that in each time?
What error message do you get?

Just create a bash script (sudo nano minecraft.sh) and type it in. To run it, sudo bash ./minecraft.sh
Worked out the error in end, the RPi had not downloaded the jar file correctly. So its all up and running thanks. Will have a go at creating a script thanks.

One issue im having is with lag. If I destroy blocks they disappear and reappear then approx 2-4secs later disappear, will check that my GPU has the 16mb assigned tonight. Also what mem range do people use im currently using Xms256M -Xmx496M, i assume the Xms is the small minimum mem usage and Xmx is the max?

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Mon Feb 25, 2013 8:33 am

cheesepig85 wrote:Hi, I followed your instructions, but when I try to join the Pi server I am greeted by this error:
error.png
Does anyone have any idea how to fix this? Much appreciated.
Have you added your user name into the ops and white list?

User avatar
cheesepig85
Posts: 2
Joined: Mon Feb 25, 2013 1:52 am
Location: Milky Way Galaxy

Re: Minecraft server - How To

Mon Feb 25, 2013 8:30 pm

Hi, thanks for the quick reply. I fixed my problem. It turns out I just entered the wrong IP Address in my "interfaces" file.

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Mon Feb 25, 2013 9:45 pm

Easy done I guess :)
rapidwhois.uk | jmdawson.co.uk

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Tue Feb 26, 2013 7:07 pm

KRIS537 wrote: Worked out the error in end, the RPi had not downloaded the jar file correctly. So its all up and running thanks. Will have a go at creating a script thanks.

One issue im having is with lag. If I destroy blocks they disappear and reappear then approx 2-4secs later disappear, will check that my GPU has the 16mb assigned tonight. Also what mem range do people use im currently using Xms256M -Xmx496M, i assume the Xms is the small minimum mem usage and Xmx is the max?
If you have lag you can:

- Use a faster SD card
- Overclock your Pi
- Use Craftbukkit instead of the vanilla server (+ with NoSpawnChunks mod, very fast)
- Optimise your memory range for Java, which relates to your next question:

You are defining too high an upper memory limit, really. It likely transpires Minecraft isn't using up 496MB when you are testing it - if it did, your Pi would probably crash. A 512MB Pi running basic Raspbian at the terminal (no X or anything) will have a safe ~410MB to play with, give or take, so set Xmx400M as a nice, practical limit. You need not define Xms really, though I suppose 256M isn't doing any harm. :D

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Wed Feb 27, 2013 8:41 am

Thanks for your replay im currently using a 16GB class 10, with atransfer of 30mb/s, and the Pi is on the second one down from turbo. I will also adjust the memory settings as you suggest thank you,

Everything was a fresh build with the latest version software and its not been used for anything other than running minecraft server.

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Thu Feb 28, 2013 1:58 pm

still finding too much lag. most things are working well terrain generates quickly the only pain is when mining, chopping trees etc the blocks dont always disapear and have to mine them 3-4 times to eventually they do. Its at max overclock too. So going to try it on Bukkit with NoSpawnChunks add on

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Thu Feb 28, 2013 3:43 pm

KRIS537 wrote:still finding too much lag. most things are working well terrain generates quickly the only pain is when mining, chopping trees etc the blocks dont always disapear and have to mine them 3-4 times to eventually they do. Its at max overclock too. So going to try it on Bukkit with NoSpawnChunks add on
While you should be able to get a server running mostly smoothly without Craftbukkit & NoSpawnChunks, it's definitely, definitely a lot easier on the modified server.

Mobs will eat CPU time, if you're still struggling disabling mobs (monsters, NPCs, animals) will speed things up a treat on a vanilla server or Craftbukkit alike (except, with Craftbukkit, you could likely find a plugin which lets you change the max number of mobs active at any one time... which would be a nice compromise to keep mobs and not eat CPU! :D)

Please note SD card classes don't have a lot to do with the performance on the Pi. It only refers to sequential read/write speeds and not the kind of random IO you get with use in the Pi. You might find Class 6 or even some Class 4 cards which run faster if they handle random IO better! :)

marktheis
Posts: 1
Joined: Wed Feb 20, 2013 2:58 am

Re: Minecraft server - How To

Thu Feb 28, 2013 4:46 pm

I have been following this very closely and would just give you my working setup:
arm_freq=1000
sdram_freq=600
core_freq=500
gpu_mem=16

I installed Raspbian and used the script from here: http://kraftyhosting.eu/tutorial-raspbe ... er-update/
And followed the instruction.

On the Minecraft Server i have:
visibility set to 4
mobs off
animals and npc's on
nether on (I haven't visited yet)

Plugins:
Essentials
Group Manager
WorldEdit
WorldGuard
Lockette
NoSpawnChunks

When i used a class 10 sd card i got multiple "not syncing: VFS:.." errors so I installed Raspbian on a usb stick instead and it seems to work better for me with less lag. Overall it has been perfectly usable with 3 people on with less to no lag. It's when the players explore and the PI needs to generate new land that it becomes quite laggy.
I did get a few java errors which is about corrupted chunks. But then I just go into the world in single player and the chunk gets fixed I guess :) . But that seems to be a more common bukkit problem. My next test will be to use multiverse and have one extra creative world with no mobs, animals and npc's on it. Wish me luck!

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Fri Mar 01, 2013 8:12 pm

marktheis Pleased to hear its going well MV seems to work ok once the world is partially rendered. :)

Good luck!
rapidwhois.uk | jmdawson.co.uk

HyperGamma
Posts: 4
Joined: Sat Mar 02, 2013 6:27 pm

Re: Minecraft server - How To

Sat Mar 02, 2013 6:31 pm

Hi, very nice tutorial love it! Also great server!

I have set up the server on my pi but it seems to run very slow for me and my friend, think its because of my poor internet speed.
Was wondering what your internet speed was and if you have and tips to make it run faster??

Thanks!

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Mon Mar 04, 2013 10:36 am

My net speed is terrible (~3-4Mbps/0.8-1Mbps Down/Up respectively) but two players will still get a smooth experience.

Reduce any activity which causes data transfer for smoother play, for instance:

- Reduce server viewing distance (less terrain data transferred when moving around)
- Reduce number of mobs, or remove them entirely
- Reduce how fast you explore (not so much sprinting!)
- Try to stick together when playing

Is it running slowly for you locally? If so the problem is not your Internet connection but the Pi's/minecraft's configuration. If it were the net you'd find it ran smoothly for you locally but laggy for remote players. A good litmus test is destroying a block and seeing if it instantly drops (running well) or if it reappears and drops a second or two later (not running well).

KRIS537
Posts: 14
Joined: Wed Feb 20, 2013 1:47 pm

Re: Minecraft server - How To

Mon Mar 04, 2013 1:39 pm

mine is running slowly locally. I have installed Bukkit on my PC and works well. Think I will disable the villagers as they seem to eat my PC and that an I3 with 4gb ram.

I have transfered it accros to the RPi but I can seem to get the script right to make it run. I have followed the instructions here http://wiki.bukkit.org/Setting_up_a_server but it wont run

HyperGamma
Posts: 4
Joined: Sat Mar 02, 2013 6:27 pm

Re: Minecraft server - How To

Mon Mar 04, 2013 4:14 pm

r00x wrote:My net speed is terrible (~3-4Mbps/0.8-1Mbps Down/Up respectively) but two players will still get a smooth experience.

Reduce any activity which causes data transfer for smoother play, for instance:

- Reduce server viewing distance (less terrain data transferred when moving around)
- Reduce number of mobs, or remove them entirely
- Reduce how fast you explore (not so much sprinting!)
- Try to stick together when playing

Is it running slowly for you locally? If so the problem is not your Internet connection but the Pi's/minecraft's configuration. If it were the net you'd find it ran smoothly for you locally but laggy for remote players. A good litmus test is destroying a block and seeing if it instantly drops (running well) or if it reappears and drops a second or two later (not running well).
Thanks so much for the help much appreciated!!

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Wed Mar 06, 2013 10:46 pm

Not sure if this is strictly allowed ....but, if any of you haven't yet got a raspberry pi to use as a minecraft server here is your chance to win one ( a minecraft server not a pi!) http://kraftyhosting.eu/giveaway/
rapidwhois.uk | jmdawson.co.uk

r00x
Posts: 41
Joined: Mon Feb 04, 2013 11:05 am

Re: Minecraft server - How To

Thu Mar 07, 2013 11:06 am

Well jamesmd95, it's not like you didn't contribute significantly to the thread, is it? And technically on topic... So with my complete lack of moderator powers, I declare this acceptable :lol: would even enter myself if I actually used Facebook, haha.

Not to swerve off topic too much, but all this cramming-Minecraft-onto-a-Raspberry-Pi has made me wonder about other microcomputers and platforms. I have a few NAS boxes which can run Java... with 512MB of RAM or more... :D

Here's an on-topic question: does anyone know if the Minecraft for Pi client can connect to a 'full' Minecraft server running on a Pi? Presumably not on the same Pi of course.. :D

User avatar
tzj
Posts: 302
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK

Re: Minecraft server - How To

Thu Mar 07, 2013 1:26 pm

I have found one difference between the full and the pocket editions, sea level on the pocket edition is one block higher than the full version level data.
The pi edition is also half the height and distance of the pocket edition (based on the most recent version).
Plus a reduction in what blocks you can use and no chunk spawning.

Once these are taken into account it may work, unless the code prevents it working.
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)

jamesmd95
Posts: 77
Joined: Sun Sep 16, 2012 7:47 pm
Location: Newcastle Upon Tyne
Contact: Website

Re: Minecraft server - How To

Thu Mar 07, 2013 7:53 pm

Not sure about the latter but I hosted a minecraft server on a hacked Iomega HMNHD. 300MHz arm 64MB ram and Debian 6! Was fine for 1 player. :)

Anyone without facebook can still enter :) Just skip the facebook bit i'll let you off :)
rapidwhois.uk | jmdawson.co.uk

Return to “Networking and servers”