Minecraft Java + Bedrock Server Together – Geyser + Floodgate

Minecraft Geyser + Floodgate Paper Minecraft Server
Minecraft Geyser + Floodgate Paper Minecraft Server

This is a new Docker container to automatically set up and run a Minecraft server that both Java and Bedrock players can connect to! This allows everyone to play on your server no matter which edition of Minecraft you are using. It uses the Geyser and Floodgate plugins to accomplish this.

Since it uses the Paper Minecraft server it also supports any additional plugins that are compatible with Paper / Spigot. This gives you the ability to do many things that are currently impossible to do in Bedrock if you are hosting the official Bedrock dedicated server.

It is fully compatible with my Paper Minecraft Java Server Container and you can swap between these two containers without changing any configuration.

The official GitHub page is located here.

The Docker Hub page for the container is located here.

It’s now possible to convert your worlds between Bedrock and Java versions. Check out my guide on Chunker here for more information.

Features

  • Sets up fully operational Minecraft server that allows both Java and Bedrock clients to connect
  • Runs the highly efficient “Paper” Minecraft server
  • Runs Geyser to allow Bedrock clients to connect and Floodgate to allow them to authenticate with their Bedrock credentials to a Java server
  • Plugin support for Paper / Spigot / Bukkit
  • Uses named Docker volume for safe and easy to access storage of server data files (which enables more advanced Docker features such as automatic volume backups)
  • Installs and configures OpenJDK 18
  • Automatic backups to minecraft/backups when server restarts
  • Full logging available in minecraft/logs folder
  • Updates automatically to the latest version when server is started
  • Runs on all Docker platforms including Raspberry Pi

Usage

First you must create a named Docker volume. This can be done with:

docker volume create yourvolumename

Now you may launch the server and open the ports necessary with one of the following Docker launch commands.

With default ports:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

With custom ports:

docker run -it -v yourvolumename:/minecraft -p 12345:12345 -e Port=12345 -p 54321:54321/udp -p 54321:54321 -e BedrockPort=54321 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

With a custom Minecraft version (add -e Version=1.X.X, must be present on Paper’s API servers to work):

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.17.1 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

With a maximum memory limit in megabytes (optional, prevents crashes on platforms with limited memory, -e MaxMemory=2048):

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e MaxMemory=2048 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Using a custom timezone:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e TZ="America/Denver" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Skipping backups on a certain folder:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoBackup="plugins" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Skipping permissions check:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoPermCheck="Y" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Change number of backups:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e BackupCount=1 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Configuration / Accessing Server Files

The server data is stored where Docker stores your volumes. This is typically a folder on the host OS that is shared and mounted with the container. I’ll give the usual locations here but if you’re having trouble just do some Googling for your exact platform and you should find where Docker is storing the volume files.

You can find your exact path by typing:

docker volume inspect yourvolumename

This will give you the fully qualified path to your volume like this:

{
        "CreatedAt": "2022-05-09T21:08:34-06:00",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/yourvolumename/_data",
        "Name": "yourvolumename",
        "Options": {},
        "Scope": "local"
}

On Linux it’s typically available at:

/var/lib/docker/volumes/yourvolumename/_data

On Windows it’s at

C:\ProgramData\DockerDesktop

but may be located at something more like

\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\

if you are using WSL (Windows Subsystem for Linux).


On Mac it’s typically

~/Library/Containers/com.docker.docker/Data/vms/0/

If you are using Docker Desktop on Mac then you need to access the Docker VM with the following command first:

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

You can then normally access the Docker volumes using the path you found in the first step with docker volume inspect.

Most people will want to edit server.properties. You can make the changes to the file and then restart the container to make them effective.
Backups are stored in the “backups” folder
Log files with timestamps are stored in the “logs” folder.

Plugin Support for Paper / Spigot / Bukkit

This is a “Paper” Minecraft server which has plugin compatibility with Paper / Spigot / Bukkit.

Installation is simple. There is a “plugins” folder on your Docker named volume.

Navigate to your server files on your host operating system (see accessing server files section if you don’t know where this is) and you will see the “plugins” folder.

You just need to drop the extracted version of the plugin (a .jar file) into this folder and restart the container. That’s it!

Some plugins have dependencies so make sure you read the installation guide first for the plugin you are looking at.

A popular place to get plugins is: dev.bukkit.org

Troubleshooting Note – Oracle Virtual Machines

A very common problem people have with the Oracle Virtual Machine tutorials out there that typically show you how to use a free VM is that the VM is much more difficult to configure than just about any other product / offering out there.

It is because there are several steps you need to take to open the ports on the Oracle VM. You need to both:

  • Set the ingress ports (TCP/UDP) in the Virtual Cloud Network (VCN) security list
  • *and* set the ingress ports in a Network Security Group assigned to your instance

Both of these settings are typically required before you will be able to connect to your VM instance. This is purely configuration related and has nothing to do with the script or the Minecraft server itself.

I do not recommend this platform due to the configuration difficulty but the people who have gone through the pain of configuring an Oracle VM have had good experiences with it after that point. Just keep in mind it’s going to be a rough ride through the configuration for most people.

Troubleshooting Note – Hyper-V

There is a weird bug in Hyper-V that breaks UDP connections on the Minecraft server. The easy workaround for this is that you have to use a Generation 1 VM with the Legacy LAN network driver.

There is a second fix that was shared by bpsimons here. For that fix you need to install ethtool first with sudo apt install ethtool. Next in your /etc/network/interfaces file add “offload-tx off” to the bottom as the issue appears to be with TX offloading.

Here’s an example:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
offload-tx off

This can also be done non-persistently with the following ethtool command:

ethtool -K eth0 tx off

Additional Support

The comments section right here is the best place for support. The second best place is the GitHub issues section.

I will add additional documentation based on what problems people are running into / questions people are asking because right now I’m not really sure what those will be yet. Definitely let me know if you need any of these things!

458 thoughts on “Minecraft Java + Bedrock Server Together – Geyser + Floodgate”

    1. Avatar for James A. Chambers

      Hey Jeff,

      Everything is basically firewalled by default that isn’t opened in your Docker launch line. I think it should work fine doing what you’re saying. If there’s anything additional that needs to be done it would be through the Docker launch line for sure.

      Hopefully that helps!

  1. Avatar for Arathi

    Hi James,

    This command doesn’t appear to work at all.

    –restart unless-stopped

    I have to always have a console up and running if I want the server to be online. Am I missing something? I’d really like to have the server running all the time, and restart if the server does. I am playing with a new server (so that I don’t break our existing one) and it’s running on a “new to me” Dell PowerEdge running esxi 8. I’d much rather not have to build a second windows server that I have a console running on. I’d just like the server itself to always be on. Biggest reason for this is that I will be travelling out of country for a couple weeks, and my kids will still want to play.

    Thoughts on what I may be missing?

    1. Avatar for James A. Chambers

      Hey Arathi,

      This is looking good here. You got both dashes in the:

      --restart unless-stopped

      There’s one more thing that’s tricky about this that I think you may be running into. All of the commands that start with two dashes actually need to go at the very end of the command (but before the 05jchambers part). They need to be after all of the ones with single dashes.

      In other words the order matters with these and I think that may be what you are running into. Can you try it with the –restart unless-stopped right before the 05jchambers part and see if it will take the command that way?

      I have another tip for you. You can also detach from a running console into the background. This is really easy to do with Ctrl+P followed by Ctrl+Q. This is a hotkey that will send Docker to the background.

      To reattach you would do:

      docker container ls
      docker container attach xxxxx

      The first command will give you your Docker container ID (the docker ls command). Then you can attach to that ID with docker container attach xxxx with the XXXX being your ID from the first command.

      Once you reattach the window will show up again in your console. There’s a couple of ways that should help to control this at least.

      Hopefully that helps!

      1. Avatar for Arathi

        Thanks! I updated to see and while closing the console window didn’t seem to restart it, detaching the container absolutely works! Thanks! This will make my life so much easier. Just trying to sort out a good vpn that can handle Starlink’s CGNAT now, just in case. lol

    1. Avatar for James A. Chambers

      Hey makakam,

      It’s hard to say. Did you close the server when installing the plugin and then start it up again afterward? What does your console say?

      If you use the command /plugins what plugins does it say you have installed? Are there any errors in the console when loading it saying invalid plugin?

      It’s basically just going to be regular plugin troubleshooting. I see this plugin was only released Tuesday and is in beta as well. You’ll want to take a look at the console and see what errors you see there and check the plugins to see if it’s being loaded/recognized.

      Hopefully that helps!

  2. Avatar for Jason

    This is amazing, thank you for all your work on this! I got the server up and running on my Raspberry Pi 4 B, and connected via bedrock (from Win 10). This was by far the simplest and most fully featured server I’ve been able to get going!

    Now I’m trying to use the RaspberryJuice plugin with it so I can use Python (I was trying mcpi_e, though if there are better options, I’m not wedded to mcpi_e or RaspberryJuice) to interface with it. After putting the raspberryjuice-1.12.1.jar file in the plugins folder (/var/lib/docker/volumes/mcdocker/_data/plugins) and restarting the docker container, I get a Legacy plugin warning:

    [WARN]: [org.bukkit.craftbukkit.v1_19_R2.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

    and mcpi_e (from win10) can’t connect to the docker server on the API port (4711). Do you have any insight?

    While the error I get in Python:

    "ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it"

    could be a number of things, given the legacy warning above, it sounds like a compatibility issue to me. If so, do you have dockers with older versions of the server that might be compatible with RaspberryJuice (last updated 2020-02-03, latest tested version 1.12)? I tried using the version command you gave with version 1.12.2 (the latest tested version with RaspberryJuice) and Geyser wasn’t supported (and the same Python error). I tried 1.13.2 (the earliest version supported by Geyser). That didn’t work, and I think I’m going down a rabbit hole…

    1. Avatar for James A. Chambers

      Hey Jason,

      Welcome! So this is definitely a rabbit hole of a plugin. It has been abandoned for 3 years it looks like on the GitHub.

      The problem is this plugin requires you to use a hacked Java and Python libraries (this is very bad):

      To use the extra features an modded version of the java and python libraries that were originally supplied by Mojang with the Pi is required, github.com/zhuowei/RaspberryJuice/tree/master/src/main/resources/mcpi.

      You only need the modded libraries to use the extra features, the original libraries supplied with Minecraft Pi edition still work, you just wont be able to use the extra features

      This is why you are getting weird mcpi errors. You don’t have this weird proprietary Java to run this plugin with it. You have to use Raspberry Pi’s proprietary Java it looks like (and a very old version of it indeed).

      It says all of the “extra features” will be disabled without it. What are the extra features? Everything it looks like to me:

      getBlocks(x1,y1,z1,x2,y2,z2) has been implemented
      getDirection, getRotation, getPitch functions - get the 'direction' players and entities are facing
      setDirection, setRotation, setPitch functions - set the 'direction' players and entities are facing
      getPlayerId(playerName) - get the entity of a player by name
      pollChatPosts() - get events back for posts to the chat
      setSign(x,y,z,block type id,data,line1,line2,line3,line4)
      Wall signs (id=68 or block.SIGN_WALL.id) require data for facing direction 2=north, 3=south, 4=west, 5=east
      Standing signs (id=63 or block.SIGN_STANDING.id) require data for facing rotation (0-15) 0=south, 4=west, 8=north, 12=east
      spawnEntity(x,y,z,entity) - creates an entity and returns its entity id. see entity.py for list.
      getEntityTypes - returns all the entities supported by the server.
      entity.getName(id) - get a player name for entity id. Reverse of getPlayerId(playerName)
      getEntities - get all currently loaded entities list by optional entity type id
      removeEntity - removes entity with specified id
      removeEntities - removes all currently loaded entities by optional entity type id
      entity.getEntities - get currently loaded entities list near specified entity by optional entity type id
      entity.removeEntities - removes currently loaded entities near specified entity, by optional entity type id
      player.getEntities - get currently loaded entities list near specified player entity id by optional entity type id
      player.removeEntities - removes currently loaded entities near specified player entity id, by optional entity type id
      events.pollProjectileHits - get events back of arrow hit
      player.pollProjectileHits - get events back of arrow hit for the player
      player.pollBlockHits - get block hits for the player
      player.pollChatPosts - get events back for posts to the chat for the player
      player.clearEvents - clear events for the player
      entity.pollProjectileHits - get events back of arrow hit for an entity
      entity.pollBlockHits - get block hits for an entity
      entity.pollChatPosts - get events back for posts to the chat for an entity
      entity.clearEvents - clear events for this entity

      That’s far, far more than will work it looks like without the weird hacked Java version.

      Unfortunately this is a major problem with Minecraft plugins and projects. Most of them are abandoned or have very little support.

      For the Docker container to support this I would have to implement their Java and Python modified libraries into the container. I can’t do that nor would I ever expose all of you guys to some custom Java or Python libraries hacked to make some plugin that is for a version of Minecraft from 5+ years ago work.

      You might be able to do this using the standalone version if you implemented all of the special libraries this plugin talks about. I strongly recommend using something else though. I’ve never seen a plugin that requires hacked libraries and I would never use one because it’s a security issue / begging to be hacked basically.

      It looks like the owner of this plugin gave up when the going got tough for the Pi. Nobody has been able to buy a Raspberry Pi for a reasonable price for something like 2 years now. I don’t really use them very much anymore or cover them either. I’ve shifted away from them as well because they have cost like $150+ on Amazon for years and they are absolute garbage for that much money compared to some of the newer boards out. It makes sense that the fortune of this plugin and the interest/support for it dropped so much in this time. Everything for the Pi is dropping like that due to the horrible availability and people just moving on who are sick of it.

      I feel bad for that project owner. My site was hit very, very hard by how terrible the Raspberry Pi situation is. It nearly bankrupted me. I only survived because crypto was hot at the time and supplemented my income (until I changed my content away from both the Raspberry Pi and crypto). I evolved and cover other boards now but it’s sad to see these projects just dry up like this with no “new blood” coming into the ecosystem for basically years now. I’d like to think/hope he’s just using an Orange Pi 4/5 instead or a Rock 4/5B or something and that’s why he stopped updating his Pi project.

      The Docker containers themselves represent part of myself moving away from the Pi as well. I still support all my Raspberry Pi projects but they’re doing worse than ever and I don’t expect it to improve. Most people don’t still support them though. I think you’ll continue to see more and more projects related to the Pi that just kind of stopped in the past year or two due to the whole ecosystem basically just breaking down and fragmenting.

      Raspberry Pi uses a *lot* of proprietary stuff like this despite portraying themselves as a huge ally of open source. That’s hilarious the plugin needs some kind of magic Raspberry Pi Java and Python implementation. Yikes. We were so blind back then to Raspberry Pi’s closed-hardware and closed-source firmware practices. A lot of these projects are probably being abandoned out of principle as once you get burned by the Pi ecosystem you start to see cracks and that you’ve really been corralled into another “Apple” situation where none of your accessories or software will work with anything else anymore and you find that giant mountains have been erected (on purpose) to prevent you from leaving the ecosystem.

      My advice would be to run away from this. Don’t lock yourself into these really old modified Java and Python libraries. Don’t lock yourself anymore into that ecosystem then you already are. It is dying both because of their failure to be able to provide the hardware to basically anyone that isn’t an IoT manufacturer and because people really got hurt by their closed-hardware practices during the shortage because it’s by design not compatible with anything else. It won’t play nice with the other boards which all try to play nice with the Pi however they can. It’s just like Apple’s walled garden. It’s literally the same playbook of proprietary cameras/accessories/etc. to achieve a “lock” on someone.

      Developers like me are moving away from it because I personally was hurt and thousands of people I’ve interacted with and that have used my projects were personally hurt and that’s going to be the same for a lot of developers. People have said to me they have to switch because of the outrageous pricing/supply and it’s hard to want to develop for or invest in an ecosystem that is susceptible to that happening whenever they can’t make enough Pis for any reason.

      Maybe it’s easy for me to say this though. I was forced to deal with the Pi situation. I didn’t want to. I wasn’t looking to switch. I was facing the reality of having to change careers though and that sobers you up real quick and gets you in the mood to accept things you previously weren’t able to. Now looking back I can’t believe I ever used them and that I didn’t see how proprietary and closed of an ecosystem it was.

      Hopefully that helps!

      1. Avatar for Jason

        Thank you for the thorough response and interesting backstory. Ok, so I’m not wedded to Raspberry Pi or the Pi ecosystem (I am a fan of the project’s ideals, but I guess that was naïve).

        What I really want is to run a playable (likely dedicated) server that supports Bedrock and Python (Java and scratch would be a welcome bonus) for ~< 10 remote people with some reasonable expectation of support for as long as possible. It must be free to other players. It would be great if the hardware on my end is cheap, but that is not a primary concern. Is there anything available that fits that bill?

        If not, I'm a reasonably competent Python programmer and not opposed to learning Java. Is it at all realistic to think I could fork and revive the RaspberryJuice plugin/mcpi_e with some (~100 hrs of) sweat equity? I think even the supported commands would be enough. Or is this just impossible because the backend hooks are no longer exposed in the current version of minecraft?

        1. Avatar for James A. Chambers

          Hey Jason,

          That helps a lot! I’m a huge fan of the Raspberry Pi ideals too. I just wish they would live up to them but the ideals of open source and everything are great. I suppose we just need to get them on board with open-source firmware and open-hardware designs.

          I can’t find much on the Pi protocol other than this:

          This page documents the Minecraft Pi API Protocol. The multiplayer protocol for Minecraft Pi is based on Minecraft PE's protocol.

          Parts of this documentation is based on the official Mojang documentation, which were released for free use. Other parts are based on the Desktop Protocol specification.

          The Minecraft Pi client listens to TCP port 4711 by default.

          Okay, so this is only for the Raspberry Pi edition of Minecraft. Surprisingly this still exists here.

          So this doesn’t work with regular Minecraft. This only works with the Pi Edition it looks like. It’s a special version. I downloaded and extracted this version and the file dates are from 2013. It really is very old.

          That page is really bittersweet to look at for me. There was a time when the Pi was so pure and good that even huge games like Minecraft got on board and made a special Pi edition. Things have not panned out but you can see the hope and optimism in that page that got lost somewhere along the way between then and now. Nobody is really doing things like this now since we were basically forced to understand they are a hardware company and an ecosystem by the shortage when all the sudden we couldn’t buy single board computers anymore (or switch very easily and none of the competition was compatible due to Broadcom’s trade secrets).

          Microsoft/Mojang have their own ecosystems to worry about and they have apparently stopped building Raspberry Pi’s ecosystem up for free for them. I really don’t blame them for falling for it. It might not have even been an act back then. I believed it up until only a couple of years ago.

          At some point along the way though Raspberry Pi became the largest SBC manufacturer in the world and things like this weren’t a priority anymore. They became big enough to ship open-source hardware/firmware a long time ago and their competitors are now starting to ship it. Raspberry Pi made a deal with the devil to get the chips (because nobody would have sold you open-source chips back then) but they decided they liked the closed-hardware model somewhere along the way (which is antithetical to the way they portray themselves as a huge open-source ally).

          They probably realize with all the clone boards out there that if it weren’t for this everyone probably would have switched already. If it was possible to have drop-in replacements the Pi would have been like the Xerox machine and just been replaced by a million copycats. We would still call what we were putting in them Pis but they wouldn’t be Raspberry Pi. That will happen anyway and is happening right now. It just isn’t easy because the Raspberry Pi is actually extremely closed as far as firmware and hardware go. It held for a while but if you look at all the new maker builds everyone is using ESP32 and other types of chips that are more open in design because nobody wants to be locked into that ecosystem anymore. We learned our lesson essentially.

          You might have better luck looking for a Spigot / Bukkit / Paper plugin that lets you run Python code. Here’s one that looks like it’s for version 1.17. Some people as recently as 2021 said it was still the best way to integrate Python onto your server.

          I think for the platform if you already have the Raspberry Pi it will probably work just fine. I think there’s some confusion though about the Pi edition vs. regular Minecraft. This is understandable because I encountered it all as well when I was searching Google. The public download for the Pi edition has files that are nearly 10 years old in it though. The version is described as “0.1.1 alpha” in version.txt. It has been in alpha for a decade apparently.

          The hottest alternatives right now would be the Orange Pi 5 and the Radxa Rock 5B (review pending, hopefully arrives this week). You can go to my Pi Benchmarks site and just look at the latest results and you’ll see what kind of devices people are using. The Orange Pi 5 is <$100 and has 8 CPU cores (twice as many as the Pi) and supports using NVMe as well (PCIe 2.0 speeds). The Pi Benchmarks site kind of gives you an idea/snapshot of what people are using day to day and what kind of performance they're getting out of the board. The storage performance is extremely important for a Minecraft server. You will absolutely not want to be using a SD card no matter what you use (you can use a SSD with the Pi as well).

          Your original plan may work by finding an alternative way to implement Python and it does look like there’s some options. You could probably even fix up that Python/Jython loader to work on the current versions and I’d imagine that would be a lot easier than 100 hours most likely. I think that using a Bukkit / Spigot / Paper plugin like that though will let you do what you would like to do.

          I could potentially even support it within the container if there’s just a package like Jython or something that needs to be added to the container. My guess is something would need to be added for this to work to the container like a Python or Jython package that probably isn’t present but if you figured out how to do it and it worked well I’d absolutely be willing to add the package/packages to the container unless it ends up being a totally crazy amount that triples the size of the container or something like that. If you worked with just a standalone Minecraft folder running it directly to figure out the Python stuff and what the requirements were I could add those to the container unless it would cause some kind of other problem.

          Hopefully that helps!

          1. Avatar for Jason

            I think that plugin is a bit different — I think it allows a user to write plugins in python rather than in java, not interface with the minecraft API using python. I found a couple plugins like that.

            I was able to follow these directions and get python working through java minecraft 1.12 using the mcpi library (the predecessor to mcpi_e). I was able to do most of what I wanted (even rendering arbitrary STL files inside minecraft!), but it was only available in java and I couldn’t get remote connections working which is a non-starter for me. But it didn’t require Minecraft Pi (unless that refers to the server software?).

            I also found this but it seems to be oriented around account management, not gameplay.

            1. Avatar for James A. Chambers

              Hey Jason,

              What is the Minecraft API? You’re talking about mcpi:

              Project description
              Minecraft: Pi edition API Python Library

              There is a API for the 10 year old Minecraft Pi edition. This edition is discontinued:

              The original team has stopped supporting it and starting with 0.9 MCPE became a lot more ambitious technically, which also means that it became a lot harder to strip down to run on a Raspberry Pi. Actually, we finished removing all Pi related code to reduce complexity in 2015.

              Maybe someday we'll revisit it but I wouldn't hold my breath :P

              They said all of the code for this was removed from the game in 2015. That’s probably why you have to go all the way back to Minecraft version 1.12.

              The reason I keep bringing up the Pi edition is that mcpi and mcpi_e are for the Pi edition. They are not for Java Minecraft or Minecraft Bedrock. They are for a discontinued version from almost 10 years ago basically. From mcpi_e’s GitHub:

              [For Python Education] Minecraft: Pi edition API Python Library modified version

              Hopefully that explains why I keep bringing up the Pi edition. That’s what the Python API you are trying to use is for. There is no such thing as a Minecraft Java/Bedrock API unfortunately.

              In fact they actually removed anything related to API stuff from the game entirely. Check out this minecraft.net article:

              Removing the Additional Modding Capabilities/Script API Experimental Feature

              In December 2018, we introduced a new experimental Scripting API and capability for adding JavaScript to Minecraft worlds to implement gameplay and other experiences. This beta capability was available on Windows versions of Minecraft Bedrock Edition via the “Additional Modding Capabilities” experiment. In early 2022, we’re looking to wind down the Additional Modding Capabilities experiment and associated Script API capability and remove it from future versions of Minecraft: Bedrock Edition. Over the coming weeks, in Minecraft Beta versions we’ll start to remove this functionality, and we plan for it be no longer available in Minecraft Bedrock Edition in the March timeframe. 

              In other words you will only be able to do this in those very, very old versions of Minecraft. This stuff was all aggressively removed from the game over the past few years. The Pi / educational version stuff was all removed in 2015 so that’s been gone for 7-8 years from the game which explains the version 1.12.

              There *was* code in the game to handle this that long ago. That’s what RaspberryJuice appears to be doing. It lets you access that Pi API even though you’re running it on Java with Windows. The reason it won’t work in any modern version of Minecraft is all of that stuff was deleted in 2015. The Pi stuff is all toast (and that’s officially confirmed in that link above from the developers).

              Anything related to any of these other APIs (which I believe were an entirely different set of APIs that existed after all of this other Pi API stuff was removed from the game) got removed not too long ago in 2022. They’re going in the completely opposite direction and pretty much said in that minecraft.net article that even servers that had it enabled previously will straight up break. They don’t want to offer this anymore but they have had several iterations of an API over the years.

              Hopefully that helps!

              1. Avatar for James A. Chambers

                Hey Jason,

                I totally agree honestly. I was initially really confused by your questions because 2015 was right around the time I was starting this site and releasing my first scripts. They had basically removed it right before I started getting really serious with the Minecraft tools / code. In other words it was slightly before my time in a Minecraft related development role!

                Check out this article here. This filled in some gaps for me because it’s a developer talking about what happened with this Pi fork. He went all the way back to 1.8 in his guide here and that was written in 2022 so everything seems to be adding up here even with the most recent examples I could find.

                This was an interesting read as well and Jeremy linked to it in his article as well. It looks like that Pi version doesn’t work at all anymore due to them requiring Microsoft accounts back in 2021 (a controversial change at the time).

                This explains why all of those GitHub repositories related to this went dark around 2-3 years ago for sure. The intended “Pi” version they were released for (even though people found ways to extend usage of the API via the plugin and versions 1.12 or older apparently) officially died in 2021 and became unplayable (although I’m sure people have modified clients to keep it working it’s still a death knell for any of the projects when officially it’s dead).

                I’m surprised nobody has recreated something like this. You’re absolutely right that this was awesome and for how long ago it was discontinued it’s amazing that some of those GitHub repositories have *only* been inactive for 3 years. That means they really fought this and hung on to hope that they would probably work on it again or resume it. It took Microsoft pulling the plug on the old sign-in system and requiring Microsoft accounts (something the Pi version was not set up for) for the last holdout projects to go inactive.

                I should note that Educational edition still exists but it’s something else now and doesn’t have any of this Python API stuff. Education edition is still very real. When I click on the lesson plans to see how it teaches kids about coding without an API it sounds like it’s in-game and part of the scenario or something. Like there’s different scenarios / lessons you can run on this Education edition apparently (and I can see the lesson plans or at least a lot of it).

                Definitely let me know if you encounter any way to do what you’d like as I think it’s fascinating / worthwhile. Perhaps there is something else that can do something similar (but I did look and didn’t see anything immediately obvious). Education edition may still be worth investigating for you. They seem to have sections for parents, educators, IT admins and even camps and clubs.

                I am not an expert on education edition to say the least (and at some point I suppose they are going to want money somehow) but this seems to be their official answer to what you are saying here. Whether it’s as good as what came before or not I couldn’t say myself but it might be worth investigating depending on exactly what you’re trying to do.

                The costs are involved look subscription to me (like Office 365) at $12/yr for individuals, $5.04/yr for like school per-seat subscriptions (like if you were buying license seats for a class) and potentially even less for big organizations (just like Office 365). Take care!

              2. Avatar for Jason

                Thanks for those links! Your first link shows him getting mcpi working with Java 1.18.2 (released Feb 2022). He connects to localhost, but can actually specify the server address, suggesting remote connections might work. That’s promising. The bedrock requirement might be negotiable.

                My primary goal is to get my kids and their cousins/friends playing and coding together (and your docker container made half of that easy!). Of course, if solving it for my kids means solving it for students worldwide, that’d be wonderful.

                I didn’t have much specific in mind, I really just wanted to showcase the power and potential of coding to curious minds. That unlocks a whole new level of sandboxing (while learning super valuable skills). The examples I saw were neat (build a rainbow, plant a trail of flowers), but they’re barely scratching the surface. For example, one of my niblings is into solidworks, and I was able to render a couple of his drawings within minecraft via python’s stltovoxel library. If I could get a python enabled bedrock server running, he could draw something in solidworks and export it to our minecraft world. When you can link world building into countless python libraries, who knows what they’ll dream up? Build a planetarium with pyephem? Render a folded protein with biopython? Build a scale model of your home town with pyqgis? Redstone and other advanced blocks couldn’t be placed with the mcpi library I used, but that’d be a whole new level — design circuits with SKiDL and prototype them in minecraft? Maybe you could still render the skeleton of a circuit with mcpi as is.

                Those “hour of code” things look surprisingly well done, but it’s not nearly as organic or as powerful as a direct python interface.

              3. Avatar for James A. Chambers

                Hey Jason,

                I took a closer look at this and I don’t see any reason why it wouldn’t work on newer versions to be honest. This looks like a complete recreation of the old Pi API to me. It doesn’t seem to depend on Minecraft at all and just seems to be using the Spigot APIs.

                I definitely see some problems like this:

                public static final Set blockBreakDetectionTools = EnumSet.of(
                Material.DIAMOND_SWORD,
                Material.GOLD_SWORD,
                Material.IRON_SWORD,
                Material.STONE_SWORD,
                Material.WOOD_SWORD);

                It doesn’t know what Netherite is so that would be pre-1.16 at least (I think we expect the code to match 1.12.1 though like it says on the GitHub). It’s probably stuff like that causing it not to work completely correctly. From what I can tell the entire API is implemented in these files.

                These seem to actually be calling Bukkit API stuff like here:

                /** from CraftBukkit's org.bukkit.craftbukkit.block.CraftBlock.blockFactToNotch */
                public static int blockFaceToNotch(BlockFace face) {
                switch (face) {
                case DOWN:
                return 0;
                case UP:
                return 1;
                case NORTH:
                return 2;
                case SOUTH:
                return 3;
                case WEST:
                return 4;
                case EAST:
                return 5;
                default:
                return 7; // Good as anything here, but technically invalid
                }
                }

                In other words this is an emulated API now that really works through Bukkit / Spigot / Paper. This is actually a *good* thing though. That explains why you’re seeing it on 1.18.2 potentially.

                My guess is to why they are using all of these old libraries or talking about it is simply that the code needs to be updated for newer versions of Minecraft. It needs to know what Netherite is for one and that one I caught just scrolling through. It might even need to be updated for newer versions of Paper / Bukkit / Spigot (what the API is essentially calling).

                There’s only about <2000 lines of code that make up all of RaspberryPiJuice and 1000 lines of it are in here. It mostly looks like a Bukkit API wrapper to me (which looks like does all the same things the original Pi API did).

                It might be worth starting with what he did and see if you can recreate his 1.18.2 version at least. That’s getting reasonably close to current and it might just need updates for the new structures/changes. That might be how he himself got it going but it looks like some people have done this relatively recently and that’s very encouraging.

                Maybe there’s more to this than there appears though. There’s a lot of modifications to the Java JRE which is why they talk about a custom Java. You might need to use his custom Java and Python libraries to do this. That might be the secret/trick.

                Hopefully that helps!

              4. Avatar for Jason

                Great, I’ll give it a shot!

                I’ve reached out to the RaspberryJuice developer too to see if he has any pointers or warnings for me. If the reason he stopped is because the backend is no longer accessible, I’d rather learn that now.

              5. Avatar for Jason

                That was easier than expected!

                I have the latest official Java Server with the latest spigot jar file (1.19.3) running on Win 10 that works with the current java minecraft version (1.19.3) using mcpi from a remote connection (after forwarding port 4711). Unless custom java is included in the spigot or raspberryjuice (1.12.1) jar files, I don’t think I’m doing anything particularly weird. I do get the same legacy warnings about RaspberryJuice I got when I loaded your docker container, but they don’t seem to have any negative impact.

                That’s workable now, but ideally, I’d like to run it from my Raspberry pi and allow connections from bedrock. Is that something I can recreate using Geyser and Floodgate like you do here?

              6. Avatar for James A. Chambers

                Hey Jason,

                Sure, you can add Geyser just like you added this long-removed API from the game! None of this stuff has anything to do with Minecraft realistically. This is pure 100% all mods and so is Geyser. Minecraft has zero of the capabilities you are using here. Microsoft doesn’t support any of this and they probably never will.

                Geyser will actually open the port and facilitate the connections just like this RaspberryJuice program is emulating/recreating the long-removed Pi API. You’d just install it as an additional plugin. It’s as simple as downloading the .jar file and putting it in your plugins folder.

                That’s basically all the container is. It’s just those files packaged together and isolated away from the main environment for security.

                I think you’ve basically done it now that we understand that nothing you are doing is implemented in Minecraft or has anything to do with it. That was the key part for me. I was really hung up that you were trying to access official/special Minecraft functions/APIs but this is just a mod anyone could make. If they had renamed all of the functions to start with the word “fart” it would work 100% the same because none of this code is actually in Minecraft. It’s all third party. It’s whatever the mod creator says it is.

                It’s also not limited to the functions that are currently in the API. You could add any function you want that accesses the Bukkit API. Considering the whole RaspberryPiJuice project is under 2000 lines I honestly think it would be easy to add new Python functions that have never existed in mcpi/mcpi_e. Why? Because it doesn’t matter what Microsoft/Mojang thinks about adding any of the functions because they don’t support any of this anyway.

                You could add whatever you wanted to to these libraries. We’re 100% in control of that because none of this stuff is official. Anything goes when it comes to custom mods. You’d probably have to modify both mcpi and RaspberryJuice simultaneously to add new functions but looking at the code it looks pretty easy.

                RaspberryPiJuice *IS* the API though. It’s the API server. It’s the one opening the API port and listening (not Minecraft). There’s nothing actually happening in Minecraft here. That stuff is long gone from the real game code. It’s all custom mod code. This is why it doesn’t matter which version you’re running at all (other than some of the functions probably won’t understand some things like Netherite). RaspberryPiJuice is just a wrapper that calls the Bukkit / Spigot / Paper and other built in Minecraft functions (the same ones you use by typing commands in the server).

                They just modeled it after the original. They didn’t have to though. It could have been anything and anyone could still make an API just like this naming the functions however they wanted. Spigot / Bukkit / Paper has far, far more capabilities than these are implementing. These are a recreation of the original which was frankly pretty limited compared to what the modded servers like Spigot can do. Spigot always had way better capabilities than vanilla since it’s inception and can do a lot more than this API is currently utilizing. I’m guessing mcpi_e probably did some of this. It’s a logical thing to extend these functions to some of the more fancy Spigot / Bukkit / Paper options.

                It really doesn’t matter in this case that it’s recreated. It lets you do what you want and that’s what is important. This is an excellent outcome!

                It probably matters in the educational sense that this API isn’t real/official anymore so it’s a lot less valuable as far as learning how to interact with Minecraft via code. It’s not an official API. Anyone could make / modify it to to what they want at this point which limits it’s value as far as you can’t teach people how to use this API and have it have any relevance to Minecraft administration for example. The skills won’t translate as this is a proprietary/custom solution so you couldn’t go work for someone else’s server operation and have them help you is what I mean (unless you convince your new boss to implement this custom mod solution). Without installing the custom mod this simply doesn’t exist in the game in any form.

                It’s more just getting a way to interact with Minecraft with Python which is a little unfortunate that this isn’t official or really supported anymore. Back then you could teach someone to administrate a server with pure Python if this hadn’t been deleted from the game 7-8 years ago. It’s a good way to see what could have been if Minecraft’s development took a different path.

                This is why it will work with the latest versions and it always should. This API has literally 0% to do with Minecraft and isn’t in the game at all. It’s custom. I should have looked at it more closely before. I was really off track by how much I was finding in Google about what once was a very real Minecraft API. This is just a custom recreation basically.

                It’s actually not clear to me that this API was ever in the real game. I don’t think so. I’d imagine that Python hackers just saw how awesome it was on the Pi edition and wanted those same capabilities on Java. It might have been in the Bedrock version at some point perhaps but I definitely don’t recall ever seeing it in Java. This was probably the only way to ever actually do this (with RaspberryJuice) outside of the actual Pi edition.

                It might be a good question to ask the RaspberryJuice creator how the whole thing came to be. Why did they make this? What is the exact story behind this strange tale? Why aren’t they maintaining it anymore (or are they, has nothing come up in 3 years, and why doesn’t it know what Netherite is)? The answers to some of these questions might impact how you’re feeling about using it for sure (along with a full understanding that this is basically a custom proprietary solution at this point and isn’t using any official code or accessing any official functions).

                It’s not a closed-source proprietary solution and that is important and scores major points. That gives the possibility of having a community around the mod supporting it (although like I said these GitHub repos are not showing a lot of activity). It is still a proprietary solution though as in it enjoys no official support of any kind and doesn’t even exist in the game without running custom mods.

                Hopefully that helps!

              7. Avatar for Jason

                Hi James,

                Thanks again for your guidance back in February.

                I ended up forking MinecraftDawn’s RaspberryJuice fork, cleaned it up, added a few of my own features, and renamed it to FruitJuice.

                I also made a few additions to MinecraftDawn’s fork of mcpi (the companion python library) and rebranded it to “pyncraft”, which is pip installable.

                Finally, I made a few tweaks to arpruss’s scratch plugin, and now it works with scratch, too.

                So now I have a Python/scratch API to the latest version of vanilla minecraft (without the legacy layer) that works on Java or Bedrock from anywhere in the world.

                Directions to set up a server here

                Jason

              8. Avatar for Jason

                Got it! An up-to-date, remotely accessible, Java/Bedrock/Python server running on a raspberry pi that is remotely accessible.

                Here are complete (hopefully!) directions that are meshed together from the link you gave and this page.

                In the end, I think this is like the docker container you describe here, so I’m not sure why it didn’t work out of the box. Maybe the python port (4711) wasn’t open?

                Any any rate, feel free to use this however you like.

                I might still play with RaspberryJuice to get it up to date and add support for more block types like redstone, but this is more than I was hoping for! Thank you!

              9. Avatar for James A. Chambers

                Hey Jason,

                Excellent work! That’s probably all it is. You need to open the port like you do for the rest of them and we’ve had people do this with similar mods that open their own ports. That would look like:

                -p 4711:4711

                All ports will be closed by Docker without you opening them.

                I can think of other reasons it might not work though. The container shouldn’t really have Python installed (maybe it does though). If it does it’s just coming with the main Ubuntu distro.

                It definitely wouldn’t have the mcpi library installed within the container though. It wouldn’t use your main system’s libraries for this. The container is completely isolated from your main system. It can’t touch anything on there and it doesn’t matter what you have installed. I have to install it for it to be in the container otherwise it won’t be. This protects your system from exploits like log4j or anything else as it’s a completely separate environment that can’t talk to your main one.

                In other words it shouldn’t work unless I install everything for the container that you installed for your system. The container’s behavior will never change no matter what is installed on your system since it doesn’t use it. It’s not clear to me what it would be missing though. It would probably depend on what errors you’re seeing in the console when trying to use it.

                I wouldn’t expect the container to be able to access Python or mcpi otherwise but does it even use Python internally? Or is there just a Python library to talk to this port the mod is opening?

                Basically the only answer to why it wouldn’t work within the container though is that I’m not including a dependency it needs (and due to the secure nature of how Docker works it absolutely does not matter what you have installed on your system, it’s completely isolated). I could definitely add them if we know what they are though.

                This is the reason if your server got hacked (and you were running the Docker version) basically nothing would happen outside of the Minecraft server itself being messed with. They can’t touch your main system. It’s not even running in the same context. If your server was exploited they would be stuck inside a fake virtual version of Ubuntu where any changes they make will reset the moment the container is restarted (because the files aren’t real and exist only in memory, they’re loaded each time the container starts and then only exist in memory as copies so all changes to them are lost each restart by design).

                This is a fantastic write-up, thanks for sharing, it looks fantastic and I’m so pleased that it’s working with the latest version of Minecraft as well!

              10. Avatar for Jason

                Python came pre-installed on raspbian, but I don’t think it’s used by raspberryjuice. I never installed mcpi on the server, just the client. So I think just adding the -p 4711:4711 to your docker command would do it. That’s a lot easier than my writeup!

              11. Avatar for James A. Chambers

                Hey Jason,

                That is fantastic! This is actually a really impressive mod. I could not give them any more props for not requiring an active Python environment and still being able to pull this off.

                I couldn’t have done it any better myself if this is the case. This is exactly how I would have designed it for maximum portability. I’m dang impressed. I’ll definitely be recommending this to others on the site who want to try to do anything similar to what you’re doing.

                If we were to look at a different example like the Python plugin loader I shared with you a lot earlier in our conversation that one would be a *nightmare* for me to support in the container. It’s why I added qualifiers such as “if it doesn’t triple the size of the container I’ll add it”. It’s night and day how much better of a design this one is than the other one we were looking at that requires not only an active Python but an active Jython environment as well.

                I’m very glad you shared your write-up too as well though. It’s nice to document the standalone process to do this as well. You’re right that it’s easier to use the containers but you built this and tested it the exact same way I would. I would have built this standalone like you did the exact same way before trying to make the container work with it.

                It’s very useful because you showed the process to basically completely prototype a Minecraft environment with this type of mod and it looks very similar to my own. These containers were born from standalone versions which still exist on my GitHub for sure. The standalone version is the first step and the more secure containerized version is more like the refined step you take to make sure that you can run it for years at a time without worrying about being hacked. Usually you have to worry about the environment when doing the containerization step unless the mod developers (and Minecraft developers) are doing a very good job and in this case it looks like they are.

                What you are saying makes perfect sense though. I couldn’t be more impressed with the results and the mod itself though and the way they went about implementing it. It’s perfect and I love that the whole (RaspberryPiJuice) library is <2000 lines to pull it all off so cleanly. Thanks again!

              12. Avatar for Jason

                I heard back from the RaspberryJuice developer. He pointed me to this pull request and the discussion therein. Basically, 13.1+ broke the plugin by changing the block map from integer ids to strings. Fortunately, the legacy layer within paper/spigot/Bukkit fixes it, which is why it still works. Still, the RaspberryJuice developer took that opportunity to wash his hands of it.

                There is an updated fork called JuicyRaspberryPie but it still calls the legacy layer, it created a bunch of files in non-standard places, added mcpi (as a dependency?), and it broke my server. It also hasn’t been updated in a year and the documentation didn’t make it clear what value it adds over the original. I didn’t try very hard to get it to work, but it didn’t seem worth the time. If I fork it, I’ll start over with RaspberryJuice.

                Meanwhile, I tried to get scratch to work but I was never able to connect to my server. That instructable comes from the author of RaspberryJamMod, another alternative to RaspberryJuice, and was never tested with RaspberryJuice (but he said it should work, albiet with version 1.12.2). I do get a response from my server when it tries to connect that makes me think it’s a bug in RaspberryJuice (java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 68). It’s worth noting that the default security settings block the connection because it has a secure page connecting to an insecure websocket, so you have to allow “insecure content”. Also, scratch’s hardcoded port is 14711, which is different than the default port used by the python API (4711).

              13. Avatar for James A. Chambers

                Hey Jason,

                Excellent, that’s fantastic! So this is good news. This looks super, super easy to fix. In fact look at the reasoning he gave for not accepting this merge:

                The change to minecraft's data model replacing integer ids with strings means that any version based on 1.13+ will no longer be compatible with programs made against previous versions or any program written to run on Minecraft: Pi edition.

                Okay, so this isn’t because it’s hard or it won’t work with the newer versions. It’s because the developer didn’t want to. He was all in on the Pi edition and that’s what he was passionate about. He doesn’t want to break compatibility with all of the old defunct stuff. That’s probably what he and all of the people he knew using at at the time were doing with it outside of these few other people in here dissenting. It sounds like he was more than happy to hand off maintaining this type of custom API to someone else to maintain but that never actually materialized.

                We don’t care about that at all fortunately. It should be really easy to change the data types from an int to a string and indeed it looks like someone already did it in that pull request. I’m sure there’s more you’ll have to do for more recent versions but I don’t think this would be hard to fork and update at all. You could start with that pull request someone submitted and that would take care of at least 1.13ish.

                I absolutely agree with you that JuicyRaspberryPi does not look like the place to start. That sounds like they tried to make it compatible with both Forge and Bukkit / Spigot and that’s just going to make it a lot messier. I would definitely start with the changes the RaspberryJuice developer rejected as that will get you further than the current version right off the bat. It also probably gets you over the “legacy” hump. It’s hard to say how much work you’ll have to do from there.

                If I were to guess though it won’t be that much. This was purely an ideological decision. There was no technical reason they couldn’t do this nor does it look particularly hard. You’ve done well uncovering the mystery of what happened to this. Things look *really* good for making an ideological break with the original RaspberryJuice developer and breaking compatibility with the Pi edition in order to bring this into more modern Minecraft versions.

                RaspberryJamMod for Scratch looks like it’s mostly meant for Forge servers although maybe there’s a Bukkit / Spigot variant kind of like there was for JuicyRaspberryPie I’m not seeing.

                My recommendation would actually be to try easing into it with RaspberryJuice. I would try downloading that pull request that is still open to this day and see what kind of shape it’s in. You may even want to try going back to 1.13 and just make sure it’s working properly with 1.13. From there you could start turning up the versions and see what breaks. There’s probably going to be little “humps” where APIs or Minecraft features were changed in major revisions and you’ll update some other data types here or there for that.

                I could imagine this only taking several hours to update if you seriously just need to change the data types from int to string and then maybe make some other changes here and there like adding Netherite types and anything else you encounter that has been tweaked since this has been worked on. On the worse end I could see it taking several days. It’s hard to see it taking several weeks because at that point you could just start with the Bukkit API reference and probably have rewritten it from scratch in that amount of time.

                All of your excellent research here seems to be pointing to try the RaspberryJuice pull request and start playing with it (starting with older versions) and see how much work it is going to take to modernize it. You might find it might only be a few hour to a few day project potentially here by the developer’s responses being based purely on principle / ideology and not on difficulty / technical challenges.

                The RaspberryJamMod says that it’s specifically for Forge. Forge is a totally different system from Spigot so I’d imagine this isn’t compatible potentially.

                Let me know what else you find for sure!

  3. Avatar for Hakan

    Hello! First, i love the idea of MC docker. Great idea. Second, i have some problem getting the Minecraft Java + Bedrock Server Together – Geyser + Floodgate docker to get up and running on the rpi3.
    Question: What would be a “stable” MaxMemory size at docker startup script for rpi3?
    Question: Is the Maxmemory setting also a cap for swap memory?
    Question: Shall be GPU memory be alted in the docker version also to 16Mb?
    Symptom: Servercrash often before the server is up and running. The server poped up one or twice, and afterwards crash. One user only then. Severals SD card erase and install. I assume i have hit memory overrun as the rpi3 only have 1G in total. I have used MaxMemory=1024 and less. All other times the server never comes up but get stuck in startup script.
    Thanks in advance!

    1. Avatar for James A. Chambers

      Hey Hakan,

      Welcome! So you aren’t going to be able to use anywhere near 1GB on a Pi 3. I would start at like 400-500MB. You have to leave room for everything else that is running on the Pi otherwise it will just crash. Try setting it incredibly low on that device like 400-500.

      The GPU memory would have to be modified by your OS. Docker won’t use the GPU at all. You can absolutely change your Pi to use 16MB of video memory but that is a part of your OS and not a part of Docker at all. To do this you would edit your config.txt file and add:

      gpu_mem=16

      I would say to try with dramatically less than you have been. If you type the command “free” how much free memory does it say you have? I don’t think you can run it on too much less than 500-600MB so if there’s less than that in use then that is why it is crashing. I’d tell you to use even less than 400-500MB but I don’t think you can. If it says you only have like 200-300MB free then some of the other things running probably need to be closed/uninstalled.

      You might honestly be better off using the standalone version on something like a Pi 3 unfortunately. That really will give you an extra 50-100MB of RAM to work with at least and the RAM is so low on anything older than the Pi 4 that you might honestly not be able to do Docker on it without really uninstalling/removing a lot of other running applications. It’s just so resource starved for a device in 2023 and the extra memory Docker uses is really going to hurt a device that old.

      Normally I don’t recommend the standalone version but if we’re dealing with really small amounts of RAM it can help. I would see if you can get the Docker version to work first using much lower memory values though.

      Hopefully that helps!

  4. Avatar for Randomguy

    Hi James,

    I am trying to change the paper config, but every time I restart the server to apply the changes, it resets them to default.
    Any idea how to fix this?

    1. Avatar for James A. Chambers

      Hey Randomguy,

      Welcome! So you’re incredibly close. The way to do this is to close the server *first* before making the changes. What is happening is that the Docker files are in use while you are trying to edit them.

      If you close the server first then make the edits and then start it up after that the changes should stick. Hopefully that helps!

      1. Avatar for Randomguy

        Hello James,
        I have tried to do this a couple of times, but still it seems as it resets to some default setting which doen’t allow me to keep them.

        1. Avatar for James A. Chambers

          Hey Randomguy,

          Thanks for trying it with it closed first. The detail you gave that it’s specifically the Paper settings helps too.

          So the first thing is when you are editing these types of files (.yml or YAML) if you make a single mistake on spacing it will break the entire file. This will cause it to reset to defaults when you open it again.

          When this happens it will give you a message on the server console. Can you open your Docker container with:

          docker container ls
          docker container attach xxxx

          Now what we are looking for is that when this happens there will be a warning that there was some sort of invalid Paper setting and the file is being reset to defaults. It will usually tell you which setting / line it was that broke it.

          In the past when people have got this they were trying to put a string in the options file when it was supposed to be a number in the past (like 0-9 and they tried to type none instead of 0). That would do it and in that case it gave them a warning in the startup that they showed me and it said which setting it was.

          The best thing to do is try making your changes and then post your paper.yml file into a YAML validator like here. This will check it for spacing or other errors that will cause it to reset the YAML file. Once it can pass the YAML validation test with no errors it should be safe to put into paper.yml without it being reset the next time the server starts.

          Hopefully that helps!

    1. Avatar for James A. Chambers

      Hey Nathan,

      Absolutely! So the easiest way is to use docker attach like this:

      docker container ls
      docker container attach xxxx

      This will bring up the server console. You can minimize it again by pressing Ctrl+A followed by Ctrl+D. Once you have it up though you can op someone as simply as typing:

      op playername

      That should get it going here for you!

        1. Avatar for James A. Chambers

          Hey Blazeop,

          Yes, that’s definitely a more platform independent way to do it. I forget that Windows / Mac OS X probably won’t recognize those hotkeys like a Linux interactive terminal will.

          Ctrl+A + Ctrl+D on Linux can vary by program as to what it does on Linux but with Docker it’s recognized as a detach (just like the screen application basically). Windows I would expect to not recognize it at all. Mac OS X I have no idea if enough Unix has survived over the years that it would still recognize the terminal hotkeys. Probably not.

          Thanks for sharing!

Leave a Comment

Your email address will not be published. Required fields are marked *

Type here..

Exit mobile version