Introduction: The OreServer - a Raspberry Pi Dedicated Minecraft Server With LED Player Indicator
July 2020 UPDATE - Before you start on this project, please be aware that A LOT of changes and updates have been made to the various software tools I used to create this over two years ago. As a result, many of the steps no longer work as written. The project can still be completed, and is still a ton of a fun, but please expect to have to do your own tinkering to make everything work. Some solutions may be found in recent comments at the end of the instructable. Thank you, and happy mining!
If you're a fan of playing Minecraft you have probably thought about how fun it would be to have your own personal server to share with your friends. My sons were constantly asking me for their own shared world, and eventually their interest in Minecraft combined with my interest in the Raspberry Pi, and the idea for the OreServer was born.
This project will show you how to set up a Minecraft server with a fun and unique feature - it's built to resemble an ore block, and it lights up with different colors depending on how many people are currently playing on your world!
But it doesn't stop there! We will also make the server accessible to anyone with the PC edition of Minecraft, so you can share your server address and invite friends into your world. It will be running 24/7, so even if you're busy or out of the house your friends can keep building. And we will set up automatic backups just in case tragedy strikes (that TNT cannon sounded like a good idea at the time...) so you can reset from a previous days work.
Step 1: Parts & Tool List
These are the parts, tools, and software you're going to need to complete this project. I've added links for reference, but most of these supplies are available from multiple vendors, so pick them up wherever is easiest / cheapest for you.
Parts:
- Raspberry Pi 3 & Power Supply
- These are also available as a set
- Micro USB right angle adapter
- MicroSD Card
- Minimum 8 GB, but a high quality 16 or 32 GB card is recommended
- Adafruit Neopixel Jewel
- Three short GPIO wires
- Silver or Gray 3D printing filament (Any type)
- 2.5mm screws (x4)
- Parchment paper or white tissue paper
Tools:
- MicroSD card reader
- Soldering equipment
- Small screwdriver
- 3D printer
Software:
- Minecraft (Java PC Edition)
- Raspbian Lite ISO
- NOT the "with Desktop" version
- etcher.io
- Putty or a similar SSH terminal client
- Filezilla or similar FTP client
Step 2: Setup and Prepare the Raspberry Pi
Before we can start installing the server we need to complete some basic setup and configuration steps on the Pi.
1. Prepare the MicroSD card
First up, we need to put the Rasbian operating system onto our MicroSD card using etcher.io.
- Insert your MicroSD card into your card reader, and the card reader into a USB port on your PC
- Run etcher and use the Select Image button to load the Rasbian Lite ISO
- Select the MicroSD card for the installation drive
- Click Flash!
When the process completes etcher will detach the MicroSD drive from the system, but we need to add one more file so just unplug it and plug it back in. The card will now read as a drive labeled "boot". Copy a blank file named "ssh" into the boot drive, and then detach the MicroSD drive from the system again. The MicroSD card is now ready to move into the Raspberry Pi.
** If you can't download the "ssh" file, it's easy to make your own by simply renaming a blank text file. Make sure you delete the ".txt" extension. When it works, the icon will become blank like in the screenshot. **
2. Connect to the Pi's terminal
Now that the Pi has an operating system, let's power it up!
- Plug in both a wired ethernet cable and the power supply to the Rasberry Pi. Although the Pi 3 does have built in Wi-Fi support, a wired connection is more robust and preferable for our server.
- Next we need to retrieve the Pi's IP address from your router. This step will differ slightly depending on your router brand - in my case I enter 192.168.1.1 into my browser to login to the router control panel. You'll be looking for a DHCP client list, and an entry named "raspberrypi". Note the assigned IP address, in my example it is 192.168.1.115. Now is also a good opportunity to set the IP address as "reserved" or "permanent" so that it doesn't get assigned a different address later. If you have any difficulties with this step you'll want to check your router's documentation or support site for details.
- Now we can open Putty, enter the Pi's IP address in the "Host Name" field, and click "Open".
You should now be looking at a black screen with "login as:". This is your Pi's terminal, and it's where we are going to be doing the rest of the work of setting up the server. Remember, terminal screens are for keyboards! Your mouse won't be much use here.
3. Raspi-config
To finish the initial setup we need to login using the defaults:
login as: pi password: raspberry
Now we can go through some basic setup of the Pi's default settings by entering the following
sudo raspi-config
We need to make several changes, and I'm going to take you through them in the same order as they are numbered on the configuration screen.
- Change User Password - This is a must! Everyone knows the default password, so change it immediately.
- Network Options
- Hostname - by default this is "raspberrypi", but if you wish you can change it to be more descriptive
- -(no change)-
- Localisation Options - if you aren't in the UK you're going to want to change these to your own country. My examples assume that's the US.
- Change Locale - use your down arrow to find an entry for "en_GB" with an * next to it. Use your spacebar to remove that * and then go down a little further to "en_US.UTF-8" and again use spacebar to mark it with *.
- Change Timezone - setting this is important for our timed tasks to work correctly
- Change Keyboard Layout - you might be able to skip this, but if left on UK there are a few keyboard symbols that are moved around
- -(no change)-
- SSH - Enable this so that you can continue to use Putty after rebooting the Pi.
- Expand Filesystem - this makes sure the Pi can use all the space available on the SD card
- -(no change)-
- Memory Split - change this to 16 to free up more memory for Minecraft's use.
Now select "Finish", and then select "Yes" to reboot.
This will terminate your session in Putty. Simply give it a moment to complete the reboot, then open Putty again and reconnect to the Pi's IP address. Remember to use your new password!
Step 3: Install the Dedicated Server
Setting up the server software is the longest step, but also the most important. We will be spending a lot of time entering a bunch of boring Linux commands. Don't let that intimidate you! As long as you can copy and paste you can get through this part.
A Minecraft server is fairly complex, and running it on a computer as small as a Raspberry Pi requires some streamlining. I started out with this fantastic tutorial by James Chambers, because he has several great tips on maximizing server performance. I am going to summarize his installation process below, and highlight some changes and updates I've made, but I strongly recommend you give his page a read for more details.
Now that you've logged back in using the default "pi" and your new password, we can start entering the commands to install the server files.
Important - Lots of these commands are long and complex and would be a real pain to type into the terminal window. So don't do it! Highlight the command text in this window, copy it with ctrl-c, and then in your terminal window just right-click with your mouse to paste the text. See, that mouse is good for something after all!
For the rest of this step, you'll be copying each of the commands in these code text boxes. I'll give short explanations of what we are doing along the way.
We'll start by getting our software all up to date.
sudo apt-get update && sudo apt-get upgrade
Whenever you see a request for installation approval, type "y" and hit enter to accept and continue.
Minecraft runs on Java, but our "Lite" Rasbian install didn't include it, so let's grab that.
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-arm32-vfp-hflt.tar.gz
Note ** When Java gets updated to a newer version that command may become outdated. If you receive an error message you'll need to update the command for the latest version. Visit Oracle's Java downloads page, click the "Accept License Agreement" button, and then right click the link to the latest linux-arm32 file and select copy link. You'll need to use that updated link to replace the text in the above command, starting at http. **
Now we can install the Java files we just downloaded.
sudo mkdir /usr/java
cd /usr/java
If you had to change the download link for a new version, make sure you change the version number in these next commands to match.
sudo tar xf ~/jdk-8u161-linux-arm32-vfp-hflt.tar.gz
sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_161/bin/java 1000
sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_161/bin/javac 1000
cd ~
And finally, the main event you've been so patiently waiting for, let's install the Minecraft server. This is a specialized version of the server called Paper, and it is full of optimizations to improve performance.
mkdir Paper
wget https://github.com/TheRemote/RaspberryPiMinecraft/archive/master.zip
unzip master.zip -d Paper
mv ~/Paper/RaspberryPiMinecraft-master/* ~/Paper/
cd Paper
chmod +x start.sh
wget https://ci.destroystokyo.com/job/PaperSpigot/lastSuccessfulBuild/artifact/paperclip.jar
java -jar -Xms512M -Xmx800M paperclip.jar
That last command will start the server for the first time, and after a few moments you'll receive an error that says you must agree to the EULA. Open the EULA with the next command:
nano eula.txt
Change the line that says "eula=false" to "eula=true". Save your changes by hitting ctrl-x, then Y, then enter.
Note ** James Chambers mentions a method for overclocking your SD card at this point of his guide. I have not personally tried that step, because it requires a high quality card and the one I had available to use is not anything special. I believe that the overclocking would certainly improve performance further, but even without overclocking the server runs well enough that I've gotten no complaints from the kids playing on it. **
Let's quickly take a look at the Server Properties and make a couple of changes.
nano server.properties
There is a long list of things you can change about your server here, such as personalizing the server name and MOTD, changing the gamemode, or enabling PvP or command blocks. You can change things to your preference now, or you can open this file to make more changes later, but there are two changes we will make immediately.
max-players=8
server-port=25565
Eight players is the highest I would recommend, any higher and you are very likely to see server performance get laggy, even with all the optimizations made to run things on the Pi.
Server port should be changed because like the default "raspberry" password, everyone knows the default port of 25565. Even a minor change to 26565 will help keep your server secure. Jot down the port number next to where you saved the Pi's IP address. You'll need both of those later.
Once you have finished updating your settings, save the changes by hitting ctrl-x, then Y, then enter.
The next step in preparing your server is also going to take the longest amount of time once it starts, probably about an hour. These commands will pre-generate your world, which means the server won't have to do all this work later while you and your friends are exploring.
cd ~/Paper/plugins
wget --content-disposition -E https://dev.bukkit.org/projects/worldborder/files/latest
sudo apt-get install screen
cd Paper
./start.sh
It won't look like it anything happened, but your server has now started! In order to interact with the server we need to use this command
screen -r minecraft
And then we will pre-generate the world:
wb world set 1000 spawn
wb world fill 1000
wb fill confirm
This is the part that will take a long time. Go grab a snack and check back later! When the process is done, shutdown the server with a very simple command
stop
This will save and close the server and return you to the Raspberry Pi terminal.
Our final task is setting the server to start automatically when the Raspberry Pi is plugged in or restarted. We can do this by creating a simple script.
cd ~
nano startup.sh
We've used nano to edit a couple files before, but this time we are creating one from scratch, so the window will be empty. Copy these two lines into the file:
cd /home/pi/Paper screen -dmS minecraft java -server -Dfile.encoding=UTF-8 -Xms512M -Xmx800M -XX:NewSize=300M -XX:MaxNewSize=500M -XX:+CMSIncrementalMode -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -jar /home/pi/Paper/paperclip.jar nogui
Then save your new script by hitting ctrl-x, then Y, then enter.
chmod +x startup.sh
chmod +x /etc/rc.local
sudo nano /etc/rc.local
The very last line of the rc.local file says "exit 0". Directly above that line we are going to add this:
su pi -c /home/pi/startup.sh
And once more we save the file changes with ctrl-x, then Y, then enter.
sudo reboot
You'll get a message that the connection has closed, and you can close the Putty window.
That's it! You've made it through the boring bit! Now we're ready to test our server!
Step 4: Test Your Server and Invite Your Friends
Next up, we are going to check that the server is working and make sure that our friends can join.
Open your Minecraft launcher on your PC and hit Play. Make sure you are using the latest release version to match the Paper server.
On the main screen select Multiplayer, then Add Server. Enter the name you'd like to have on your server list, and for Server Address enter your Pi's IP and the port number. For my example we use 192.168.1.115:26565. Make sure you have a colon between the IP address and port number, and that there are no spaces. Click Done, and then click play on your server. After a few moments you'll find yourself dropped into your brand new world!
Wait, come back! Don't start building all by yourself, let's invite some friends! Unfortunately, they can't use the same IP address that you do. So to make this work, you first need to tell your router that it is OK for people that are outside of your house to connect to the Pi. This is called Port Forwarding and the exact process will differ a bit depending on your router. I've attached a screenshot of what it looks like on my TP Link brand router, but you may need to check your routers support site for more info.
In your Port Forwarding settings, enter the port number you chose for your server, and then the IP address for your Raspberry Pi. Your router now knows that when your friends try to connect to that port number, they should be directed to the Pi.
Next we need to use a free service such as No-IP to create your own unique address, called a Hostname. You will also setup either your router or your PC to keep the Hostname's IP address up to date.
Follow the steps of their Setup Guide now.
When you have finished setting up your No-IP account, your friends will be able to connect to your server by entering your new Hostname and the port number in the Server Address section of their Minecraft multiplayer screen. For example, hostname.ddns.net:26565.
Step 5: Save the World! (with Automatic Backups)
This step is optional, but it's a potential lifesaver. Your world faces some serious risks, whether from a corrupted MicroSD card, occasional mischief or griefing, or just those pesky creepers. To protect all your hard work, we will have the server automatically save your world file every night. To prevent your MicroSD card from filling up we will also delete any backups that are more than a week old. After that, you can easily copy them to your own PC or another backup drive for even more security.
We will start by using Putty to reconnect to our Pi in order to make another new script.
nano dailybackup.sh
Copy the following commands into the script:
# Stop the Minecraft server screen -x minecraft -X stuff stop^M sleep 5 # Copy Paper directory to backup/PaperYYDDMM cp -a Paper/. backup/Paper$(date +%F) # Delete backups older than 7 days find backup/* -mindepth 0 -maxdepth 0 -type d -ctime +7 -exec rm -rf {} \;
And then, say it with me - save your file by hitting ctrl-x, Y, enter.
Now we will create a recurring task to run the backup script every night using crontab.
crontab -e
You'll be given a choice of editors the first time you run this command, select number 2 for Nano.
This will open a special file for scheduling tasks. At the bottom of this file add the following lines:
5 0 * * * /home/pi/dailybackup.sh 15 0 * * * sudo reboot
The first line tells the Pi to run your backup script at 12:05am every night. The second line tells the Pi to reboot ten minutes later. If you would prefer a different time for the backups and reboot you can change these lines to suit your preference. Just remember that the first number is the minute and the second number is the hour in 24hr format. The three asterisks make sure that this script will run every day.
Once your system has been running for a while, you may want to get in the habit of saving the backups to another location off of the Pi's MicroSD card. This task is made very simple by connecting to your server using Filezilla. Simply drag the backup folder off of the right side of the Filezilla and drop it to your PC. Once it copies all the files you can store them for as long as you'd like!
And if tragedy ever strikes and you need to go back to one of your save files, it's a quick and simple procedure. First make sure you've stopped the server:
screen -r minecraft
stop
Then use Filezilla to delete the Paper directory and replace it by dragging one of your saved directories back to the Pi. Make sure you delete the date from the directory name so it is again named simply Paper. Then you can restart your server with
./startup.sh
And just like that, you can get back to the business of building!
Step 6: Hook Up the LEDs
Time to add some lights! This is where your server starts to become more than just a dust collector behind your monitor. This step will show you how to solder and attach the Neopixel Jewel to the Raspberry Pi, and then install the software needed to run the LEDs. Soon after that you'll never have to wonder whether someone is online waiting to play with you, because your server will tell you with just a glance!
Adafruit's Neopixel's are fantastic LEDs. They are RGB, which means they can light up in any color you want. They are addressable, which means you can use software commands to change their color whenever you want. For a lot more great info on how the Neopixels work with Raspberry Pi take a look at the official Adafruit guide.
The Jewel has 7 LEDs which will give us plenty of strong bright color. There are also five solder contact points, but we will only be using three. I strongly recommend that you use three different colored wires to avoid mixing them up when you connect them to the Pi later. In my example photos I used red, black, and brown.
Before beginning this step you will want to have the Raspberry Pi completely powered down. Enter these commands and then unplug the Pi's power supply.
screen -r minecraft
stop
sudo shutdown -h now
Cut off three female GPIO wires, long enough that you have plenty of wire to work with while soldering. You can always loop up the excess like I did. Carefully solder the wires to the contacts on the Jewel. Then attach the female connectors to the Raspberry Pi GPIO pins:
PWR to pin 1 = 3.3V
GND to pin 6 = Ground
IN to pin 12 = GPIO18
Once the Jewel is in place, you can plug the Pi back in and use Putty to connect and install the LED software with the following commands. Watch for spots that may ask you to enter Y to continue the installation.
sudo apt-get install build-essential python-dev git
sudo apt-get install scons
sudo apt-get install swig
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
scons
Important ** In the next step we are going to make a minor addition to the neopixel library. This is necessary to avoid a memory error that drove me nuts for several days. Without it the LEDs will work for a few hours and then stop updating correctly. **
cd python
python setup.py build
sudo nano build/lib.linux-armv7l-2.7/neopixel.py
Use the down arrow to scroll past the line that says "class Adafruit_NeoPixel(object):. Not far past that you'll find a section with blue text that says def _cleanup(self). You'll be copying the following line into this section, exactly as shown in the screenshot above.
ws.ws2811_fini(self._leds)
And once more we need to save changes with ctrl-x, Y, enter.
cd ~
cd rpi_ws281x/python
sudo python setup.py install
Next we need to tell the test file the number of LEDs we have, then we can light them up!
cd examples
sudo nano strandtest.py
Find the line that says LED_COUNT = 16 and change it to LED_COUNT = 7, then ctrl-x, Y, enter to save.
sudo python strandtest.py
If everything has gone correctly, you've just been blinded by a flashing rainbow explosion. When you can see again, hit ctrl-c to stop the lights. The LEDs won't turn off, but they will stop flashing and that is good enough for now.
Step 7: Program the LEDs to Check the Server Status
With our LEDs installed and ready, it's time to make them react to the server. Specifically, we will make them indicate the current number of players on the server:
Players = Ore
- 0 = Redstone
- 1-2 = Iron
- 3-4 = Gold
- 5-6 = Emerald
- 7-8 = Diamond
If the server is not running, the Oreblock will be Coal (LEDs off). And as an added bonus, if the status check can't find an internet connection the LEDs will blink yellow!
In order to retrieve the player count from the server we are going to install mcstatus from Nathan Adams, one of Mojang's game developers.
sudo apt-get install python-pip
sudo pip install mcstatus
Then we need to copy the two python scripts below, mcled.py and ledoff.py, to our server with Filezilla. Simply drag and drop the two scripts into the box on the right, as shown in the screen shot.
Go ahead and test ledoff.py right now, so we can turn off the LEDs that got left on in the previous step.
sudo python ledoff.py
When running the scripts manually like this you'll receive a message saying "Segmentation fault". This is an unresolved issue in the Neopixel.py library that has no effect on what we're doing.
If you are curious about how these scripts operate, you can open them with any text editor on your PC, or using nano on the terminal screen. Just be careful not to accidentally save any changes that might stop them from working!
Note ** mcled.py assumes you are using port 26565 from my example. If you are using a different port you must change the script to match with the following steps **
sudo nano mcled.py
Find a red line of text that says "# Get server player count", and below that you will see a line that includes green text that says "localhost" and the port number next to that. Change the port number to match yours, and as always save your changes with ctrl-x, Y, enter.
In order to get constant updates on the server status we are going to tell the Pi to run the mcled.py script every minute, and that means setting up another couple of lines in crontab.
crontab -e
You'll see the two lines we added earlier for scheduling backups and reboots. Now we will add two more:
* 6-20 * * * sudo python mcled.py
0 21 * * * sudo python ledoff.py
The first line tells the Pi to run mcled.py every minute of every hour between 6am and 8:59pm. The second line tells the Pi to turn off the LEDs at 9pm. That's a personal preference, because by that time my kids are no longer playing Minecraft, even though the server keeps running. We also have the OreServer prominently displayed above our TV and the bright light becomes an irritant in the evening. You can of course alter these two lines to make the LEDs run non-stop, or turn off later, or whatever suits your own purposes.
Soon after your changes are saved (are you sick of ctrl-x, Y, enter yet?) the script will be called and your Jewel will light up again. It will most likely be red to indicate that the server is running but not in use. Take a moment now to launch Minecraft and join the server as we did during our earlier test. Shortly after you've joined, the LEDs should switch to white, and then back to red when you disconnect.
Step 8: Make the Ore Case
The final touch to bring this all together is the oreblock case for the Raspberry Pi. To make the Ore case, I used the Lulzbot TAZ6 3D printer at my local makerspace, RiverCityLabs. I've provided my printable .STL files for the base and top below. If you don't have your own 3D printer, check your area for a maker community, they're great! Or you might have a local library or school that has printers accessible to the public. There are also several online 3D printing services that can print and ship you a design. Or you can get creative! There's nothing to stop you from making the case out of cardboard or a pile of gray Lego or whatever else you have close to hand.
Some important notes for when you set up the 3D printer files:
- Print the file without any scaling changes to make sure the mounting holes line up with the Pi.
- Turn the Top upside down so that the open end is facing up.
- Make sure to turn on your support settings, so the overhangs on the walls don't get messy.
Once your print is completed you can attach the Pi to the Base with four 2.5mm screws. I can't find a link to the actual product but I found these in a 2 pack at Menards, which was way better than ordering a box of 100 from Amazon.
Remove all the support material from the Top, and cut a sheet of parchment paper or white tissue paper to fit inside. This will diffuse the LED lights which makes the glowing effect look a million times better than just leaving the holes open.
Attach the right angle MicroUSB adapter to the power port so that the cable goes out the back of the case next to the ethernet port.
Now you can reconnect the power and ethernet cords, set the Top in place, and enjoy!
Step 9: Summary, Additional Thoughts, and Thanks
Your OreServer is now completely functional! The Minecraft server starts as soon as the Pi powers on, your world is openly accessible to your friends, the LED lights tell you how active your world is, and your progress gets automatically backed up everyday.
I hope you'll continue to explore the possibilities involved in running your own Minecraft server. Paper is compatible with a variety of plugins so there are lots of opportunities to personalize your server. However, keep in mind that loading up too many plugins could negatively impact the server performance.
Running the server on a Raspberry Pi also creates unique opportunities, as we've seen by adding LEDs via the GPIO pins. But there's no reason to stop there, and if you have other ideas for interesting improvements I encourage you to keep learning more about these systems.
I'd like to thank all the other makers that provided the tools, information, and inspiration that helped me make this idea into a reality:
- James Chambers for the immensely helpful server blogpost
- The devs of the Paper server
- Jeremy Garff and Tony DiCola for the Raspberry Pi Neopixel library
- Nathan Adams for the mcstatus server query tool
- RiverCityLabs.space for the amazing community of local makers
- and about a million unnamed internet strangers whose combined knowledge answered so many questions and resolved so many issues while I worked through this project.
And finally, I'd like to thank my family for being patient and supportive during the many hours spent completing this adventure.

Grand Prize in the
Minecraft Challenge 2018

Participated in the
First Time Author Contest 2018

Participated in the
Epilog Challenge 9
2 People Made This Project!
- Dwargh made it!
- Andreww160 made it!
69 Comments
Question 2 years ago
Can i use chrome dev
Question 2 years ago
What if my pi shorts out while using chromium
2 years ago
Going to do this now
Question 2 years ago
so i have set up the server, it works, got the neopixel to light up with strandtest, mcstatus shows me i have 1 player connected, but neopixel will not light
this is the start of mcled.py
from mcstatus import MinecraftServer
from neopixel import *
from time import sleep
import urllib2
should this mcled.py be in a specific folder to work??
ran this and this was the response
pi@raspberrypi:~ $ sudo python3 mcled.py
File "mcled.py", line 25
test = 0
^
TabError: inconsistent use of tabs and spaces in indentation
Answer 2 years ago
"TabError: inconsistent use of tabs and spaces in indentation" sounds like maybe an extra space got added or deleted and it can't understand the code now? Line 25 is in the Check Internet section. I've attached an image of what the spacing on mine looks like when I open the mcled.py file via putty. Does yours match?
If it looks identical but still doesn't work, you might want to re-download a fresh copy of the original file and make any necessary edits and try again.
Reply 2 years ago
have reloaded everything
this is the response i get, mcstatus is working but mcled.py
RP3B V2 with python3 java 11
pi@raspberrypi:~ $ mcstatus localhost:26565 status
version: vPaper 1.16.1 (protocol 736)
description: "{'extra': [{'text': 'minecraftserver'}], 'text': ''}"
players: 0/8 No players online
pi@raspberrypi:~ $ sudo python3 mcled.py
File "mcled.py", line 25
test = 0
^
TabError: inconsistent use of tabs and spaces in indentation
pi@raspberrypi:~ $ sudo python mcled.py
Traceback (most recent call last):
File "mcled.py", line 1, in <module>
from mcstatus import MinecraftServer
ImportError: No module named mcstatus
pi@raspberrypi:~ $
Reply 2 years ago
Dont worry, ive figured it out. Thanks for the instructable. A lot has changed since you wrote it but it pushed me in the right direction. This is my second raspberry pi project, but the hardest. Has been great fun. Sorting out all the changes required for python3 and the latest java have been a headache, but got there in the end. Successful run of server, lights change according to players. mcled.py needed alterations for python3, thats where i was banging my head against the wall.
Kids are happy and we are sharing with there school friends during the holidays here in the UK
What to make next and annoy the wife with the amount of time I have wasted on this project
Reply 2 years ago
Very glad to hear that you got it worked out in the end. As you say, lots has changed with the underlying software in the past two years and I haven't kept up with since my server hasn't needed changes.
I think it's probably overdue for me to add a disclaimer at the top that a lot of the steps here are out of date now.
Reply 2 years ago
I will add all my notes once i finish with the steps and links to complete this project in 2020. I have had it working on a pi3b now, just set up a pi4 for faster response, runs really well, box is built, the jewel is down one led and lights are not quite correct colours for my sons liking, once i have done that ill finish my notes in an understandable format. the 2to3 tool for python was useful to, mcled.py needed more adaptions than ledoff.py for current python. Thanks for your help, this has certainly been an amazing learning curve and something that has fascinated my 8 and 9 year old. Next week should be up and running for their friends
Reply 2 years ago
Any chance you can share your notes or code samples to get this to work. I too am having the same issues. Thank you.
Question 2 years ago
What if ive already set up my PI and done stuff with it?
Question 2 years ago
Same as MajesticKitty. The server is up and running and the LEDs work with the strandtest program. But I'm not getting any love from the neopixel when the server is running. No lights at all. I've checked that I have the correct port (25565) again (and again) but nothing seems to be wrong. Being a total Raspberry Pi newbie, I'm not sure how to test this any further.
Answer 2 years ago
I'm having this problem as well - strandtest is successful, but then nothing. I believe there's some issue with mcstatus not being able to report the server status, but I can't figure out what it might be. When I run 'mcstatus localhost ping' from the terminal, I get the following output that I can't make any sense of:
Traceback (most recent call last):
File "/usr/local/bin/mcstatus", line 10, in <module>
sys.exit(cli())
File "/usr/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/mcstatus/scripts/mcstatus.py", line 50, in ping
click.echo("{}ms".format(server.ping()))
File "/usr/local/lib/python2.7/dist-packages/mcstatus/server.py", line 36, in ping
connection = TCPSocketConnection((self.host, self.port))
File "/usr/local/lib/python2.7/dist-packages/mcstatus/protocol/connection.py", line 129, in __init__
self.socket = socket.create_connection(addr, timeout=timeout)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
socket.error: [Errno 111] Connection refused
Reply 2 years ago
Mine was a total noob error. I had mcled.py in the wrong folder! Moved it to the correct location and works fine now
Reply 2 years ago
Which is the correct location as I presume I have made that mistake
Reply 2 years ago
This is one more in a growing number of issues based on continuing changes to the external software used for this project. In this case, notes on the https://github.com/Dinnerbone/mcstatus page indicate it no longer supports python 2.7, which appears to be the cause of the errors above.
Updating to the latest version of python is probably the best way to fix this? Or else you'd need to use version 2.3 of mcstatus from the https://github.com/Dinnerbone/mcstatus/releases page.
Question 3 years ago
Can you have a world and later move it into the server?
Answer 3 years ago
Of course! You only need to replace the generated world with your's, and change name (if needed)
Reply 3 years ago
I haven't tried moving an existing world from another system onto the Pi, only creating new ones directly on the server. If you have an opportunity to test out the idea, please let us know how it goes!
Question 3 years ago
When I try to install the java I have the new java from step 3 and when I enter it after a bit of code i get an error "401 authorization required" and "username/password authentication required