{"id":17834738,"url":"https://github.com/mcrowson/minecraft_jupyterhub","last_synced_at":"2025-03-19T13:31:03.573Z","repository":{"id":56659362,"uuid":"151879752","full_name":"mcrowson/minecraft_jupyterhub","owner":"mcrowson","description":"Instructions to Setup JupyterHub and Minecraft. Teach Python via Minecraft","archived":false,"fork":false,"pushed_at":"2020-10-26T18:51:45.000Z","size":38,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T07:12:20.757Z","etag":null,"topics":["hacktoberfest","jupyterhub-deployment","minecraft"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcrowson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-06T20:39:23.000Z","updated_at":"2024-03-08T08:40:32.000Z","dependencies_parsed_at":"2022-08-15T22:50:14.398Z","dependency_job_id":null,"html_url":"https://github.com/mcrowson/minecraft_jupyterhub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrowson%2Fminecraft_jupyterhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrowson%2Fminecraft_jupyterhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrowson%2Fminecraft_jupyterhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrowson%2Fminecraft_jupyterhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcrowson","download_url":"https://codeload.github.com/mcrowson/minecraft_jupyterhub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244434759,"owners_count":20452245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","jupyterhub-deployment","minecraft"],"created_at":"2024-10-27T20:10:03.488Z","updated_at":"2025-03-19T13:31:03.330Z","avatar_url":"https://github.com/mcrowson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft with Python\nThis repo shows how to setup a Minecraft Server that gives users the ability to change the world through Python.\nDocker all the things. This will be running a Spigot Minecraft 1.13.1 server with the RaspberryJuice Plugin that allows\nPython API calls. Interaction with the Minecraft server will be done through the [mcpi](https://github.com/martinohanlon/mcpi) library with \nAPI instructions available [here](https://www.stuffaboutcode.com/p/minecraft-api-reference.html).\n\nJupyterhub                 |  Minecraft\n:-------------------------:|:-------------------------:\n![](https://user-images.githubusercontent.com/6452882/47052283-b2721580-d175-11e8-85f9-1aa644a11258.png)  |  ![](https://user-images.githubusercontent.com/6452882/47052284-b2721580-d175-11e8-97dc-52ae7e4110b8.png)\n\n\n\nThis project was created for the purposes of teaching introductory Python concepts.\n\n### Setup\nThis will run a Minecraft server and JupyterHub behind and NGINX proxy. SSL is done via Let's Encrypt for secure access to JupyterHub. Users\nauth to the JupyterHub via GitHub OAuth. \n\nCreate a GitHub OAuth application that we will link to JupyterHub [https://github.com/settings/applications/new](https://github.com/settings/applications/new)\nwith https://subd.domain.com/hub/oauth_callback as the callback URL. \n\nNote the client_id and client_secret that GitHub provides after creation. We will need them below.\n\n### Environment Variables\nYou will configure these services through environment variables. Below is a list of the variables you need to change before launching the stack. The\nsections below are the services in the docker-compose.yml file.\n\n#### jupyterhub\n- OAUTH_CALLBACK_URL: This will be the callback URL you provided to GitHub when creating the application eg. https://subd.domain.com/hub/oauth_callback\n- GITHUB_CLIENT_ID: The client_id GitHub provided after creationg the application.\n- GITHUB_CLIENT_SECRET: The client_secret GitHub provided after creating the application\n- VIRTUAL_HOST: The domain that jupyterhub will be accessed at. eg sub.domain.com\n- LETSENCRYPT_HOST: The domain that jupyterhub will be accessed at. eg sub.domain.com\n- LETSENCRYPT_EMAIL: The contact email for Let's Encrypt eg. admin@domain.com\n- JUPYTERHUB_ADMIN: The GitHub username for the first Admin account; supply multieple names separated by commas. Subsequent users can be added through the JupyterHub GUI after launch.\n\n### Launch\n`docker-compose up -d`\n\nTo give your minecraft user Operator privleage, open up RCON cli.\n```bash\ndocker-compose exec minecraft rcon-cli\n\u003e op MINECRAFTNAME\n```\n\nOpen your Minecraft Java client and connect to your Multiplayer Server, once you're in game,\nopen up a Jupyter notebook at your domain, and try the following.\n\n```python\nfrom mcpi import minecraft\nmc = minecraft.Minecraft.create('minecraft')\nmc.postToChat(\"Hello Minecraft World\")\n```\nIf you see your message in the chat, all is working!\n\n\n### Additional Resources\nI found the following very helpful in setting this up:\n - [CoderDojo Docs](https://coderdojotc.readthedocs.io/projects/python-minecraft/en/latest)\n - [JupyterHub Setup Talk](https://www.youtube.com/watch?v=gSVvxOchT8Y)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrowson%2Fminecraft_jupyterhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcrowson%2Fminecraft_jupyterhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrowson%2Fminecraft_jupyterhub/lists"}