Scott Hanselman

How to use a Raspberry Pi 4 as a Minecraft Java Server

September 08, 2020 Comment on this post [65] Posted in Gaming
Sponsored By

imageMy 14 year old got tired of paying $7.99 for Minecraft Realm so he could host his friends in their world. He was just hosting on his laptop and then forwarding a port but that means his friends can't connect unless he's actively running. I was running a Minecraft Server in a Docker container on my Synology NAS but I thought teaching him how to run Minecraft Server on a Raspberry Pi 4 we had lying around would be a good learning moment.

First, set up your Raspberry Pi. I like NOOBS as it's super easy to setup. If you want to make things faster for setup and possibly set up your Pi without having to connect a monitor, mouse, or keyboard, mount your SSD card and create a new empty file named ssh, without any extension, inside the boot directory to enable ssh on boot. Remember the default user name is pi and the password is raspberry.

SSH over to your Raspberry Pi. You can use Putty, but I like using Windows 10's built-in SSH. Do your standard update stuff, and also install a JDK:

sudo apt update
sudo apt upgrade
sudo apt install default-jdk

There are other Minecraft 3rd party Java Servers you can use, the most popular being Spigot, but the easiest server you can run is the one from Minecraft themselves.

Go to https://www.minecraft.net/en-us/download/server in a browser. It'll say something like "Download minecraft_server.1.16.2.jar and run it with the following command." That version number and URL will change in the future. Right-click and copy link into your clipboard We are going to PASTE it (right click with your mouse) after the "wget" below. So we'll make a folder, download the server.jar, then run it.

cd ~
mkdir MinecraftServer
cd MinecraftServer
wget https://launcher.mojang.com/v1/objects/c5f6fb23c3876461d46ec380421e42b289789530/server.jar
java -Xmx2500M -Xms2500M -jar server.jar nogui

You'll get a warning that you didn't accept the EULA, so now open "pico eula.txt" and set eula=true, then hit Ctrl-X and Yes to save the new file. Press the up key and run your command again.

java -Xmx2500M -Xms2500M -jar server.jar nogui

You could also make a start.sh text file with pico then chmod +x to make it an easier single command way to start your server. Since I have a Raspberry Pi 4 with 4g gigs of RAM and it'll be doing just this one server, I felt 2500 megs of RAM was a sweet spot. Java ran out of memory at 3 gigs.

You can then run ifconfig at and command line and get your Pi's IP address, or type hostname to get its name. Then you can connect to your world with that name or ip.

Running Minecraft Servers

Performance Issues with Complex Worlds

With very large Minecraft worlds or worlds like my son's with 500+ Iron Golems and Chickens, you may get an error like

[Server Watchdog/FATAL]: A single server tick took 60.00 seconds (should be max 0.05)

You can workaround this in a few ways. You can gently overclock your Pi4 if it has a fan by adding this to the end of your /boot/config.txt (read articles on overclocking a Pi to be safe)

over_voltage=3
arm_freq=1850

And/or you can disable the Minecraft internal watchdog for ticks by setting max-tick-time to -1 in your server's server.properties file.

We solved our issue by killing about 480+ Iron Golems with

/kill @e[type=minecraft:iron_golem]

but that's up to you. Just be aware that the Pi is fast but not thousands of moving entities in Minecraft fast. For us this works great though and is teaching my kids about the command line, editing text files, and ssh'ing into things.


Sponsor: Never miss a beat with Seq. Live application logs and health checks. Download the Windows installer or pull the Docker image now.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
September 08, 2020 4:31
Thanks for this timely post. My son, 9, is really starting to get into Minecraft and I've been interested in hosting a server for him. I was thinking of trying it on a Synology, but may try a Pi instead.
September 08, 2020 14:30
You have really good point,..all your given information is so accurate and helpful. When any academic subject stands as a breaker between your academic success for often you end up pondering over whether there's, and you think, “Now Who Can Help Me Out ?”, helpinhomework.org will answers your all assignment barriers. online assignment help
September 08, 2020 18:04
Good morning! If you do not have a proper support in writing your assignments, then you need to ask it at this fantastic online expert-writers.net writing agency. I highly recommend it from my own cooperation with this super company for the last four years of my students life!!!
September 08, 2020 18:18
14!? It seems like you were blogging about baby sign language not that long ago...
September 08, 2020 20:08
We had a spare PC and we installed Ubuntu on it and Minecraft Server Manager. It has given my (also 14 year old) son a reason to learn the terminal to ssh into the server, use scp to copy files to the server, navigate the file system from the terminal, unzip, sudo, edit the eula file (using nano), etc. Using msm, he has been able to setup several worlds for him to play with friends and also his little brother to play with his friends. I just have to do the port forwarding on the Eero (I wish they had range port forwarding ... I have asked).
September 08, 2020 22:25
Scott, as ususal, you are one point with a blog post or pod cast.

Reasonable software engineer here but honestly, my 11 yo knows 25x more about Minecraft than I do. If I follow your suggestion, does that require that everyone runs the Java version of Minecraft? I was hoping to setup a server for my daughter and 6 of her friends but they are all on PC and XBox. The Realms Plus looks OK but as you pointed out, that requires that she is active. I don't mind paying a bit to make this work.

Thanks!
September 10, 2020 0:30
Andrew, Minecraft provides an official version of the Bedrock server, which is currently in alpha, but should work with both PC and Xbox game clients:

Minecraft Bedrock Server (alpha release)

Scott, have you tried the Bedrock server on the Raspberry Pi?
September 10, 2020 7:45
Really useful post, been trying to host a server on my pi4 for some time now and this comes really handy, thank you!
September 15, 2020 12:06
A Minecraft server on a Raspberry Pi, another fine example of the possibilities of this nanocomputer. Recently, I replaced my desktop PC by a Raspberry and set up a website analysis tool with this mini server.
Good idea, I'm going to surprise my children with a local Minecraft server like yours!
September 15, 2020 17:05
Nice post!
September 17, 2020 20:01
Really cool project. Didn't think you can do it on Raspberry Pi.
October 12, 2020 15:27
Up front, I work for balena - but this is a community project, not a balena one:

https://www.balena.io/blog/how-to-create-a-minecraft-server-for-the-pi-4-with-balena/
October 31, 2020 2:24
I know this if off topic but I'm looking into starting my own weblog and was curious what all is required to get setup?
I'm assuming having a blog like yours would cost a pretty penny?

I'm not very internet smart so I'm not 100% certain. Any recommendations or advice would be greatly appreciated.
Appreciate it
October 31, 2020 5:02
https://champ777th.com
October 31, 2020 9:55
Howdy! This is my first visit to your blog! We are a team
of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work on. You have done a marvellous job!
October 31, 2020 14:37
I love yoour blog.. very nice colors & theme. Did you design this website yourself oor did
you hire someone to do it for you? Plzz respond as I'm looking too
design my oown blog and wouhld like to know where u gott this from.
thank you
https://writeanessayforme.info/
cheap essay writing
cheap essay writing
https://writeanessayforme.info/ https://writeanessayforme.info/6994-scholarship-essay-applications.html
October 31, 2020 18:42
Hi there, just became alert to your blog through Google, and found that it is really informative.
I am gonna watch out for brussels. I'll be
grateful if you continue this in future. Lots of
people will be benefited from your writing.
Cheers!
October 31, 2020 23:39
Hi, I do think your blog could possibly be
having internet browser compatibility issues. When I look at your blog in Safari, it looks fine
however when opening in IE, it's got some
overlapping issues. I merely wanted to give
you a quick heads up! Besides that, great website!
November 01, 2020 0:30
My brother suggested I may like this web site. He used to be entirely right.

This submit actually made my day. You cann't imagine simply how a lot time I had spent for this info!
Thanks!
November 01, 2020 2:03
hello!,I like your writing so much! proportion we be in contgact extra approximately your article on AOL?
I need a specialist inn this arera to resolve my problem.
Maybe that iss you! Taking a look forward to see you.
https://admissionessaywritingservice.com
top essay wrriting websites
top essay writing websites
https://admissionessaywritingservice.com https://admissionessaywritingservice.com
November 01, 2020 13:20
Why visitors still use to read news papers when in this
technological globe the whole thing is presented on web?
November 01, 2020 21:39
fantastic points altogether, you simply gained a
new reader. What may you suggest about your submit that you
just made some days ago? Any certain?
November 02, 2020 2:46
This is very fascinating, You're a very professional blogger.
I've joined your feed aand sitt upp for looking for extra of your magnificent post.

Also, I've shared your site in my social networks
https://servicethesis.com
write an essay
write an essay
https://servicethesis.com
November 02, 2020 3:16
Hi there to all, how is all, I think every one is getting more from this web site, and
your views are pleasant in support of new people.
November 02, 2020 5:32
Hurrah, that's what I was seeking for, what a data! existing here at this blog, thanks admin of this site.

https://writingmypaper.com/
eszay writing
essay writing
https://writingmypaper.com/ https://writingmypaper.com/
November 02, 2020 5:41
I am regular reader, how are you everybody?

This article posted at this website is in fact nice.

https://essaysonservice.com/
buy custom essay
buy custom essay
https://essaysonservice.com/ https://essaysonservice.com/
November 02, 2020 6:06
I pay a visit everyday some web pages and information sites
to read articles, however this website provides quality based
posts.
https://highqualitywritingservice.com
last minute essay writing service
last minute essay writing service
https://highqualitywritingservice.com
November 02, 2020 8:04
I am regular reader, how are you everybody? This post posted at this web page is truly fastidious.
November 02, 2020 8:59
Fantastic beat ! I wish to aplprentice while you amend you site,
hoow could i subscribe for a blogg website? The accouunt helped me a acceptablle deal.
I had been tiny bit acquainted of this your broadcast
provided bright clear concept
https://australianessaywritingservice.info
buy essay papers online
buy essay papers online
https://writinganessay.info https://servicethesis.info
November 02, 2020 9:14
I'll right away seize your rss as I can not to find youur e-mail subscription hyperlink
or e-newsletter service. Do you have any? Kindly permit me realize in ordder thwt I may subscribe.
Thanks.
https://writemycustompaper.com
college application essay writing service
college aplication essay writing service
https://writemycustompaper.com
November 02, 2020 9:49
Hello, i feel that i saw you visited mmy weblog thus i got here too go back the want?.I am trying too find issues to
improve my site!I suppose its ok to use some of your ideas!!

https://researchpaperorder.com
essay writing service reviews
essay writing service reviews
https://researchpaperorder.com
November 02, 2020 10:13
What's Taking place i am new to this, I stumbled uplon this I have found It
positively helpful and it has helped me out loads. I hope to contribute & help different customers like its helped me.
Good job.
https://essayserviceuk.info
professional essay writing service
professional essay writing service
https://writinganessay.info https://writingmypaper.info
November 02, 2020 10:48
Hello, yeah this piece of writing is genuinely nice and I
have learned lot of things from iit on the topic of blogging.thanks.


https://orderessaycheap.com
help with essay
help with essay
https://orderessaycheap.com
November 02, 2020 12:01
Hello there, just became aware of your blog through Google, and found that it's really informative.

I'm gonna watch out for brussels. I will appreciate if you continue this in future.
Many people will be benefited from your writing. Cheers!
November 02, 2020 13:58
Hi there! I know this is kinda off topic however ,
I'd figured I'd ask. Would you be interested in exchanging links or maybe guest
authoring a blog article or vice-versa? My website covers a lot of the same subjects as yours and I think we could greatly
benefit from each other. If you're interested feel free to shoot me an e-mail.

I look forward to hearing from you! Excellent blog
by the way!
November 02, 2020 15:30
I'm curious to find out what blog system you have been working
with? I'm experiencing some minor security issues
with my latest blog and I'd like to find something more risk-free.
Do you have any suggestions?
November 02, 2020 16:26
I like reading a post that can make people think.

Also, thank you for permitting me to comment!
w88
November 02, 2020 17:33
Hi there! Quick question that's totally off topic. Do you know
how to make your site mobile friendly? My blog looks weird when viewing from my iphone.
I'm trying to find a theme or plugin that might be able to resolve this issue.
If you have any recommendations, please share.

Thanks!
November 03, 2020 2:14
Pretty element of content. I just stumbled upon your blog and
in accession capital to assert that I get actualloy
enjoyed account your blog posts. Anyway I'll be subscribing in your augmentt and
even I success you get right off entry to constantly fast.

https://bartlebywrite.info/hrm-dissertation-writing.html
buy essays
top essay writing service
https://bartlebywrite.info/goals-for-college-essay.html https://bartlebywrite.info/basketball-training-business-plan.html
November 03, 2020 2:30
When someone writes an piecce of writing he/she
keeps the image of a user in his/hermind that how a user can understand it.

Therefore that's why this piece of writing is outstdanding.
Thanks!
https://professionalessaywritingservice.com/
cheap essays
cheap essays
https://professionalessaywritingservice.com https://professionalessaywritingservice.com/
November 03, 2020 5:24
Hey there! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked
hard on. Any tips?
November 03, 2020 6:39
magnificent submit, very informative. I wonder why the opposite specialists of this sector don't notice this.
You must proceed your writing. I'm confident, you have a great readers' base already!
w88
November 03, 2020 8:44
Hi to every one, it's truly a good for me to pay
a quick visit this site, it includes priceless Information.
November 03, 2020 9:22
I used to be recommended this wesite by my cousin. I am no longer sure whether orr not this put up is written by him as
nobody else realize uch designated about my difficulty.
You're incredible! Thank you!
https://buycustomessay.info/write-an-essay-online.html

essay writing srrvice usa
https://buycustomessay.info/ https://buycustomessay.info/research-papers-on-ebola-virus.html
November 03, 2020 12:47
magnificent put up, very informative. I'm wondering why the opposite specialists of this sector don't
realize this. You should continue your writing.
I am sure, you've a huge readers' base already!
November 03, 2020 21:20
Have you ever thought about creating an e-book or guest authoring on other websites?
I have a blog centered on the same information you
discuss and would love to have you share some stories/information. I know my readers would value
your work. If you are even remotely interested,
feel free to send me an e mail.
November 03, 2020 22:19
Hmm it looks like your blog ate my first comment (it was
super long) so I guess I'll just sum it up what I
submitted and say, I'm thoroughly enjoying your blog.
I as well am an aspiring blog blogger but I'm still new to everything.

Do you have any tips for beginner blog writers?
I'd certainly appreciate it.
November 04, 2020 5:06
Very good article. I am going through a few of these issues
as well..
https://writingmypaper.info/do-my-thesis-paper.html
website tto write essays
website to write essays
https://writingmypaper.info/dissertation-bts-reve.html https://writingmypaper.info/
November 04, 2020 5:24
Good site you have here.. It's difficult to find high quality
writing like yours nowadays. I seriously appreciate people
like you! Take care!!
November 04, 2020 8:01
excellent issues altogether, you just won a brand new reader.

What would you suggest about your put up that
you simply made some days ago? Anyy certain?
https://helpassignmentwritingservice.info/
best college paper writing service
best college paper writing service
https://helpassignmentwritingservice.info/argumentative-essay-on-drinking-age.html https://helpassignmentwritingservice.info/housekeeping-business-plan.html
November 04, 2020 11:46
Now I am going to do my breakfast, later
than having my breakfast comiing again to read further
news.
https://bestessaywritingservice.info/

essay writing services
https://bestessaywritingservice.info/wdm-dissertation.html
November 04, 2020 13:04
Write more, thats all I have to say. Literally,
it seems as though you relied on the video to make your point.
You obviously know what youre talking about, why throw awqay your intelligence on just posting videos to your weblog
when you could be giving us something informative to read?

https://essayservicesall.com
buy essays online
buy essays online
https://essayservicesall.com https://essayservicesall.com
November 04, 2020 15:30
Heya i am for the first ime here. I came across this board and I
in finding It truly helpful & it helped mme out much.
I'm holping to provide something agan and help others such as you helped me.

https://essaywritingtld.com
online essay writing
online essay writing
https://essaywritingtld.com https://essaywritingtld.com
November 04, 2020 15:31
When someone writes an article he/she retains
the plan of a user in his/her mind that howw a user can understand it.
So that's why this post is outstdanding. Thanks!

https://buyessaywritingservice.com
best essay writing service inn usa
best essay writing service in usa
https://buyessaywritingservice.com
November 04, 2020 19:46
Howdy! I know this is kinda off topic nevertheless I'd figured I'd ask.
Would you be interested in exchanging link or maybe guest authoring a blog article or vice-versa?
My website discusses a lot oof the same subjects as yours and I feel we ould greatly benefit from each
other. If you aree interested feel free to sholot me an email.
I look forward to hearing from you! Wonderful blog by the way!

https://buyessayscc.com
help essay
help essay
https://buyessayscc.com https://buyessayscc.com
November 04, 2020 19:53
Hi there, I log on to your blog like every week. Your humoristic style is awesome,
keep up the good work!
https://buyessayprices.com
best online essay writing service
best online essay writing service
https://buyessayprices.com
November 05, 2020 0:30
Howdy! This post couldn't be writte much better! Lookingg through this post reminds me of my previous roommate!
He constantly kept talking about this. I'll forward this information to him.

Fairly certain hhe will have a great read. I appreciate you for sharing!


https://writepapersforme.com
write my essay online
write mmy essay online
https://buyessaywritingservice.com https://buyessaywritingservice.com
November 05, 2020 1:02
Remarkable! Its in fact awesome paragraph, I have got much clear idea regarding
from this piece of writing.
November 05, 2020 1:59
I must thank you for the efforts you've put in writing this site.
I really hope to see the sam high-grade blog posts from you later on as well.

In fact, your creative writing abilities has inspiored me to gget my ver oown blog now
;)
https://bartlebywrite.info/bibtex-dissertation.html
essay online
essay online
https://bartlebywrite.info/
November 05, 2020 2:02
Excellent goods from you, man. I've understand your stuff previous to and
you're just too fantastic. I really like what you've acuired
here, really like what you're saying and the way in which yoou say it.You make it entertaining and you still care for to keep it sensible.

I can not wait to read far more from you. This is really a great website.

https://helpwriting.info/quotations-for-writing-essays.html
cheap essay writimg sergice usa
cheap essay writing service usa
https://helpwriting.info/bba-essay-writing.html https://helpwriting.info/
November 05, 2020 3:23
hello!,I lokve your writing sso a lot! proportion we keep up a correspondence more about yojr
post on AOL? I need a specialist on this space to unravel
my problem. Maybe that's you! Having a look ahead to
look you.
https://essaywritingservicereddit.info
buy essay nline uk
buy essay online uk
https://essaywritingservicereddit.info/eating-disorders-research-paper-essay.html https://essaywritingservicereddit.info/attorney-resume-help.html
November 05, 2020 4:05
I visit every day a few blos and blogs to read articles, but
tthis web site provides quality based posts.

https://allbestessaywritingservice.com
research papers
research papers
https://allbestessaywritingservice.com https://allbestessaywritingservice.com
November 05, 2020 5:59
Thank you, I've recently been looking for information approximately this tpic for a long time and yors is the best
I have discovered till now. But, what about the conclusion? Are
you sure about the source?
https://toppaperwritinghelp.com
custom essay help
custom essay help
https://toppaperwritinghelp.com https://toppaperwritinghelp.com
November 05, 2020 6:42
Thaznk you for any other informative weeb site. Where else may just I get that kind of information written in such an ideal way?
I've a project that I aam simply now running on, and
I've been at the look out for such information.
https://essayhelpforall.com
custom paper writing service
custom paper writing service
https://essayhelpforall.com https://essayhelpforall.com

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.