{"id":23141624,"url":"https://github.com/zekrotja/spigot-autobuild","last_synced_at":"2025-08-26T15:04:28.370Z","repository":{"id":37825451,"uuid":"197736864","full_name":"zekroTJA/spigot-autobuild","owner":"zekroTJA","description":"Docker image to build the latest version of a specified spigot minecraft version on startup","archived":false,"fork":false,"pushed_at":"2024-08-05T08:05:02.000Z","size":58,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T11:44:05.231Z","etag":null,"topics":["backup","docker","docker-image","hacktoebrfest","minecraf","spigot"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/zekroTJA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-07-19T08:43:38.000Z","updated_at":"2024-10-16T16:41:46.000Z","dependencies_parsed_at":"2024-03-11T22:28:32.106Z","dependency_job_id":"5a255abd-731b-4f9d-b7ad-7f7d2a1f8984","html_url":"https://github.com/zekroTJA/spigot-autobuild","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zekroTJA/spigot-autobuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fspigot-autobuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fspigot-autobuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fspigot-autobuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fspigot-autobuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekroTJA","download_url":"https://codeload.github.com/zekroTJA/spigot-autobuild/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fspigot-autobuild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856561,"owners_count":24657688,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backup","docker","docker-image","hacktoebrfest","minecraf","spigot"],"created_at":"2024-12-17T14:14:03.165Z","updated_at":"2025-08-17T13:31:49.596Z","avatar_url":"https://github.com/zekroTJA.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Spigot Dockerized - [AUTOBUILD VERSION]  🐳 💎\n\n\u003ca href=\"https://hub.docker.com/r/zekro/spigot-autobuild\"\u003e\u003cimg alt=\"Docker Cloud Automated build\" height=\"30\" src=\"https://img.shields.io/docker/cloud/automated/zekro/spigot-autobuild.svg?color=cyan\u0026logo=docker\u0026logoColor=cyan\u0026style=for-the-badge\"\u003e\u003c/a\u003e\u0026nbsp;\n\u003cimg height=\"30\" src=\"https://forthebadge.com/images/badges/built-with-grammas-recipe.svg\" /\u003e\n\n## How Does It Work?\n\nIn contrast to [spigot-dockerized](https://github.com/zekroTJA/spigot-dockerized), where the pre-built spigot binary is already compiled on image built, this image downloads the latest BuildToos from spigot's Jenkins server and build the latest version of spigot directly on startup. Because building the `spigot.jar` can take up to several minutes *(depending on system resources ofc)*, each start of the server may take significantly longer than a normal dry start.\n\n## How To Use\n\nYou can pull the image from [dockerhub](https://hub.docker.com/r/zekro/spigot-autobuild) or [build it yourself](#build-it-yourself).  \nThe `latest` image is also always the master branch and uses the latest LTS JDK version by default.\nChoose the [right version](#version-selection) for your minecraft version.\n```\n$ docker pull zekro/spigot-autobuild:latest\n```\n\nThen, run the image mounting below container directories to your host system for persistent data, bind the ports and set preferences with environment variables: \n\n```\n$ docker run \\\n    -p 25565:25565 -p 25575:25575 \\\n    -v /home/mc/config:/etc/mcserver/config \\\n    -v /home/mc/plugins:/etc/mcserver/plugins \\\n    -v /home/mc/worlds:/etc/mcserver/worlds \\\n    -v /home/mc/locals:/etc/mcserver/locals \\\n    -e MC_VERSION=1.14.3 \\\n    -e BUILD_CACHING=true \\\n    -e XMS=2G \\\n    -e XMX=4G \\\n    -d \\\n    spigot-autobuild:latest\n```\n\nOr, if you are using docker-compose:\n\n```yml\nversion: '3'\n\nservices:\n  #...\n\n# Comment out for automatic backups. See section backup\n#secrets:\n#  minecraftrclone:\n#    file: rclone.conf\n\n  spigot:\n    image: 'zekro/spigot-autobuild:latest'\n    restart: always\n    environment:\n      - 'MC_VERSION=1.14.3'\n      - 'BUILD_CACHING=true'\n      - 'XMS=2G'\n      - 'XMX=4G'\n      - 'NOTICE=Personal note for this minecraft server'\n    ports:\n      - '25565:25565'\n      - '25575:25575'\n    volumes:\n      - './spigot/config:/etc/mcserver/config'\n      - './spigot/plugins:/etc/mcserver/plugins'\n      - './spigot/worlds:/etc/mcserver/worlds'\n      - './spigot/locals:/etc/mcserver/locals'\n#    secrets: # Comment out for automatic backups. See section backup\n#      - source: minecraftrclone\n#        target: rcloneconfig\n```\n\n## Version Selection\n### Docker Hub Tags\nTo build a Minecraft version that requires the JDK-8, the build argument `JDK_VERSION: 8` must be used. This Version is also available as a image on Docker Hub under `spigot-autobuild:jdk8`.\n\nThe version 1.16 is not available, but all other patch versions from the 1.16 are available. So `1.16.1`, `1.16.2`, `1.16.3`...  \nVersion `1.17` (not `1.17.X`) is only executable with Java 16 (no LTS).\n### JDK-8\n- 1.9\n- 1.10\n- 1.11\n- 1.12\n- 1.13\n- 1.14\n- 1.15\n- 1.16(.1)\n\n\n### JDK-11\n- 1.13\n- 1.14\n- 1.15\n- 1.16(.1)\n\n### JDK-16\n- 1.17\n- 1.17.1\n\n### JDK-17\n- 1.17.1\n- 1.18\n- 1.19\n- 1.20\n\n### JDK-21\n- 1.20\n- 1.21\n\n## Build Caching?\n\nDefaultly, `BUILD_CACHING` is enabled which builds the `spigot.jar` on first startup and saves the commit hash of this build in a save file inside the container. Next time you start the container, the saved hash will be compared with the has of the latest available version. Only if they differ, a new build will be started. Else, the previously built `spigot.jar` inside the container will be used.\n\n## Build It Yourself\n\nBuild the image yourself by cloning this repository and build the image with `docker build`:\n\n```\n$ git clone https://github.com/zekroTJA/spigot-autobuild --branch master --depth 1\n$ cd spigot-autobuild\n$ docker build . -t zekro/spigot-autobuild:latest\n```\n\n## RCON CLI\n\nIncluded in the Docker image is an RCON cli which can be used from insde the container to control the server without attaching to the servers stdin.\n\nTo use RCON, you need to set following values in the `server.properties`:\n```cfg\nenable-rcon=true\nrcon.password=7mxQ8Br2QBsFFn2n\nrcon.port=25575\n```\n\nThen, you can use the RCON cli like follwoing:\n\n```\n$ docker exec \u003ccontainer\u003e rcon \u003cserver_command\u003e\n```\n\nAs you can see, you do not need to pass the password or port of the RCON connection. The tool automatically recognizes the location of the `server.properties` file and takes the password and address configuration from there.\n\nAlternatively, when you really want to use the raw cli with no prepared presets, use the following command:\n```\n$ docker exec \u003ccontainer\u003e rconcli -a loalhost:25575 -p \u003crcon_password\u003e \u003cserver_command\u003e\n```\n\nIf you are further interested in the usage and details of the RCON cli, take a look [**here of the Github project**](https://github.com/zekroTJA/rconclient).\n\n## Backup\n\nBackups can be created automatically before a server start.\nFor this, a Docker secret must be stored in /run/secrets/rcloneconfig.  \nrclone is used. The default target is `minecraft:/`  \nRclone offers a number of very [different destinations](https://rclone.org/overview/). In this example, an S3 endpoint with a specific subdirectory is used.\n\nExample config:\n\n```txt\n[contabo]\ntype = s3\nprovider = Other\nenv_auth = false\naccess_key_id = access_key\nsecret_access_key = secret_key\nendpoint = https://eu2.contabostorage.com/\n\n[minecraft]\ntype = alias\nremote = contabo:/minecraft-server\n```\n\nThis configuration must now be loaded into the container as a secret.\nTarget file is ``/run/secrets/rcloneconfig``.\nIf the target file is found, the backup starts each container start.\n\n### Envs for Backup Settings\n\nFor exact details please refer to ``backup.sh``.\n\n- ``BACKUP_FILE_FORMAT``:\nThis can be used to specify the backup timestamp.\nIt uses the date command line tool to interpret the placeholder varibales (``date ${BACKUP_FILE_FORMAT}``).  \n- ``BACKUP_TARGET``: Rclone backup target name\n- ``MAX_AGE_BACKUP_FILES``:\nSpecify the maximum length of time a backup file should be kept. One backup file is always kept.\n- ``POST_START_BACKUP``: Enable backup after server stop\n- ``PRE_START_BACKUP``: Enable pre start backup  \n- ``BACKUP_SUCCESS_SCRIPT``: Will be executed when the backup creation was successful.\n- ``BACKUP_FAILED_SCRIPT``: Will be executed when the backup creation has failed.\n\nAn example for a `BACKUP_FAILED_SCRIPT` could look as following.\n```\ncurl -u \"user:password\" -d \"$MESSAGE\" \"https://ntfy.example.com/minecraft_backups?title=Backup%Failed\"\n```\n\nThe `$MESSAGE` environment variable will contain the stdout and stderr from the backup script.\n\n### Why pre and post backups\n\nThe pre backups are necessary because the post backups are only executed when the Minecraft server shuts down by itself, for example by a ``/stop`` command. A Docker stop or Docker kill does not execute the backup anymore\n\n---\n\n© 2019 Ringo Hoffmann (zekro Development)  \nCorvered by the MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fspigot-autobuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekrotja%2Fspigot-autobuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fspigot-autobuild/lists"}