Code Monkey home page Code Monkey logo

minecraft-server-on-heroku-template's Introduction

minecraft-server-on-heroku-template

steps:

  1. Create a repo on github and clone it onto your computer.
  2. Download the .zip file and extract the contents into the local repo folder.
  3. Create a ngrok account on https://ngrok.com and paste the auth token in .ngrok2/ngrok.yml
  4. Commit and push.
  5. Create a heroku account on https://heroku.com and create an app. In the "Deploy" tab, connect to github and your repo.
  6. Go to the "Settings" tab, click on "add buildpack", and add the following: node.js, PHP, python, Java, and paste "https://github.com/jkutner/heroku-buildpack-ngrok.git" (without the quotation marks ofc) into the buildpack url.
  7. Go to the "Resouces" tab, and in the "add-ons" section, add Heroku Postgres.
  8. Head back on to the "Deploy" section, scroll down to the Manual Deploy section, and click "Deploy Branch".
  9. After the app deploys, head to the "Resources" tab and disable the "web python3 main.py" and enable "worker node setup.js".
  10. Deploy the app again. click on the "more" and then "view logs".
  11. Once you see "script: uploaded to db", head back to "Resources" and enable "web python3 main.py" and disable "worker node setup.js".
  12. Deploy again to start the server. In the logs, you will see "script: started ngrok tcp" when the server is ready. Click on "open app" and copy the first tunnel url(without the tcp://). x.ngrok.io.xxx will be the IP.
  13. To modify the world, you will have to manually delete the current world, launch the server locally to generate a new world, zip it, and upload to GitHub. Repeat steps 9 to 12 to set up the new world.
  14. To modify the server, directly change the server.properties on GitHub.

There is currently no way of accessing the server console, so you will have to execute them from the Minecraft Client.

Video instructions: https://youtu.be/EBzkSDBmaoU

If you want to use another server thats not vanilla or spigot, the process would be the same: rename the server to server.jar, run it locally to set it up, and then push and deploy.

To use jdk 11 or 15, refer to https://devcenter.heroku.com/changelog-items/1489 and https://devcenter.heroku.com/changelog-items/1887

minecraft-server-on-heroku-template's People

Contributors

brucewastaken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

minecraft-server-on-heroku-template's Issues

Please add a .gitignore file

The node_modules is still present in your .zip folder and does not contain a .gitignore file witch should be added you could put at least:

node_modules
.idea
.vscode

as an exemple in your .gitignore file

Cannot make add own world.

I deleted both the zip and world, and replaced with my worlds zip and folder. But it doesent change the world.

Minecraft 1.17

When Setup a 1.17 server, herokus give to us error : "Error R14 (Memory quota exceeded)". I believe this error ocurs by jdk 16. Can anyone help?

how would i make it moded

I have the server forge in my server folder but it says its vanila. Do i have to change any files in the folder

java version error for 1.17.1

followed the tutorial step by step until i ran into this error:

short error:

2021-07-19T17:31:10.504931+00:00 app[web.1]: Error: A JNI error has occurred, please check your installation and try again

2021-07-19T17:31:10.505564+00:00 app[web.1]: Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0

long error:

2021-07-19T17:31:10.403630+00:00 app[web.1]: **script**: starting server

2021-07-19T17:31:10.411829+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 

2021-07-19T17:31:10.504931+00:00 app[web.1]: Error: A JNI error has occurred, please check your installation and try again

2021-07-19T17:31:10.505564+00:00 app[web.1]: Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0

2021-07-19T17:31:10.505719+00:00 app[web.1]:     at java.lang.ClassLoader.defineClass1(Native Method)

2021-07-19T17:31:10.505829+00:00 app[web.1]:     at java.lang.ClassLoader.defineClass(ClassLoader.java:756)

2021-07-19T17:31:10.505897+00:00 app[web.1]:     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

2021-07-19T17:31:10.505966+00:00 app[web.1]:     at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)

2021-07-19T17:31:10.506033+00:00 app[web.1]:     at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

2021-07-19T17:31:10.506097+00:00 app[web.1]:     at java.net.URLClassLoader$1.run(URLClassLoader.java:369)

2021-07-19T17:31:10.506162+00:00 app[web.1]:     at java.net.URLClassLoader$1.run(URLClassLoader.java:363)

2021-07-19T17:31:10.506233+00:00 app[web.1]:     at java.security.AccessController.doPrivileged(Native Method)

2021-07-19T17:31:10.506316+00:00 app[web.1]:     at java.net.URLClassLoader.findClass(URLClassLoader.java:362)

2021-07-19T17:31:10.506378+00:00 app[web.1]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

2021-07-19T17:31:10.506461+00:00 app[web.1]:     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)

2021-07-19T17:31:10.506531+00:00 app[web.1]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

2021-07-19T17:31:10.506615+00:00 app[web.1]:     at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)

Playit.gg

Could you use playit.gg or simular instead of ngrok to get a always the same URL?

No dynos

I'm sure I made a mistake somewhere. Any ideas why neither the main.py and setup.js dynos would show up after deployment? I've followed the video up till just before you check logs to show its up and running and I've followed the README up until it says to disable main.py and enable setup.js.

Picked up JAVA_TOOL_OPTIONS | Memory quota exceeded

2021-12-04T19:51:08.559560+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
2021-12-04T19:51:09.474009+00:00 app[web.1]: *** Error, this build is outdated ***
2021-12-04T19:51:09.474112+00:00 app[web.1]: *** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***
2021-12-04T19:51:09.474148+00:00 app[web.1]: *** Server will start in 20 seconds ***
2021-12-04T19:51:53.138206+00:00 heroku[web.1]: Process running mem=644M(125.9%)
2021-12-04T19:51:53.140037+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-12-04T19:52:14.517174+00:00 heroku[web.1]: Process running mem=679M(132.6%)
2021-12-04T19:52:14.538569+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-12-04T19:52:35.629130+00:00 heroku[web.1]: Process running mem=704M(137.6%)
2021-12-04T19:52:35.707595+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.