Running a Minecraft server on Heroku
You only need one file with one line of text to run a Minecraft server on Heroku with my Minecraft buildpack. It solves all the problems associated with the use of TCP and Heroku’s ephemeral filesystem.
Create a new directory and add a eula.txt
file with the following
contents:
Now initialize a Git repository and commit the file to it:
Then install the Heroku toolbelt and create a new app using my Minecraft buildpack:
In order to access the server, you’ll need a free ngrok account. After creating an account, copy your auth token, and set it as a configuration variable like this (replacing “xxx” with your token):
Now deploy your project:
You will see a few dependencies install, and finally Minecraft it self being installed. When the deployment process is complete, run the following command to open a browser:
In the browser you’ll see the logs of ngrok. Look for a line like this:
The value similar to ngrok.com:45010
is the server you’ll connect to with your
local Minecraft client.
You can check the status of the Minecraft server by inspect it’s logs with this command:
Once the server reports that up and running, like this:
Then you can connect to it. Open your local Minecraft app,
and select “Mutliplayer”. Then select “Direct Connect”, and in the text box
for server name enter the ngrok.com
address you saw in your browser.
Click “Join Server” and you’re ready to play.
You can read more about how to configure and sync the Minecraft server’s data on the project’s Readme page.