{"id":22194128,"url":"https://github.com/filiprokita/minecraft-server-docker","last_synced_at":"2025-10-13T00:30:45.488Z","repository":{"id":257768579,"uuid":"859207462","full_name":"FilipRokita/minecraft-server-docker","owner":"FilipRokita","description":"Easily deploy and manage Minecraft servers with this Docker setup. This project streamlines the process of running Minecraft servers, including various modpacks, by leveraging Docker's benefits of isolation, portability, and consistency. Simplify your server management and ensure a consistent environment across different machines.","archived":false,"fork":false,"pushed_at":"2024-09-30T11:25:01.000Z","size":62,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-02T13:11:55.462Z","etag":null,"topics":["containerization","devops","docker","gaming","java","minecraft","minecraft-mods","minecraft-server","modpacks","open-source","server","server-management","servers"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/FilipRokita.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-18T09:16:04.000Z","updated_at":"2024-11-30T09:10:28.000Z","dependencies_parsed_at":"2024-09-25T00:02:50.253Z","dependency_job_id":null,"html_url":"https://github.com/FilipRokita/minecraft-server-docker","commit_stats":null,"previous_names":["filiprokita/minecraft-server-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fminecraft-server-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fminecraft-server-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fminecraft-server-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilipRokita%2Fminecraft-server-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FilipRokita","download_url":"https://codeload.github.com/FilipRokita/minecraft-server-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236284633,"owners_count":19124144,"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":["containerization","devops","docker","gaming","java","minecraft","minecraft-mods","minecraft-server","modpacks","open-source","server","server-management","servers"],"created_at":"2024-12-02T13:11:32.269Z","updated_at":"2025-10-13T00:30:40.193Z","avatar_url":"https://github.com/FilipRokita.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Server in Docker\n\n## Table of Contents\n- [Overview](#overview)\n- [Why Use Docker for Minecraft Server?](#why-use-docker-for-minecraft-server)\n- [Prerequisites](#prerequisites)\n- [Tested On](#tested-on)\n- **[Installation](#installation)**\n- **[Usage](#usage)**\n- [Uninstallation](#uninstallation)\n- [Troubleshooting](#troubleshooting)\n- [Additional Information](#additional-information)\n\n## Overview\nThis project provides a Docker setup for running a Minecraft server. It simplifies the process of setting up and managing Minecraft servers by using Docker, making it easier to deploy and maintain different Minecraft server versions and modpacks.\n\n## Why Use Docker for Minecraft Server?\nRunning a Minecraft server in a Docker container offers several advantages:\n- **Isolation**: Each server runs in its own environment, reducing conflicts with other software.\n- **Portability**: Easily move your server setup between different machines.\n- **Consistency**: Ensure that the server runs in the same environment every time, reducing issues related to system differences.\n\n## Prerequisites\n- Git and Docker Engine installed on your machine.\n- Basic familiarity with Docker commands.\n\n## Tested On\nUbuntu Server 22.04 with:\n- [All the Mods 9-0.3.2](https://www.curseforge.com/minecraft/modpacks/all-the-mods-9)\n- [All the Mods 10-0.52](https://www.curseforge.com/minecraft/modpacks/all-the-mods-10)\n- [Better MC [FORGE] BMC4 v32.5](https://www.curseforge.com/minecraft/modpacks/better-mc-forge-bmc4)\n- [Paper 1.21.1](https://papermc.io/)\n- [RLCraft 1.12.2 - Release v2.9.3](https://www.curseforge.com/minecraft/modpacks/rlcraft)\n- [Vanilla 1.21.1](https://www.minecraft.net/pl-pl/download/server)\n\n## Installation\n\n1. **Clone the Repository**\n    ```bash\n    git clone https://github.com/FilipRokita/minecraft-server-docker\n    ```\n\n2. **Rename the Repository Folder**\n    ```bash\n    mv minecraft-server-docker mcsrv\n    ```\n\n3. **Edit Dockerfile (if needed)**\n    - Open the `Dockerfile` and locate the line that installs Java:\n        ```dockerfile\n        RUN apt-get update \u0026\u0026 \\\n            apt-get install -y curl openjdk-21-jdk wget\n        ```\n    - If you are running an older version of Minecraft, change the Java version to `openjdk-8-jdk`. Additionally, if your server requires extra packages (such as `unzip`) add them to this line. For example:\n        ```dockerfile\n        RUN apt-get update \u0026\u0026 \\\n            apt-get install -y curl openjdk-8-jdk wget unzip\n        ```\n        Some servers might work with only `openjdk-X-jre-headless` installed, but you’ll need to experiment to find what works best.\n\n4. **Build Container and Create Symlink**\n   - From inside the `mcsrv` directory, create a symlink to the Docker volume for easy access to your data:\n     ```bash\n     docker compose up -d --build \u0026\u0026 docker compose down\n     ln -s /var/lib/docker/volumes/mcsrv_data/_data data\n     ```\n   - *Note:* The path to the volume may vary. You can check the exact path using `docker volume inspect mcsrv_data`\n\n5. **Download Server Files**\n    - Download the Minecraft server files or modpack server files.\n    - Place the `.jar` file or unzipped files into the `data` folder.\n\n6. **Run Docker Container**\n    ```bash\n    docker compose up -d\n    ```\n    *Note:* You must run this command inside `mcsrv` folder\n\n7. **Attach to the Container**\n    ```bash\n    docker attach mcsrv-mc-1\n    ```\n    You are now in the Docker container.\n\n8. **Initial Server Configuration**\n    - Follow the server or modpack guide for the initial setup. If no guide is available, common steps include:\n        - Run `java -jar server.jar`.\n        - Accept the EULA by editing `eula.txt`.\n            ```bash\n            echo eula=true \u003e eula.txt\n            ```\n        - Create a `run.sh` script with:\n            ```bash\n            java -Xmx8G -jar server.jar nogui\n            ```\n            *Note:* Adjust `-Xmx8G` to match the amount of RAM your server will use (in this case, 8GB).\n    - Run the server manually for the first time, wait until the world generates, and stop it with `stop`.\n\n9. **Detach and Stop the Container**\n    - Use `Ctrl + P`, then `Ctrl + Q` to detach from the container.\n    - Run this command inside `mcsrv` folder to stop the container:\n        ```bash\n        docker compose down\n        ```\n\n10. **Finalize Docker Configuration**\n    - Edit the `Dockerfile` to uncomment the `CMD` line and ensure it points to your `run.sh` script.\n    - If necessary, modify the line to match the script provided by the modpack. (e.g, `startserver.sh`, `start.sh`, etc.)\n\n## Usage\n\n- **Start Server**\n    ```bash\n    docker compose up -d\n    ```\n    *Note*: If you are running this command for the first time after installation, use `docker compose up -d --build`. Also, ensure you are executing the command inside the `mcsrv` folder.\n\n- **Stop Server**\n    ```bash\n    docker attach mcsrv-mc-1\n    stop\n    docker compose down\n    ```\n\n- **Stop Server (Emergency)**\n    ```bash\n    docker compose down\n    ```\n    *Note:* Use this command inside `mcsrv` folder if the server is unresponsive or crashes.\n\n- **Access Server Console**\n    ```bash\n    docker attach mcsrv-mc-1\n    ```\n\n- **Exit Console**\n    - Use `Ctrl + P`, then `Ctrl + Q`.\n\n## Uninstallation\n\n1. **Remove Folder**\n    ```bash\n    rm -rf mcsrv\n    ```\n\n2. **Remove Docker Container, Image, and Volume**\n    ```bash\n    docker container rm -f mcsrv-mc-1\n    docker image rm mcsrv-mc\n    docker volume rm mcsrv_data\n    ```\n\n## Troubleshooting\nFor issues or questions, refer to:\n- [Docker Docs](https://docs.docker.com/)\n\n## Additional Information\n\n**Version:** 1.0.21  \n**Date:** 2024-09-18  \n**License:** [MIT License](LICENSE)  \n**Author:** [Filip Rokita](https://www.filiprokita.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiliprokita%2Fminecraft-server-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiliprokita%2Fminecraft-server-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiliprokita%2Fminecraft-server-docker/lists"}