How to Install Minecraft: Java Edition on Raspberry Pi

Minecraft Java Edition Raspberry Pi

Today, there’s a version of Minecraft for pretty much every major platform – Java Edition for Windows, Education Edition for the iPad, Bedrock Edition for gaming consoles such as Nintendo Switch and PlayStation 4, and Pi Edition for the Raspberry Pi.

Minecraft: Pi Edition is based on an old version of Pocket Edition, with a few features removed to help it run more smoothly on the Raspberry Pi. Pi Edition is free to download and easy to install, but it doesn’t provide the complete Minecraft experience.

Wouldn’t you prefer to have the “full” version of Minecraft on your Raspberry Pi? You’ll learn in this article how to get Minecraft: Java Edition 1.14.4 running on Raspberry Pi 4. By following along, you can turn your Raspberry Pi into a portable Minecraft game that you can attach to any compatible screen or monitor.

You can install the full version of Minecraft: Java Edition on Raspberry Pi

What you’ll need

To complete this tutorial, you’ll need:

  • Raspberry Pi 4
  • SD card
  • Laptop or computer to download the Gentoo operating system
  • Raspberry Pi 4-compatible power cable
  • External keyboard and way to attach it to your Raspberry Pi
  • Micro HDMI cable
  • External monitor
  • Ethernet cable or Wi-Fi connection
  • Minecraft Java Edition

Now that you’ve assembled your tools, let’s install Minecraft: Java Edition on the Raspberry Pi.

Install the Gentoo operating system

This tutorial uses the Gentoo operating system, though the instructions should work for any Linux distro.

1. Gentoo will be flashed using Etcher, so if you haven’t already installed Etcher, download the latest version now.

2. On your computer or laptop, head over to Gentoo’s GitHub repository.

3. Scroll to “Raspberry Pi 4B, 3B/B+ 64-bit Full” and download the “genpi64.img.xz” file.

4. Insert your SD card.

5. Launch the Etcher application.

6. In Etcher, click “Select image” and then select the Gentoo file you just downloaded.

7. Click “Select target” and then choose your target boot medium, which in this instance is our SD card.

Etcher will now flash the system image to your SD card.

Start up your Raspberry Pi: booting into Gentoo

You’re now ready to start your Raspberry Pi:

8. Remove the SD card from your laptop or computer and insert it into your Raspberry Pi.

9. Attach your monitor to the Raspberry Pi using the micro HDMI cable.

10. Attach your keyboard to the Raspberry Pi device.

11. Plug your Raspberry Pi into a power source. The device should boot automatically into the standard Gentoo desktop.

12. If you’re connecting to Wi-Fi, select the “Network” icon in the Gentoo toolbar and then select your Wi-Fi network.

Make sure you're connected to your home network.

13. Enter your password.

Now that Gentoo is installed and you’re connected to your local network, you’re ready to install Minecraft: Java Edition.

Fetch the setup script

The first step is retrieving the setup script and replacing it with the Minecraft launcher. Toward the bottom of the Gentoo desktop, find the “Terminal” icon and give it a click.

You can launch the Gentoo Terminal, by clicking the Terminal icon in the toolbar.

Next, create a new Minecraft directory:

Point the Terminal at this new directory:

We can now fetch the setup script, run it, and replace the Minecraft launcher by running each of the following commands in turn:

This process may take a while, so why not grab yourself a coffee or a snack while you’re waiting?

Start the Minecraft Launcher

Once the Terminal has executed all of your commands, you can start the Minecraft Launcher:

Enter your Minecraft username and password and then click “Log in.”

Enter your Minecraft login credentials when prompted.

On the subsequent screen, click the “Edit Profile” button.

Open the “Use version” drop-down and select “1.14.4.” Note that you must select this specific version for Minecraft to run correctly on your Raspberry Pi.

Open Minecraft's "User version" dropdown, and make sure you select 1.14.4

Click “Save profile,” which will take you back to the main Minecraft Launcher screen. Click the “Play” button.

The Launcher will download everything it needs to install Minecraft – and then promptly crash. Don’t panic! We can resolve this issue by installing OptiFine.

Install the OptiFine Minecraft mod

OptiFine is a Minecraft utility mod that optimizes the game’s graphics. It can deliver a performance boost, which is essential when you’re trying to run Minecraft on the Raspberry Pi!

To install OptiFine, run the following Terminal command:

When prompted, click “Install.”

Install the OptiFine mod utility

After a few moments, you should receive a notification that OptiFine has been installed successfully. Click “OK.”

Enter your Minecraft login details

Next, the “” file needs to be opened, and your Minecraft username and password needs to be entered, as well as the email address that’s associated with your Minecraft account.

To open this file, run the following Terminal command:

This file should now open in a new window, ready for you to edit.

Replace OptiFine's placeholder username, password and email address with your own Minecraft credentials.

Scroll to the following section:

Replace these placeholder credentials with your own information, making sure to surround your email address, password and username with quotation marks. For example:

Save your changes by selecting “File -> Save.”

Since this file now contains your Minecraft credentials in plain text, you need to run “chmod 0700” so that other people cannot read, write or execute your login details. In the Terminal, run the following command:

Your Minecraft credentials will now be protected against prying eyes.

Launch Minecraft: Java Edition

You’re now ready to run Minecraft! In the Terminal, enter:

Minecraft will now load.

You should now see the Minecraft loading screen.

Starting Minecraft for the first time can take a while, but after a few minutes you should see the login screen for Minecraft: Java Edition.

Before logging in to your account, you should tweak Minecraft’s settings to make the game easier for Raspberry Pi to process.

Optimizing Minecraft for the Raspberry Pi

The Raspberry Pi doesn’t have the same firepower as a PC or computer, so running Minecraft: Java Edition on your Raspberry Pi can result in poor performance.

To avoid any potential lag, you should reduce the number of “chunks” that are visible at any one time. Less chunks means that your Raspberry Pi can render frames more quickly which will reduce lag and make Minecraft flow easier.

To reduce the render distance:

On the Minecraft login screen, select “Options … -> Video Settings … ”

You can optimize Minecraft for Raspberry Pi, by editing its video settings.

Find “Render Distance” and reduce it to “3 chunks.”

Reducing Minecraft's render distance can deliver a performance boost.

Save your changes by clicking “Done.”

Time to play Minecraft: Java Edition

You’re finally ready to play Minecraft: Java Edition on the Raspberry Pi! Navigate back to the main Minecraft launcher screen (if you aren’t there already) and click the “Singleplayer” button.

You can now enjoy Minecraft: Java Edition on your Raspberry Pi.

Now that you have completed this setup, you can launch Minecraft at any time by opening a Terminal and running the following commands:

There are many different ways you can use Raspberry Pi alongside Minecraft (including creating your own Minecraft server!).

Have you created any interesting projects using Raspberry Pi and Minecraft? Let us know in the comments below!

Jessica Thornsby Jessica Thornsby

Jessica Thornsby is a technical writer based in Derbyshire, UK. When she isn’t obsessing over all things tech, she enjoys researching her family tree, and spending far too much time with her house rabbits.


    1. The Exec format error is usually caused by using the wrong architecture binary for your Raspberry Pi. Can you confirm what operating system you’re using on your Raspberry Pi, and when exactly you encounter this error?

  1. Hello! I am getting the error “Exec Format Error” – I’m using Raspbian with Desktop, on a Raspberry PI 4. Is there a fix? Thanks :)

    1. Hi – these instructions are for running on Gentoo ( If you can flash Gentoo to your Raspberry Pi, then these instructions should work! There commands for installing on Raspbian will be different, for example to fetch and run the setup script, you’ll need to use:

      chmod +x &&

      1. do you know how i would go about installing the latest version of optifine?
        im trying to get 1.16.4 because thats the latest version, but i cant seem to locate the part of the setup file i need to edit. do you know how to help me?

  2. Hiya! These instructions are great! Got 1.14.4 up and running using RPi 4 on Gentoo with decent performance! Was wondering if it would be possible to get a updated script for runMC1_14_4_OptifineF5 instead to open the possibility of also running forge? (specifically the xbox controller mod would be awesome on the pi!) If not no worries, thank you for writing this, already enjoying it very much!

    1. I’m glad you found this useful! :) From what I’ve seen, it’s possible to get Minecraft and Forge running on Raspberry Pi, but Minecraft+Forge doesn’t produce any sound on the Pi, plus you need to use a specific combination of Minecraft/Forge/Optifine versions… How to setup Minecraft with Forge on the Raspberry Pi would be an interesting topic to explore in a future tutorial, though! 

      1. Thanks for the response. Missing sound would be a bummer so I can see now why it didn’t make it to the main tutorial, thank you for the additional info. If it does become more viable in future tutorials I certainly look forward to it for sure! Thanks again!

  3. Hi, Thanks for the tutorial, it’s great but I got the message:
    Error: Could not find or load main class net.minecraft.launchwrapper.Launch
    Any idea?

    1. Hi – it sounds like something went wrong during installation. I’d try reinstalling Minecraft and make a note of any errors you encounter along the way (particularly when running the “wget” commands)

  4. Great tutorial: it works pretty well for us, although we are down to one or two frames per second. We are using it to akf on a JE minecraft server, but minecraft quits after a while. Note that we are not being booted off the server. Any ideas on how to improve stability?

    1. I’m glad you found this useful! For performance improvements, you could try connecting your Raspberry Pi to your router via ethernet, invest in a heat sink, try overclocking your Pi ( or upgrade to a Pi that has more RAM.

  5. this is awesome thank you for taking the time to put this up.

    how hard would it be to modify these scripts to pull in the latest 1.16.2? i feel like it’s just a matter of the MC and Optifine versions, but i’m afraid i’ll bugger it all up.

    any advice?

    thanks again :)

  6. I had this error when trying to start it:

    pi@rpi4:~/Minecraft$ ./
    ./ 15: Rock1@: not found
    ./ 27: curl: not found
    todays access token =
    ./ 40: curl: not found
    Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    Error: Could not find or load main class net.minecraft.launchwrapper.Launch

    I tried to put in my UUID but it made no difference and I would still need the access token. Any help would be appreciated
    Running Ubuntu on RPI 4 btw.

  7. Hi, when I try to run the following, I get an error message:

    pi@raspberrypi:~/Minecraft $ ./
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 271 100 107 100 164 1114 1708 –:–:– –:–:– –:–:– 2852
    todays access token =
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 83 100 67 100 16 527 125 –:–:– –:–:– –:–:– 653
    ./ 46: ./ /opt/jdk/jdk1.8.0_221/bin/java: Exec format error

    Thoughts on how to fix this? Raspberry pi4, 4gb

  8. Hey, thanks for this great tutorial! I keep running into a strange error. When I java -jar Minecraft.jar to launch Minecraft I am brought to the login screen. However I am unable to log into my Minecraft account! I don’t have a Mojang account, I play Minecraft through my Microsoft account.
    The launcher is unable therefore to log me in and I am unable to play Minecraft or connect it to my Minecraft server.
    I am running:
    OS: Raspbian GNU/Linux 10 (buster)
    Kernel: Linux 5.4.79-v7l+
    Architecture: arm

Comments are closed.