{"id":13529561,"url":"https://github.com/tywil04/minecraft-docker","last_synced_at":"2025-04-01T16:31:33.363Z","repository":{"id":171772093,"uuid":"648395502","full_name":"tywil04/minecraft-docker","owner":"tywil04","description":"Java and Bedrock Minecraft server with embed Discord bot that allows members to start and stop the server on command.","archived":false,"fork":true,"pushed_at":"2023-12-14T21:38:57.000Z","size":256,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-11-02T16:34:58.995Z","etag":null,"topics":["discord-bots","discordgo","docker","github-package-registry","golang","minecraft","minecraft-bedrock","minecraft-java","minecraft-server","mit-license"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tywil04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-01T21:54:28.000Z","updated_at":"2024-09-22T19:22:28.000Z","dependencies_parsed_at":"2023-10-01T21:45:28.908Z","dependency_job_id":null,"html_url":"https://github.com/tywil04/minecraft-docker","commit_stats":null,"previous_names":["tywil04/minecraft-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tywil04%2Fminecraft-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tywil04%2Fminecraft-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tywil04%2Fminecraft-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tywil04%2Fminecraft-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tywil04","download_url":"https://codeload.github.com/tywil04/minecraft-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246670545,"owners_count":20815003,"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":["discord-bots","discordgo","docker","github-package-registry","golang","minecraft","minecraft-bedrock","minecraft-java","minecraft-server","mit-license"],"created_at":"2024-08-01T07:00:37.423Z","updated_at":"2025-04-01T16:31:33.023Z","avatar_url":"https://github.com/tywil04.png","language":"Go","readme":"# Java and Bedrock Minecraft With Embed Discord Bot\n\nThis is a fork of [TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate](https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate) with an included discord bot that allows people to start and stop the server at will (the server auto shutsdown after a defined period).\n\nThe server uses PaperMC and has preconfigured plugins to allow bedrock people to play and authenticate (using geyser and floodgate).\n\nThe discord bot is written in golang (please dont judge my code, its awful because I made it really quickly - I also have no intention to add additional features or 'fix' my bad code because it does its job)\n\n## Screenshot\nPlease note that the `Worlds` field is custom (its been added using the `ADDITIONAL_MESSAGES_FOR_EMBED` environment variable)\n![Demo Image](demo.png)\n\n## Usage\nTo use a pre-built image use `ghcr.io/tywil04/minecraft-with-discordbot-docker`. This image uses environment variables as the main method for configuring the container, there are however configuration files for the server that are stored within its volume that can be modified if so desired. I would recommend using a path on the host machine instead of a docker volume because its easier to access your files that way which will be useful and almost certainly required at some point.\n\n### Ports\nThe default ports that are exposed and required (they can be changed via the environment variables below):\n- `25565` for Java\n- `19132` for Bedrock\n- `19132/udp` for Bedrock\n\n### Volumes\nIf you want your minecraft server to store its config (you most likely do) then you will need to use a volume that links to `/minecraft` in the container.\n\n### Examples\nWith default ports:\n```\ndocker run -it -v /path/on/host:/minecraft -p 25565 -p 19132 -p 19132/udp --restart unless-stopped ghcr.io/tywil04/minecraft-with-discordbot-docker\n```\n\n## Building\nAs with most docker containers, its really easy to build. \n\nStart by cloning this repo:\n```\ngit clone https://github.com/tywil04/minecraft-docker\n```\n\nEnter the repo:\n```\ncd minecraft-docker\n```\n\nBuild with tag:\n```\nsudo docker build . -t your-tag-here\n```\n\n## Environment Variables\nFor the configuration of environment variables for the discord bot only I recommend using a docker volume. The discord bot loads environment variables from a `.env` file located at `/`\n```\n/path/to/discordbot.env:/.env\n```\n\n### Port\nSet port environment variable. Default is `25565`.\n\n### BedrockPort\nSet Bedrock port environment variable. Default is `19132`.\n\n### MaxMemory\nOptional maximum memory Minecraft is allowed to use\n\n### Version\nOptional Paper Minecraft Version override. Default is `1.20.1`.\n\n### TZ\nOptional Timezone. Default is `Europe/London`.\n\n### NoBackup\nOptional folder to ignore during backup operations\n\n### BackupCount\nNumber of rolling backups to keep. Default is 10.\n\n### NoPermCheck\nOptional switch to skip permissions check.\n\n### QuietCurl\nOptional switch to tell curl to suppress the progress meter which generates much less noise in the logs. Default is true.\n\n### NoViaVersion\nOptional switch to disable ViaVersion\n\n### BOT_TOKEN\nDiscord Bot Token. Needs to be set for discord bot to work.\n\n### APP_ID\nDiscord Application Id. Needs to be set for discord bot to work.\n\n### GUILD_ID\nGuild Id (can be blank but it will take a bit for commands to register globally - this is a limitation of discord).\n\n### OWNER_ID\nThe person who 'owns' the bot (the only one who can run the command to create the message that allows for starting/stopping server). Needs to be set or nobody can use the bot.\n\n### BEDROCK_ADDRESS\nThe address for accessing the bedrock minecraft server like mc.example.org. Needs to be set or a the discord bot will look strange.\n\n### BEDROCK_PORT\nThe port for accessing the bedrock minecraft server. Default is `19132`. This uses a seperate environment variable because the port users connect with might be different to the port within the container.\n\n### JAVA_ADDRESS\nThe address for accessing the java minecraft server like mc.example.org. Needs to be set or a the discord bot will look strange.\n\n### JAVA_PORT\nThe port for accessing the java minecraft server. Default is `25565`. This uses a seperate environment variable because the port users connect with might be different to the port within the container.\n\n### MC_VERSION\nThe minecraft version so the discord bot can display it. Required otherwise bot will look odd.\n\n### LOGS_CHANNEL_ID\nThe discord channel in which to log who starts/stops the server, leave blank for it to be disabled.\n\n### START_STOP_TIMEOUT_IN_SECONDS\nThe timeout between starting/stopping the server. Default is `30` seconds.\n\n### AUTOSTOP_TIMEOUT_IN_MINUTES\nHow long it takes for the server to automatically shutdown once empty. Default is `30` minutes.\n\n### ADDITIONAL_MESSAGES_FOR_EMBED\nAdditional fields to add to the embed created by the /minecraft command\nFormat is `Fieldname::Content;;Fieldname::Content` where `::` seperates fieldname from content and `;;` seperates fields\n","funding_links":[],"categories":["Softwares"],"sub_categories":["Servers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftywil04%2Fminecraft-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftywil04%2Fminecraft-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftywil04%2Fminecraft-docker/lists"}