Tutorial: Playing Minecraft on Linux

Minecraft can be played on many different platforms and devices, including various flavors and distributions of Linux systems. This tutorial will show you how to run several editions of Minecraft on Linux systems.
Java Edition
[edit | edit source]Since Minecraft: Java Edition is made in Java, which is designed to run on many systems as possible, the game can easily be ported over Linux and is supported officially by the Minecraft Launcher.
The Minecraft Launcher is available directly from the official Minecraft website, but in Linux systems, it's recommended that you install the launcher from your Linux distribution's provided package manager or app store; this is because package managers simplify the installation process by getting the right package designed specifically for your distribution, they also provide other benefits, like automatic update for the launcher and reduced app size with the program's managed dependencies.
Package managers are tools designed to install and manage packages for a Linux distribution. The Minecraft Launcher is available on many package managers. For Arch Linux systems, the Arch User Repository (AUR) version of the launcher is recommended by the official website. If the package is not available on your distro's package manager, you may want use Flatpak, which is supported on most Linux distributions, or other such alternatives.
Flatpak
[edit | edit source]
The Minecraft Launcher can be installed using Flatpak from Flathub, which is the de facto app store for Flatpak applications that runs on most Linux distributions. Usually, your Linux distribution have Flatpak pre-installed by default in your system. If not, you can install Flatpak from your package manager and read this Flatpak article to get it set up. After setting it up, you can use Flatpak by using flatpak command-line interface (CLI) or one of the GUI front ends made for it.
Linux distributions may provide a GUI front end for Flatpak: for KDE-based systems, this may be the "Discover" app; for GNOME-based systems, this may be the "GNOME Software" app (or just "Software"). You can search the Minecraft Launcher in the app and install the launcher from there. Flatpak GUI front ends can be installed using your package manager manually, for that, you can read more on your distro's manual, wiki, or other resources.
The launcher can also be installed through flatpak CLI in the terminal app. Simply, you can install the Minecraft Launcher by executing this command:
flatpak install com.mojang.Minecraft
After installing the Minecraft Launcher by either methods, you can launch the launcher in your distro's application list (usually by searching the app's name, i.e., "Minecraft Launcher"), or run them in CLI by using flatpak run com.mojang.Minecraft.
Bedrock Edition
[edit | edit source]Minecraft: Bedrock Edition is not officially supported on Linux, but there are two main ways to play through a compatibility layer.
mcpelauncher
[edit | edit source]mcpelauncher lets you play the Android version of Minecraft: Bedrock Edition natively in Linux systems through a compatibility layer. This is similar to Wine, which lets you run Windows applications on Linux, but "much more lightweight and simple that doesn't impact performance in significant way". [1] For most Linux distributions, you can download and install mcpelauncher from your distro's package manager. The package is also available on Flathub, which can be installed with Flatpak.
Since mcpelauncher uses the Android version of the game, it downloads the game from the Google Play Store, thus it is required to purchase the game's license with a Google account in the store specifically. If you have purchased a version from the Microsoft Store previously, that purchase is separate and will not transfer to the Google Play Store version of the game.
WineGDK
[edit | edit source]WineGDK is a fork of the Wine project made by Weather-OS that enables GDK-based games to run on Linux systems, including Minecraft: Bedrock Edition. It does this by porting Windows-specific libraries required to run the game, including Microsoft GDK components and some of the WinRT components. This results being able to play Bedrock Edition natively on Linux systems with similar or even better performance than on Windows.
WineGDK partially supports some online functionality of the game, features such as playing LAN-based multiplayer games and accessing Marketplace are possible. It does not support Microsoft online account services,[2] meaning features that require a signed Microsoft account, such as playing online multiplayer games or Realms, purchasing or using Marketplace items, are not supported. The mcpelauncher version supports full online functionality, but Windows-specific features, like ray tracing[3] and Bedrock Editor, are only available on WineGDK version. Additionally, you may encounter keyboard and mouse issue due to how the game's version is designed for Android.
Any features that require opening a file picker will crash the game on WineGDK, this means importing a world and using a custom skin are not possible,[4] however, there are workarounds: for importing a world, you can generally extract .mcworld files (as they are technically ZIP files) to the com.mojang/minecraftWorlds directory; using a custom skin may be possible by modifying the options.txt file and setting up the configuration manually (either by copying existing game data, or other methods).
Note that older versions of Bedrock Edition might not work with WineGDK as they are likely the UWP versions,[5] which are different from the GDK versions released since Bedrock Edition 1.21.120. You can use mcpelauncher which may support older versions of the game. For older versions of Minecraft: Pocket Edition, see § Pocket Edition.
In this tutorial, we will setup Minecraft: Bedrock Edition using Lutris, an open-source Linux game manager, and GDK-Proton, a protonified version of WineGDK.
Obtaining Minecraft: Bedrock Edition game files
[edit | edit source]WineGDK requires the game's executable to run, and as well as the game's installation files. They must be obtained from a Windows system that have the game installed from Xbox app or Microsoft Store. You can either run Windows in a virtual machine or dual-boot to continue.
The game's installation directory contains the files needed to run Minecraft: Bedrock Edition game, including Minecraft.Windows.exe, which is the main executable of the game. The directory may be located inside C:\XboxGames\Minecraft for Windows\Content, or another driver depending on your Xbox games installation directory set in the Xbox app. You will need to take note of this as the entire directory is needed by WineGDK to run the game.
The game's executable, Minecraft.Windows.exe, is encrypted by default in the installation, which makes it unable to be ran by WineGDK normally. In order to retrieve unencrypted file, there are few methods you can do in Windows:
- You can copy the executable in the desktop package via Windows PowerShell, see [1].
- The PowerShell command adapted from the GitHub thread:Note there is <game-directory> placeholder in the command, replace it with the path to the game's installation directory.
Invoke-CommandInDesktopPackage -PackageFamilyName "Microsoft.MinecraftUWP_8wekyb3d8bbwe" -app Game -Command "powershell.exe" -Args "-Command Copy-Item '<game-directory>\Content\Minecraft.Windows.exe' .\decrypted.exe"
- The PowerShell command adapted from the GitHub thread:
- You can "unlock" the
Minecraft.Windows.exeexecutable owned by "Gaming Services", see [2].
After obtaining the unencrypted executable, you'll need to create the game's installation directory for WineGDK following this structure:
<game installation directory for WineGDK>: the root directory containing all installation files for the game. You may wish to name it whatever you'd like.
Content: the directory that contains installation files and the main executable.
Minecraft.Windows.exe: replace the original (encrypted) executable with the unencrypted one. This executable will be used to run the game via WineGDK.
XCurl.dll: replace the original XCurl.dllwith the one from mingw-w64-x86_64-curl, specifically themingw64/bin/libcurl-4.dllrenamed toXCurl.dll. This is required for the online functionality of the game with GDK-Proton.
...<other files>...: copy all the installation files from the same Contentdirectory in here.
etc/ssl/certs: multiple nested directories that contain an OpenSSL certificate file for XCurl.dlllibrary to support the game's online functionality by GDK-Proton.
ca-bundle.crt: download the OpenSSL certificate from https://curl.se/ca/cacert.pem and rename it to ca-bundle.crt.
Finally after creating the installation directory, you'll need to transfer them into your Linux system to be used by GDK-Proton. Transferring files between operating systems can usually be done by mounting your Windows disk partition into your Linux system, and copying the directory into your home directory (or any other directory for that matter), but methods may vary, especially if using a virtual machine, you'll need to research them on the Internet (see also [3][4][5]).
GDK-Proton
[edit | edit source]There are two versions of WineGDK: the original WineGDK, and the GDK-Proton, which is a custom GE-Proton version built with WineGDK and several extra components. Although the online functionality has been implemented for WineGDK[6][7], you'll need the GDK-Proton version in order to get it working.
The original WineGDK needs to be compiled per the instructions from the project page. For the purpose of this tutorial, we will use the GDK-Proton version, which we can easily obtain the pre-built binaries from the GitHub releases as an archive file named GDK-ProtonXX-YY.tar.gz (XX and YY are the latest version numbers).
After downloading the archive file, you will need to extract the file into the ~/.steam/root/compatibilitytools.d/[note 1] directory, so later in the tutorial, it can be used with Lutris as one of the Wine runner. If the directory does not exist, you may wish to create it so.
Setting up Lutris
[edit | edit source]Lutris is an open-source game manager for Linux systems. It manages different types of games, including Windows games that require any Wine-based compatibility layer to run on Linux. Lutris is also available on Flathub, which you can easily download with Flatpak.
In this tutorial, we will use Lutris specifically to select WineGDK as the runner and play Minecraft: Bedrock Edition:
- Click the + button on the top left of the menu, and select "Add locally installed game" menu.
- Upon selecting, a window will pop up. Insert the required "Name" column with the game's name, i.e., Minecraft: Bedrock Edition. Select the "Runner" column to "Wine (Runs Windows games)".
- Go to the "Game options" tab (beside the "Game info"), select the "Wine prefix" for the game. Select your Wine prefix in a new directory, usually in
~/Games/<game-name>.- Wine prefix is basically the storage/directory for Wine's whole Windows environment for the game, including "Program Files", "Windows", user's "AppData", and other files very similar to Windows. It does not contain actual Windows installation, as that's managed by Wine, and it's only there to preserve the game's compatibility with your Linux system.
- Additionally, Bedrock Edition's game save data are stored within the Wine prefix, and with the same location as com.mojang on Windows.
- Insert the "Executable" column with the path to the game's main executable, specifically the unencrypted executable previously created in the installation directory (i.e.,
<game installation directory for WineGDK>/Content/Minecraft.Windows.exe). - Go to the "Runner options" tab, and select the "Wine version" to "GDK-Proton-XX-YY". This is the GDK-Proton you've downloaded and placed previously in the
~/.steam/root/compatibilitytools.d/[note 1] directory.- Using tools like Protonplus can help manage multiple Proton/Wine versions usually installed in the same
../compatibilitytools.d/directory, and can be selected by Lutris. - If your system has dual GPU configuration, you can set which GPU to launch with in the "System options" → "Display" → "GPU" column.
- Using tools like Protonplus can help manage multiple Proton/Wine versions usually installed in the same
- After the configuration, click the "Save" button, and the game will appear on the library.
- If the game's name is specified to Minecraft: Bedrock Edition, Lutris will automatically fetch the game's information and thumbnail banner for you on the library screen.
- Select the game, and click the "Play" button. The game should be able to run on your Linux system.
Multiplayer games workaround
[edit | edit source]Since WineGDK does not support signing a Microsoft account, the "Servers" tab of the Select World screen is completely unusable, preventing you from adding and joining external or featured servers. However, there is a workaround by using Kas-tle's ProxyPass software to proxy an external server as a LAN-based servers accessible under the "Worlds" tab, essentially bypassing the in-game Microsoft account requirement for unsigned players; however, when joining such server, you'll still need to authenticate in the ProxyPass software itself.
Since ProxyPass is a JAR-based software, you'll need setup a standalone Java runtime to use it, see Tutorial:Update Java for the instructions.
Note the port must be set to 19132 (the default IPv4 port of Bedrock Edition server) in order to be detected by the game.
Additionally, if hosting a GeyserMC server locally, it will also broadcast itself as a LAN-based server on the "Worlds" tab.
Custom resource packs and add-ons
[edit | edit source]For unknown reason, the WineGDK version of Minecraft: Bedrock Edition loads resource pack and behavior pack from the game's installation directory instead of the usual com.mojang path.
In order to load a custom resource pack or behavior pack, you'd need to place the pack inside <game installation directory>/Content/resource_packs or <game installation directory>/Content/behavior_packs. The development_resource_packs and development_behavior_packs may also be generated on the directory.
The following structure may be generated in the game's installation directory:
<game installation directory>/Content
resource_packs: Custom resource packs.
behavior_packs: Custom behavior packs.
development_resource_packs: Development resource packs.
development_behavior_packs: Development behavior packs.
...<other files>...: Other Contentfiles, includingMicrosoft.Minecraft.exe.
Bedrock Editor
[edit | edit source]
The WineGDK version of Minecraft: Bedrock Edition supports running the Bedrock Editor, which is a secondary mode of the game that adds advanced and robust tools designed for creators to edit worlds and create player structures through projects.
The main way to launch the Bedrock Editor on Windows is by running a special minecraft editor URI string (e.g., minecraft://creator/?Editor=true) through the browser or other means. Luckily, for our case, we can pass the URI string directly to the game's executable, which in turn, achieve the same result to launch the Bedrock Editor in the Wine environment.
In practice, there are two ways to do this through Wine console or Lutris GUI:
In order to launch Bedrock Editor, you need to open the Wine console, which usually opens cmd.exe program (Windows Command Prompt), where you can run software and applications through Wine. This is required to run the game with the minecraft URI string.
If you have setup the game in Lutris, you can open the Wine console:
- Select the Minecraft: Bedrock Edition game in the library.
- Click the "🍷" (Wine) button next to the "Play" button. Upon clicking, a pop-up menu should appear.
- In the menu, click "Open Wine console". Wait momentarily until the console window appears.
Otherwise, you can open them in the Linux terminal by the WineGDK executable, but this is applicable for advanced installation outside this tutorial.
In the Wine console, navigate to the game's installation directory in and launch the Minecraft.Windows.exe executable with the minecraft URI string:
REM Change directory to the game's installation directory
REM Note that you need to replace the "<game-directory>" placeholder
cd "<game-directory>\Content"
REM Launch Minecraft Bedrock executable with the editor URI scheme
.\Minecraft.Windows.exe "minecraft://creator/?Editor=true"
If you have placed the game's installation directory outside the Wine prefix, you can use Z: driver to access your system's Linux filesystem in the Wine environment (e.g., Z:\home\<user>\ is equivalent to /home/<user>/).
On Lutris, we can specifically configure the game's launcher to open with the minecraft editor URI string:
- Select the Minecraft: Bedrock Edition game in the library.
- Right click the game, and click "Configure" in the context menu.
- Select the "Game options" tab in the configuration window, and insert the "Arguments" column with the minecraft editor URI string:
"minecraft://creator/?Editor=true"(notice the double quote). - Click the "Save" button.
- Launch the game, and it should open with Bedrock Editor.
Pocket Edition
[edit | edit source]Minecraft: Pocket Edition is a legacy version of Bedrock Edition that was made exclusively for Android and mobile systems. If you have hunch for nostalgia, you can play these versions on Linux natively or through an Android container, such as Ninecraft or Waydroid respectively.
Ninecraft
[edit | edit source]
Ninecraft is a compatibility layer/game launcher made by MCPI-Revival community that lets you play (specific versions of) Minecraft: Pocket Edition natively on Linux and Windows.
Ninecraft requires the APK package of the game in order to be ran, and with the right architecture for your system (if you're running on x86 Linux system, you will need x86 version of the APK, vice versa for ARM). You can retrieve the full APK package of Minecraft: Pocket Edition from Omniarchive or the wiki's individual version pages (under "Downloads" column).
While Ninecraft claims to run Minecraft: Pocket Edition from v0.1.0 alpha to v0.11.1 alpha, there are several versions that may not work correctly or unsupported (as printed from the software itself).
Feature-wise, when running v0.11.1 alpha version,[note 2] the game runs smoothly without noticeable bugs or glitches. The game's audio does not work initially, and requires additional software (see § Audio software). Unlike WineGDK, the file picker is supported, in which you can use custom skin in the game itself. The LAN multiplayer functionality is also supported, so you can play the game with your friends, who may run the game on Linux, Windows, or the original game from Android.
For this tutorial, we will show you how to setup and run Ninecraft by compiling the sources from the project's GitHub, to running Ninecraft and Minecraft: Pocket Edition with the APK file.
Setting up and compiling
[edit | edit source]Before compiling Ninecraft, we will need to setup dependencies required for the software. The following dependencies are needed:
- Build tools – used for building/compiling the software.
- Git – fetching the project's repository.
- GCC and G++ (multilib) – C/C++ compiler.
- CMake and Make – the project's main build tool.
- X11 libraries (32-bit version) – used for X11 windowing software.
- libx11
- libxrandr
- libxinerama
- libxcursor
- libxi
- OpenGL (libgl, libglvnd, or mesa; 32-bit version) – the graphics library.
- OpenAL (libopenal or openal-soft; 32-bit version) – the audio library.
- Jinja2 (python3-jinja2, which requires Python in itself)
- Zenity
- Unzip – unzipping ZIP files, likely for APK files.
Note most of dependencies require the 32-bit versions, which for some Linux distribution, needs additional configuration.
From the project's README file, most of these dependencies can largely be downloaded and installed via your distribution's package manager:
Note you will need to add multilib repository in your Pacman's configuration file in order to install the following dependencies, see related Arch Wiki.
# Update the system and all packages
sudo pacman -Syu
# Install 32-bit and build dependencies
sudo pacman -S git make cmake gcc gcc-multilib lib32-openal lib32-libx11 lib32-libxrandr lib32-libxinerama lib32-libxcursor lib32-libxi lib32-libglvnd zenity unzip python-jinja
# Add 32-bit architecture
sudo dpkg --add-architecture i386
# Update the system and all packages
sudo apt update
# Install 32-bit and build dependencies
sudo apt install git make cmake gcc g++ gcc-multilib g++-multilib libopenal-dev:i386 libx11-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libgl-dev:i386 zenity unzip python3-jinja2
# Update the system and all packages
dnf update
# Install 32-bit and build dependencies
dnf install git make cmake gcc g++ glibc-devel.i686 libstdc++-devel.i686 openal-soft-devel.i686 libX11-devel.i686 libXrandr-devel.i686 libXinerama-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libglvnd-devel.i686 zenity unzip python3-jinja2
In order to compile Ninecraft, you will need to retrieve the sources from the project's GitHub via git, run the following command:
git clone --recursive http://github.com/MCPI-Revival/Ninecraft.git
After that, change directory (cd) into the Ninecraft's repository, and run this command to compile for x86:
make build-i686
Compiling the software may take few minutes in order to be complete, so while it's running on the background, you may take your time to do other stuff.
Running the software
[edit | edit source]After compiling Ninecraft, you will need the game's APK and extract it for Ninecraft to run, simply run the following command (while in Ninecraft's repository):
./tools/extract.sh <path-to-apk-file>
Specify the <path-to-apk-file> to the game's APK file path, whether that'd be in the downloads directory, or others.
After extracting, you are set and ready to run Ninecraft and Minecraft: Pocket Edition game:
./build-i686/ninecraft/ninecraft
Audio software
[edit | edit source]The game's audio may be mute/does not work initially. In order to get it working, you would need an additional software called OSSP. For most Linux systems, this software is available on the following distributions:
On Arch Linux systems, OSSP is only available from AUR, and not the official repository. This means you will need to use an AUR helper or install the package manually from AUR.
In this tutorial, we will use Paru AUR helper to install the package. You can use other AUR helpers, such as Yay, Pacaur, and others.
# Install OSSP from AUR using "paru" AUR helper
paru -S osspd
# Install OSSP using apt
sudo apt install osspd
There is currently no repository available that hosts the OSSP package for Fedora Linux. However, you can compile it by yourself from the OSSP's source code.
In order to compile OSSP, you'd need these dependencies installed in your system (according to the project's Ubuntu build workflow):
Download the project's source code via Git recursively:
git clone --recursive https://github.com/OpenMandrivaSoftware/ossp
Generate the build files using the Ninja generator:
cmake -G Ninja -B build -Dalsa=ON -Dtest=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5
Once configured, run the build command:
ninja -C build
The osspd daemon executable should be available in the build directory. Unlike the systemctl steps below, you should run the executable directly before starting Ninecraft instead.
After installing it, the OSSP service must be manually started before starting Ninecraft. You can start it via systemctl:
sudo systemctl start osspd.service
If the game is running, relaunch the game again, and you should start to hear the audio working.
Waydroid
[edit | edit source]Waydroid is an Android container that lets you run Android applications and games. It can be used for playing older versions through pre-0.8.0 or so, but tend to be buggy.
When Waydroid is installed, the Android system runs is based on the host systme architecture, so for example, when the host system is 64 bit, the Android also runs 64 bit version of the system. This makes it unable to run ARM-based applications, which are most Pocket Edition game versions made on, however, a translation layer can be used with Waydroid to workaround this problem.[8]
Legacy Console Edition
[edit | edit source]Some of the Legacy Console editions of Minecraft, including PlayStation 3, PlayStation 4, and Xbox One editions, can be played in Linux systems through emulation. Emulation software such as RPCS3 for PS3 and shadPS4 for PS4 (at least partially, as PS4 emulation is very early in development[9]). There have been some closed-development of Xbox One compatibility layer (which is different from an emulator, similar to Wine) specifically made for Linux, called XWine1, that can successfully run Minecraft: Xbox One Edition,[10] but no working binaries or source code for it have been released yet.
PlayStation 3 Edition
[edit | edit source]It is entirely possible to run the disc version of Minecraft: PlayStation 3 Edition without modifying a PS3 console (or using one at all, for that matter) while staying within the law, however other physical hardware costs must be factored in.
PlayStation 3 system firmware is required for emulating any game for the console, which can be downloaded for free from here on Sony's website intended for use for updating consoles manually (select "Update using a computer"). This file can be provided to an emulator such as RPCS3 for game playback.
You will need to acquire a physical disc copy of PlayStation 3 Edition. Used copies are often available from physical stores, for example CeX in Ireland and the United Kingdom, as well as other chains, pawn stores, markets and other such sources; other countries will likely have their own store chains from which a disc copy can be acquired (and ordering online is also an easy method). This is the source of the game data which will be run using the emulator. Software piracy laws in certain countries may require that you keep this disc even after the data has been copied to your computer.
Your PC will also need a means to read Blu-Ray optical discs. Only specific models of Blu-Ray drive are capable of reading PS3 discs, a list of which can be found near the bottom of the RPCS3 quickstart page. These will generally be less expensive and easier to set up compared to modifying a PS3 console and ripping data from it (and will not interfere with your PlayStation account standing), however such drives are often by no means cheap and it may be difficult to source one of these specific models. Other models not listed may work but also may not.
Once you have one of these drives connected to your computer, place the disc inside. The next step is to run a program that can read the data from the inserted disc and copy it to your computer in a usable format. The RPCS3 wiki has a page detailing this process; the program used for obtaining these files can be downloaded from here. The extracted files can then be loaded into RPCS3 (or whatever other emulator you use).
If you wish to play the latest update rather than the base version on the disc, the RPCS3 discord server can be consulted to provide links to the update files for the most recent game versions.
Gallery
[edit | edit source]-
Playing Minecraft: Bedrock Edition using WineGDK with ray tracing graphics.
-
Playing CubeCraft on Bedrock Edition Linux with ray tracing.
Notes
[edit | edit source]- ↑ a b The path may be different if you have installed Lutris from a specific package manager:
- Flatpak:
~/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/, - Native (AUR/deb):
~/.local/share/Steam/compatibilitytools.d.
~/.steam/root/compatibilitytools.d/may be symlinked to these directories. - Flatpak:
- ↑ Specifically
PE-a0.11.1-2-x86from Omniarchive.
References
[edit | edit source]- ↑ https://minecraft-linux.github.io/faq/index.html#how-does-it-work
- ↑ https://github.com/Weather-OS/WineGDK/issues/10
- ↑ https://github.com/Weather-OS/WineGDK/issues/4
- ↑ https://github.com/Weather-OS/WineGDK/issues/18
- ↑ https://github.com/Weather-OS/WineGDK/issues/9
- ↑ https://github.com/Weather-OS/WineGDK/blob/master/README.md
- ↑ https://github.com/Weather-OS/WineGDK/commit/341425050f4f9b968b807dbd61942dabca8f6af1
- ↑ https://github.com/casualsnek/waydroid_script
- ↑ https://github.com/shadps4-compatibility/shadps4-game-compatibility/issues/22
- ↑ https://www.reddit.com/r/emulation/comments/1ibshis/xwine1_the_xbox_one_translation_layer_now/