Compare commits

...

165 Commits

Author SHA1 Message Date
Geoff Bourne
63adc7bc6c docs: added example for All of Fabric 7 (#2575) 2024-01-05 19:00:17 -06:00
Geoff Bourne
6263cf419f docs: clarify the variables page (#2573) 2024-01-02 14:37:54 -06:00
Geoff Bourne
b0605581c3 docs: added ATM9 example (#2571) 2024-01-01 13:51:52 -06:00
Geoff Bourne
2cfd685def docs: fix formatting of sections and admonitions (#2570) 2024-01-01 13:30:45 -06:00
Geoff Bourne
6adda8f1b2 Handle calculated MEMORY value along with Aikar's flags (#2568) 2024-01-01 13:10:24 -06:00
streaminganger
cbd1e8d86d Handle various versions of Magma Maintained (#2563) 2023-12-29 08:57:13 -06:00
Geoff Bourne
7fa522853f neoforge: support 1.20.2+ (#2564) 2023-12-28 21:52:53 -06:00
farafonoff
6b2bd0d035 Fix magma_maintained server download path (#2562) 2023-12-27 09:42:21 -07:00
dependabot[bot]
6ac4586f26 build(deps): bump the updates group with 1 update (#2559) 2023-12-25 10:07:25 -07:00
dependabot[bot]
65a3490f43 build(deps): bump the patches group in /docs with 2 updates (#2560) 2023-12-25 07:20:24 -07:00
Geoff Bourne
422db18b20 neoforge: handle malformed version entry in maven metadata (#2557) 2023-12-23 13:31:57 -07:00
dependabot[bot]
88c24292ec build(deps): bump the patches group in /docs with 1 update (#2551) 2023-12-19 07:38:19 -07:00
Aruneko
3ca66db8b4 Add support for Magma Maintained (#2552) 2023-12-19 07:14:56 -07:00
Ryan Hullah
150881a941 Update release action (#2548) 2023-12-15 08:13:54 -06:00
sheepa
43accdf2f0 Fix FORCE_REDOWNLOAD at start-deployCustom (#2546) 2023-12-15 06:40:05 -06:00
Geoff Bourne
6363949bda Use Forge shim jar as entrypoint for >= 1.20.4 (#2543) 2023-12-13 20:06:53 -06:00
dependabot[bot]
b6b2da9d38 build(deps): bump actions/stale from 8 to 9 (#2538) 2023-12-11 07:28:38 -06:00
Aruneko
c40a47ebba Support ketting hybrid server (#2535) 2023-12-11 07:19:25 -06:00
Ryan Hullah
94f9bc74f0 Cleanup discord release message (#2532) 2023-12-07 10:04:06 -06:00
dependabot[bot]
0f4cb9c429 build(deps): bump the updates group with 1 update (#2525) 2023-12-06 07:34:58 -06:00
Ryan Hullah
66ed0eda1b Add Discord Release Notification (#2531) 2023-12-05 22:07:15 -06:00
Geoff Bourne
ea3a6644a8 Fixed unbound variable error for MODRINTH_EXCLUDE_FILES (#2528) 2023-12-04 23:01:26 -06:00
Geoff Bourne
c0c6e6d78d modrinth: support excluding mods from modpack (#2524) 2023-12-03 14:13:40 -06:00
Geoff Bourne
2507028193 modrinth: report error when no matching modpack version is available (#2520) 2023-12-01 14:21:52 -06:00
Geoff Bourne
2084f1ea12 Move DEBUG_MEMORY output to beginning of init (#2519) 2023-11-30 17:00:09 -06:00
Geoff Bourne
ca2c15ea8e docs: add example for Auto CurseForge manual downloads (#2517) 2023-11-29 10:41:25 -06:00
dependabot[bot]
a5ec64de24 build(deps): bump the patches group in /docs with 2 updates (#2515)
Bumps the patches group in /docs with 2 updates: [mkdocs-material-extensions](https://github.com/facelessuser/mkdocs-material-extensions) and [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material-extensions` from 1.3 to 1.3.1
- [Release notes](https://github.com/facelessuser/mkdocs-material-extensions/releases)
- [Changelog](https://github.com/facelessuser/mkdocs-material-extensions/blob/master/changelog.md)
- [Commits](https://github.com/facelessuser/mkdocs-material-extensions/compare/1.3...1.3.1)

Updates `mkdocs-material` from 9.4.10 to 9.4.14
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.10...9.4.14)

---
updated-dependencies:
- dependency-name: mkdocs-material-extensions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 15:49:26 -06:00
Geoff Bourne
33c75bd2da Fix issue when setting ENABLE_RCON=false (#2513) 2023-11-26 08:34:49 -06:00
Geoff Bourne
2917af8ca4 Provide support for patching TOML files (#2512) 2023-11-25 18:44:45 -06:00
Geoff Bourne
9d7232c8b8 Process rcon password as regular user (#2511) 2023-11-25 18:30:18 -06:00
Geoff Bourne
051436c1df docs: clarify server properties intro (#2507) 2023-11-23 15:23:08 -06:00
Geoff Bourne
9b21661aaf docs: clarify that CurseForge files correspond to versions of that mod/plugin (#2505) 2023-11-22 09:14:20 -06:00
dependabot[bot]
47b903d134 build(deps): bump the patches group in /docs with 2 updates (#2503)
Bumps the patches group in /docs with 2 updates: [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings).


Updates `mkdocs-material` from 9.4.8 to 9.4.10
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.8...9.4.10)

Updates `mkdocstrings` from 0.23.0 to 0.24.0
- [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
- [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mkdocstrings/mkdocstrings/compare/0.23.0...0.24.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
- dependency-name: mkdocstrings
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-22 08:31:25 -06:00
dependabot[bot]
fc4331232c build(deps): bump the updates group with 1 update (#2504) 2023-11-20 09:28:01 -06:00
Geoff Bourne
5dc833c108 For Auto CurseForge etc, increase default connection pool acquire timeout (#2497) 2023-11-17 14:25:23 -06:00
Geoff Bourne
feb6a41c11 Stream file downloads to avoid 2GB limit (#2493) 2023-11-14 12:42:02 -06:00
Geoff Bourne
92947c92dc docs: clarify the resolved value for %VAR% (#2490) 2023-11-13 07:52:53 -06:00
Geoff Bourne
e8ffa0fc0d docs: document JMX_PORT (#2489) 2023-11-12 21:31:42 -06:00
Geoff Bourne
4c0bd61faf docs: clarify placeholder intro (#2488) 2023-11-12 19:38:21 -06:00
Geoff Bourne
85a957fe6f Retain declared version for placeholder usage (#2486) 2023-11-12 16:10:03 -06:00
Geoff Bourne
37a5d50f70 Process placeholders in server properties values (#2484) 2023-11-12 13:21:16 -06:00
Geoff Bourne
eb279d0fa0 Allow pre-escaping unicode in server.properties (#2483) 2023-11-11 19:53:41 -06:00
Geoff Bourne
aba27ad444 Escape unicode in server.properties by default when less than 1.20 (#2480) 2023-11-11 14:05:00 -06:00
Geoff Bourne
f5c332736d Provide option to escape unicode in server.properties 2023-11-10 22:46:25 -06:00
Geoff Bourne
bf621356c1 Gracefully handle corrupt/invalid auto-install manifest files (#2476) 2023-11-10 10:43:31 -06:00
Geoff Bourne
19948065d5 auto-cf: exclude embeddium by default (#2472) 2023-11-07 14:39:00 -06:00
dependabot[bot]
3b7ddcdbbd build(deps): bump the patches group in /docs with 1 update
Bumps the patches group in /docs with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).

- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.7...9.4.8)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 09:00:03 -06:00
Geoff Bourne
8c74fc34cb build: java21 and java21-alpine images (#2464) 2023-11-03 17:33:10 -05:00
dependabot[bot]
89889c556b build(deps): bump mkdocs-static-i18n from 1.1.1 to 1.2.0 in /docs (#2459)
* build(deps): bump mkdocs-static-i18n from 1.1.1 to 1.2.0 in /docs

Bumps [mkdocs-static-i18n](https://github.com/ultrabug/mkdocs-static-i18n) from 1.1.1 to 1.2.0.
- [Changelog](https://github.com/ultrabug/mkdocs-static-i18n/blob/main/docs/changelog.md)
- [Commits](https://github.com/ultrabug/mkdocs-static-i18n/compare/1.1.1...1.2.0)

---
updated-dependencies:
- dependency-name: mkdocs-static-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump other docs dependencies together

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
2023-11-03 16:58:21 -05:00
Geoff Bourne
951a55707d build: upgrade easy-add built with Go 1.20.10 (#2462)
Also
* upgrade mc-monitor to Go 1.20.10
* upgrade restify to use Go 1.20.10
* upgrade rcon-cli to use Go 1.20.10
* upgrade mc-server-runner to use Go 1.20.10
2023-11-03 12:16:15 -05:00
Geoff Bourne
377273e5a3 Fail startup if server properties processing fails (#2460) 2023-11-01 19:08:31 -05:00
Kezzer
78fd5457d4 <doc>(server-properties):
- Add YAML multiline to render `GENERATOR_SETTINGS` code more readable
- Remove JSON code block above as it is now unnecessary
2023-10-27 11:25:29 -05:00
Kezzer
2e07ba431d <doc>(server-properties):
- Update generator_settings documentation in server-properties.md
2023-10-27 11:25:29 -05:00
Geoff Bourne
2dca9220e2 auto-cf: support excluding files from overrides (#2456) 2023-10-26 21:05:53 -05:00
dependabot[bot]
8ee9d6d2eb build(deps): bump the updates group with 1 update (#2452) 2023-10-24 08:42:01 -05:00
Jérémy Levilain
8faf560721 docs: refine deployment chapters and add Shulker section (#2454) 2023-10-23 07:38:59 -05:00
Geoff Bourne
a1d0830a8e docs: link to wiki from difficulty config (#2449) 2023-10-22 20:31:32 -05:00
Geoff Bourne
5642b8db35 auto-cf: for manual downloads, provide file page (#2444) 2023-10-18 21:19:52 -05:00
dependabot[bot]
ee562599f4 build(deps): bump the patches group in /docs with 2 updates (#2439)
Bumps the patches group in /docs with 2 updates: [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [mkdocs-static-i18n](https://github.com/ultrabug/mkdocs-static-i18n).


Updates `mkdocs-material` from 9.4.4 to 9.4.6
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.4...9.4.6)

Updates `mkdocs-static-i18n` from 1.1.0 to 1.1.1
- [Changelog](https://github.com/ultrabug/mkdocs-static-i18n/blob/main/docs/changelog.md)
- [Commits](https://github.com/ultrabug/mkdocs-static-i18n/compare/1.1.0...1.1.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
- dependency-name: mkdocs-static-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 14:00:30 -05:00
Geoff Bourne
1ffcb5c221 docs: clarify multi-line MOTD (#2441) 2023-10-16 13:59:43 -05:00
Geoff Bourne
8cdf4d0072 Ensure server.properties is processed as UTF-8 (#2437) 2023-10-15 23:09:51 -05:00
Geoff Bourne
1545236cc6 misc: Corrected utils import for start-setupRbac (#2436) 2023-10-14 17:25:35 -05:00
Geoff Bourne
2ebcc0fe00 MOTD no longer needs to be pre-normalized (#2434) 2023-10-13 15:54:45 -05:00
Geoff Bourne
e5f818bdf1 Sanitize mod file subpath in Modrinth modpacks (#2429) 2023-10-10 17:44:03 -05:00
dependabot[bot]
df497ce3d8 build(deps): bump mkdocs-static-i18n from 1.0.6 to 1.1.0 in /docs (#2425) 2023-10-10 08:46:13 -05:00
Geoff Bourne
f7ff2779d9 Resolve Modrinth projects for Quilt specifically (#2427) 2023-10-09 18:21:42 -05:00
dependabot[bot]
c9e14864f5 build(deps): bump the patches group in /docs with 1 update (#2424)
Bumps the patches group in /docs with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).

- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.3...9.4.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 18:03:20 -05:00
Geoff Bourne
ec539a5dd2 autopause: allow for DEBUG to be enabled (#2418) 2023-10-07 17:36:05 -05:00
Geoff Bourne
7427bc9043 build: fixing variant listing for java21-graalvm (#2416) 2023-10-07 15:19:01 -05:00
Geoff Bourne
8ab104f6b7 Added image variant for GraalVM Java 21 (#2415) 2023-10-07 14:07:24 -05:00
Geoff Bourne
f15cbb4ca1 Allow for custom server properties (#2414) 2023-10-07 13:26:27 -05:00
Geoff Bourne
fa235e97c5 Added support for NeoForge (#2408) 2023-10-03 18:00:24 -05:00
dependabot[bot]
d5e315bba8 build(deps): bump mkdocs-material from 9.3.1 to 9.4.3 in /docs (#2405) 2023-10-03 08:13:21 -05:00
dependabot[bot]
91ad2974ec build(deps): bump the patches group in /docs with 3 updates (#2399) 2023-10-02 07:37:09 -05:00
Geoff Bourne
59902566f3 docs: added examples page, starting with Geyser (#2404) 2023-10-01 17:42:15 -05:00
Geoff Bourne
411391baa1 Properly resolve latest file URLs from bukkit (#2402) 2023-09-30 12:14:31 -05:00
Misode
cadc48b41a Update Minecraft Wiki links to new domain after fork (#2400) 2023-09-27 21:28:53 -05:00
Geoff Bourne
1396a1ef6c build: update various github actions (#2397)
* build(deps): bump the patches group in /docs with 2 updates

Bumps the patches group in /docs with 2 updates: [mkdocs-literate-nav](https://github.com/oprypin/mkdocs-literate-nav) and [mkdocs-static-i18n](https://github.com/ultrabug/mkdocs-static-i18n).


Updates `mkdocs-literate-nav` from 0.6.0 to 0.6.1
- [Release notes](https://github.com/oprypin/mkdocs-literate-nav/releases)
- [Commits](https://github.com/oprypin/mkdocs-literate-nav/compare/v0.6.0...v0.6.1)

Updates `mkdocs-static-i18n` from 1.0.2 to 1.0.3
- [Changelog](https://github.com/ultrabug/mkdocs-static-i18n/blob/main/docs/changelog.md)
- [Commits](https://github.com/ultrabug/mkdocs-static-i18n/compare/1.0.2...1.0.3)

---
updated-dependencies:
- dependency-name: mkdocs-literate-nav
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
- dependency-name: mkdocs-static-i18n
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patches
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump mkdocs-material from 9.2.7 to 9.3.1 in /docs

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.2.7 to 9.3.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.2.7...9.3.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump docker/setup-qemu-action from 2.2.0 to 3.0.0

Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump docker/build-push-action from 4.2.1 to 5.0.0

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump docker/setup-buildx-action from 2 to 3

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump docker/metadata-action from 4 to 5

Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump docker/login-action from 2 to 3

Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build: update various github actions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-23 18:44:45 -05:00
Zyztem
0cf5195fc5 Fix a typo in the variable portion of the docs (#2385) 2023-09-15 21:00:05 -05:00
dependabot[bot]
17e2f90b91 build(deps): bump docker/build-push-action from 4.1.1 to 4.2.1 (#2380) 2023-09-13 08:08:53 -05:00
Geoff Bourne
a079dd0ff0 docs: remove note about getbukkit being down (#2382) 2023-09-13 07:53:05 -05:00
dependabot[bot]
c4d8972a83 build(deps): bump actions/checkout from 3 to 4 (#2379) 2023-09-11 07:29:29 -05:00
Geoff Bourne
b494124a2d docs: note the apparent death of getbukkit (#2377) 2023-09-09 14:08:51 -05:00
Geoff Bourne
d8ad2e5721 modrinth: provide dependencies download options (#2375) 2023-09-09 08:37:46 -05:00
Noa Himesaka
ec7bd14451 Add Oracle GraalVM to images (#2369) 2023-09-08 07:38:14 -05:00
Geoff Bourne
2097702daa modrinth: support plugin lookups that are compatible with selected loader (#2372) 2023-09-06 21:23:05 -05:00
dependabot[bot]
dc149eaa01 build(deps): bump mkdocstrings from 0.22.0 to 0.23.0 in /docs (#2368) 2023-09-04 09:13:50 -05:00
dependabot[bot]
f14b77db05 build(deps): bump the patches group in /docs with 1 update (#2367) 2023-09-04 09:09:17 -05:00
Geoff Bourne
df53fe3971 Removing chmod g+w at start to tighten security (#2363) 2023-08-29 22:01:34 -05:00
DanielN
bb57d7e99f Disable healthcheck for unsupported versions (#2360) 2023-08-27 09:41:42 -05:00
Geoff Bourne
03034d2f15 docs: clarified path for zip file modpack (#2361) 2023-08-26 13:38:14 -05:00
Geoff Bourne
8fd1495795 Support skipping existing whitelist/ops files and restore as default (#2358) 2023-08-22 21:34:47 -05:00
Geoff Bourne
dba2556e4e Corrected use of VERSION when building Bukkit from source (#2341) 2023-08-20 13:00:06 -05:00
Geoff Bourne
cdec1c0c19 modrinth: allow installer to ignore missing files (#2352) 2023-08-20 09:11:55 -05:00
Geoff Bourne
3aa0dd2db6 modrinth: resolve issue with null versionId in manifest (#2349) 2023-08-18 18:37:19 -05:00
Geoff Bourne
c3829aa435 docs: clarified FORGE_VERSION usage (#2348) 2023-08-18 08:15:32 -05:00
Geoff Bourne
356c1af046 modrinth: ensure requested loader for modpack is optional (#2347) 2023-08-17 17:14:08 -05:00
Geoff Bourne
6bd4de3af5 Fixed copying of OPS_FILE and WHITELIST_FILE (#2346) 2023-08-17 16:12:12 -05:00
Geoff Bourne
4040e971f5 Improve whitelist/ops handling with caching, UUID, and offline support (#2342) 2023-08-16 19:41:22 -05:00
Atlas16A
316b79bf72 Add Ngrok example (#2328) 2023-08-13 17:55:16 -05:00
Geoff Bourne
9eb1fbaf1f modrinth: rename input to MODRINTH_MODPACK (#2334) 2023-08-12 19:56:18 -05:00
Geoff Bourne
1cc0c8a0fc modrinth: resolve "only DEFLATED entries can have EXT" (#2332) 2023-08-12 09:48:18 -05:00
Geoff Bourne
c59414c5c1 packwiz: cache maven metadata (#2329) 2023-08-10 22:06:18 -05:00
Geoff Bourne
008693184e build: skip some of the setuponly tests by default (#2327) 2023-08-08 11:32:41 -05:00
Geoff Bourne
55df8b3d87 Set mc-monitor timeout less than health check timeout (#2326) 2023-08-08 11:02:37 -05:00
Geoff Bourne
5470245b45 docs: clarify stop grace period given announce delay (#2325) 2023-08-07 15:00:03 -05:00
Geoff Bourne
95d15555f4 Added CURSEFORGE_FILES support (#2322) 2023-08-06 15:12:29 -05:00
Geoff Bourne
3ffcbb32dd Corrected REMOVE_OLD_MODS to process file-wise (#2317) 2023-08-03 13:04:26 -05:00
Geoff Bourne
2fbe2bbe68 auto-cf: updated API parsing for NeoForge mod loader type (#2308) 2023-07-30 09:15:14 -05:00
Geoff Bourne
396d202d9f ftb: added FTB_FORCE_REINSTALL (#2305) 2023-07-29 20:09:54 -05:00
Geoff Bourne
cb6b793f37 docs: corrected Java 20 typo (#2301) 2023-07-21 15:02:29 -05:00
Sebastian Janzen
086552fbe5 typo (#2296) 2023-07-17 07:52:24 -05:00
Geoff Bourne
b028e655d2 Include SPIGET_RESOURCES support for hybrid server types (#2292) 2023-07-14 22:21:58 -05:00
Geoff Bourne
374fa9ad5b auto-cf: clarify why some mods need to be manually downloaded (#2288) 2023-07-13 08:06:52 -05:00
Geoff Bourne
7d8f70635c auto-cf: stop startup with info when manual mod downloads are needed (#2286) 2023-07-12 08:45:49 -05:00
Geoff Bourne
4d4d21e2fa Allow blank REPLACE_ENV_VARIABLE_PREFIX when processing in-place files (#2285) 2023-07-11 09:08:48 -05:00
Geoff Bourne
7f7636e85e Added auto-cf excludes for BMC1 Fabric (#2280) 2023-07-08 14:30:29 -05:00
Geoff Bourne
953e3bf8fc docs: added Better MC example (#2279) 2023-07-08 13:35:52 -05:00
Geoff Bourne
8fabf17c21 Allow REPLACE_ENV_VARIABLE_PREFIX to be an empty string (#2278) 2023-07-07 21:13:01 -05:00
Geoff Bourne
fc14b79a29 Use CXF compatible with Java 8 (#2277)
Also
- modrinth modpack support when optional env is absent
2023-07-07 16:58:14 -05:00
Geoff Bourne
3fb36477dd Corrected VERSION resolution with FTBA type (#2274) 2023-07-06 20:05:15 -05:00
Geoff Bourne
3311cf479f misc: add FABRIC to error message with expected types (#2272) 2023-07-06 09:11:12 -05:00
LeaderbotX400
fd8d6bb32a Add iris-flywheel-compat exclude to cf-exclude-include.json (#2271) 2023-07-05 11:36:16 -05:00
Geoff Bourne
7f4cf0fc48 misc: upgrade all Go tools to Go 1.20 (#2270) 2023-07-05 09:34:15 -05:00
Geoff Bourne
d3dd14c87d Remove .mc-health.env when not needed (#2267) 2023-07-03 18:18:52 -05:00
Geoff Bourne
b79014e47f examples: simplified filebrowser example (#2266) 2023-07-02 20:56:40 -05:00
Geoff Bourne
98e939d937 auto_cf: write mods needing manual download to file (#2263) 2023-07-02 09:22:12 -05:00
Geoff Bourne
2611551076 Ensure datapacks cleanup doesn't remove vanillatweaks (#2262) 2023-07-01 19:45:18 -05:00
Darion Spaargaren
4a942dbc02 Allow skipping autopause/autostop using a file (#2261) 2023-06-30 09:50:30 -05:00
Geoff Bourne
ce65bcc840 docs: adjusted wording of CF_MODPACK_ZIP option (#2260) 2023-06-28 19:07:25 -05:00
Max
d276c58d29 Fix typo in auto CurseForge docs (#2259) 2023-06-27 12:24:46 -05:00
Geoff Bourne
495c4440fd Update rcon-cli to remove config file loading message (#2258) 2023-06-26 08:43:26 -05:00
Geoff Bourne
bb472eb8b7 Added CUSTOM_JAR_EXEC (#2253) 2023-06-24 11:38:15 -05:00
Geoff Bourne
0bcd72cb0d build: use raw instead of match for stable tag metadata (#2251) 2023-06-23 14:04:44 -05:00
Geoff Bourne
ae46cd3ad2 build: use match instead of pep440 for stable tag selection (#2250) 2023-06-23 13:19:25 -05:00
Anton Bardov
b89844d5b2 Added support for Magma version tags (#2247) 2023-06-23 12:47:23 -05:00
Geoff Bourne
56d68a6e76 Corrected stable tag build configuration (#2249) 2023-06-23 11:56:27 -05:00
Geoff Bourne
a6c3943136 Provide stable image tag that tracks latest repo tag (#2248) 2023-06-23 11:40:47 -05:00
Geoff Bourne
d0f5227f58 modrinth: reduce API pressure with initial bulk get of projects (#2243) 2023-06-21 22:12:16 -05:00
Geoff Bourne
879d315a02 docs: tighten up wording in auto-pause section (#2241) 2023-06-20 08:14:35 -05:00
Geoff Bourne
c9c6147960 auto_cf: allow explicit inclusions to override default exclusions (#2240)
Also
- removed carry-on from default exclusions
2023-06-19 12:03:37 -05:00
dependabot[bot]
bfa74a73be build(deps): bump docker/build-push-action from 4.1.0 to 4.1.1 (#2238) 2023-06-19 08:20:19 -05:00
Geoff Bourne
b615dbf6c4 Add resolveVersion for TYPE=CURSEFORGE (#2237) 2023-06-18 19:58:29 -05:00
Geoff Bourne
e5fe913a74 Ensure VERSION is resolved from existing Fabric install (#2235)
Also
* Cleaned up some of the deployment docs info
2023-06-18 15:31:39 -05:00
Geoff Bourne
a566f99018 Fix up-to-date handling of MODS/PLUGINS/MODS_FILE (#2234) 2023-06-18 09:44:31 -05:00
Geoff Bourne
87e2f2b177 Switch Quilt and Purpur to image helper (#2229) 2023-06-17 13:00:22 -05:00
rela
55fb21cdd7 docs: add full working example tutorial in misc/deployment/ with link in intro (#2225) 2023-06-16 23:32:30 -05:00
Geoff Bourne
f9a97e3ac4 docs: add docker compose usage to intro (#2223) 2023-06-15 16:29:43 -05:00
Geoff Bourne
d5ce6e8db9 docs: corrected base image use in docs (#2220) 2023-06-14 22:28:22 -05:00
Craig J Smith
6359b5ce42 Update start-deployPaper (#2216) 2023-06-14 07:15:02 -05:00
Floris Brunet
8d53e82b33 Fix server types link. (#2217) 2023-06-14 07:14:43 -05:00
Geoff Bourne
83fa659b4d Use mc-image-helper for Purpur (#2215) 2023-06-13 21:35:09 -05:00
Geoff Bourne
89fb4e7f51 docs: updated development notes to use jwebserver (#2212) 2023-06-13 09:29:50 -05:00
Geoff Bourne
fc7d48e33f Switch to mc-image-helper for installing Paper/Folia (#2211) 2023-06-13 09:24:37 -05:00
Geoff Bourne
24f40c84ee docs: fixed building page formatting and added base image info (#2210) 2023-06-13 07:59:03 -05:00
dependabot[bot]
61bc034589 build(deps): bump docker/build-push-action from 3.3.0 to 4.1.0 (#2203)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.3.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.3.0...v4.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:50:36 -05:00
Geoff Bourne
bd8d7f8baf Sort other server property mappings (#2206)
And removed some redundant ones.
2023-06-12 13:43:34 -05:00
Geoff Bourne
38906e5775 Add ENFORCE_SECURE_PROFILE to docs table (#2205)
[Discussed in Discord](https://discord.com/channels/660567679458869252/660569641550217327/1117883383456993332)
2023-06-12 13:34:36 -05:00
dependabot[bot]
b874b2594b build(deps): bump docker/setup-qemu-action from 2.1.0 to 2.2.0 (#2202) 2023-06-12 07:40:30 -05:00
Geoff Bourne
c8ffbec928 For backward compatibility, allow MODS to list plugins for those server types (#2200) 2023-06-11 11:00:39 -05:00
Geoff Bourne
8a4dbb53e7 Corrected broken links in types and mods (#2199)
Also
- noted error seen when Java 8 is needed
2023-06-10 17:18:37 -05:00
Geoff Bourne
787c6bd08d Fixed example Geyser compose file (#2198) 2023-06-10 13:40:44 -05:00
Geoff Bourne
a5b7f8ac90 Improved handling of MODS and PLUGINS lists (#2197) 2023-06-10 12:51:49 -05:00
Geoff Bourne
3c1a83cc6a Clearer differentiation of mod platforms and types (#2179)
Also, skip version resolution for mod platforms.
2023-06-08 08:52:08 -05:00
Nexus Novaz
821428c8b1 Changed rcon password references from "minecraft" to randomly generated (#2186) 2023-06-06 14:53:01 -05:00
156 changed files with 2404 additions and 1832 deletions

View File

@@ -1,7 +1,24 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
updates:
patterns:
- "*"
update-types:
- patch
- minor
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: weekly
groups:
patches:
patterns:
- "*"
update-types:
- patch
- minor

View File

@@ -1,4 +1,4 @@
name: Test and Build multi-architecture
name: Build and Publish
on:
push:
branches:
@@ -18,10 +18,11 @@ jobs:
matrix:
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
variant:
- java20
- java20-alpine
- java21-graalvm
- java21
- java21-alpine
- java17
- java17-graalvm-ce
- java17-graalvm
- java17-jdk
- java17-openj9
- java17-alpine
@@ -34,13 +35,17 @@ jobs:
- java11-openj9
- java11-jdk
include:
# JAVA 20:
- variant: java20
baseImage: eclipse-temurin:20-jre
# JAVA 21:
- variant: java21-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
platforms: linux/amd64,linux/arm64
mcVersion: 1.20.2
- variant: java21
baseImage: eclipse-temurin:21-jre
platforms: linux/amd64,linux/arm64
mcVersion: 1.19.3
- variant: java20-alpine
baseImage: eclipse-temurin:20-jre-alpine
- variant: java21-alpine
baseImage: eclipse-temurin:21-jre-alpine
platforms: linux/amd64
mcVersion: 1.19.3
# JAVA 17:
@@ -49,8 +54,8 @@ jobs:
baseImage: eclipse-temurin:17-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.18.2
- variant: java17-graalvm-ce
baseImage: ghcr.io/graalvm/graalvm-ce:ol8-java17
- variant: java17-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
platforms: linux/amd64,linux/arm64
mcVersion: 1.18.2
- variant: java17-jdk
@@ -102,17 +107,18 @@ jobs:
env:
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
MAIN_VARIANT: java17
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
# for build-files step
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5.4.0
with:
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
# then the use of ${{ github.repository_owner }} will need to be replaced.
@@ -120,25 +126,31 @@ jobs:
${{ github.repository_owner }}/minecraft-server
ghcr.io/${{ github.repository_owner }}/minecraft-server
tags: |
type=ref,event=tag,enable=${{ matrix.variant == 'java17' }}
# For the "main" variant, it gets the tag as-is, without suffix
type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }}
# and each variant (including main one) gets the tag with the variant suffix, such as 2023.1.1-java17
type=ref,event=tag,suffix=-${{ matrix.variant }}
type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != 'master' }}
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == 'master' }}
# for building test/* branch images
type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != github.event.repository.default_branch }}
# latest repo tag gets a moving 'stable' image tag applied to the main variant
type=raw,value=stable,enable=${{ github.ref_type == 'tag' && matrix.variant == env.MAIN_VARIANT }}
# apply the variant as a moving tag for most recent commit per variant
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }}
# NOTE this identifies which variant will be published as "latest", which isn't
# necessarily the newest version of Java
flavor: |
latest=${{ matrix.variant == 'java17' && github.ref_name == 'master' }}
latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == github.event.repository.default_branch }}
labels: |
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.0.0
- name: Build for test
uses: docker/build-push-action@v3.3.0
uses: docker/build-push-action@v5.1.0
with:
platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }}
@@ -156,20 +168,19 @@ jobs:
env:
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
VARIANT: ${{ matrix.variant }}
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
CF_API_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
run: |
tests/test.sh
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3.0.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3.0.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
registry: ghcr.io
@@ -177,14 +188,14 @@ jobs:
password: ${{ github.token }}
- name: Build and push
uses: docker/build-push-action@v3.3.0
uses: docker/build-push-action@v5.1.0
if: github.actor == github.repository_owner
with:
platforms: ${{ matrix.platforms }}
push: >
${{
github.ref_type == 'tag'
|| github.ref_name == 'master'
|| github.ref_name == github.event.repository.default_branch
|| startsWith(github.ref_name, 'test/')
|| ( github.event_name == 'pull_request'
&& env.HAS_IMAGE_REPO_ACCESS

View File

@@ -1,8 +1,11 @@
name: Discord notifications
on:
release:
types:
- published
workflow_run:
workflows: ["ContinuousIntegration", "Build and Publish", "Build and publish multiarch" ]
workflows: ["Build and Publish"]
types:
- completed
@@ -14,13 +17,26 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: on-publish
if: github.event_name == 'release' && github.event.action == 'published'
uses: SethCohen/github-releases-to-discord@v1.15.0
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
- name: on-success
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: github.event.workflow_run.conclusion == 'success'
uses: Ilshidur/action-discord@master
with:
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏"
args: |
Github repo: ${{ github.repository }}
- Branch: ${{ github.event.workflow_run.head_branch }}
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
- name: on-failure
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
if: github.event.workflow_run.conclusion == 'failure'
uses: Ilshidur/action-discord@master
with:
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥"
args: |
Github repo: ${{ github.repository }}
- Branch: ${{ github.event.workflow_run.head_branch }}
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥

View File

@@ -12,7 +12,7 @@ jobs:
pull-requests: write
steps:
- name: Process Stale Issues
uses: actions/stale@v8
uses: actions/stale@v9
with:
stale-issue-label: status/stale
stale-pr-label: status/stale

View File

@@ -16,14 +16,14 @@ jobs:
fail-fast: false
matrix:
variant:
- java20
- java21
- java17
- java17-alpine
- java8-multiarch
include:
# JAVA 20:
- variant: java20
baseImage: eclipse-temurin:20-jre
# JAVA 21:
- variant: java21
baseImage: eclipse-temurin:21-jre
platforms: linux/amd64,linux/arm64
mcVersion: 1.19.4
# JAVA 17:
@@ -45,16 +45,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
# for build-files step
fetch-depth: 0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.0.0
- name: Confirm multi-arch build
uses: docker/build-push-action@v3.3.0
uses: docker/build-push-action@v5.1.0
with:
platforms: ${{ matrix.platforms }}
# ensure latest base image is used
@@ -64,7 +64,7 @@ jobs:
cache-from: type=gha,scope=${{ matrix.variant }}
- name: Build for test
uses: docker/build-push-action@v3.3.0
uses: docker/build-push-action@v5.1.0
with:
# Only build single platform since loading multi-arch image into daemon fails with
# "docker exporter does not currently support exporting manifest lists"
@@ -83,8 +83,7 @@ jobs:
env:
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
VARIANT: ${{ matrix.variant }}
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
CF_API_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
DEBUG: ${{ runner.debug }}
run: |
tests/test.sh

View File

@@ -22,32 +22,35 @@ COPY --chmod=644 files/sudoers* /etc/sudoers.d
EXPOSE 25565
ARG EASY_ADD_VER=0.7.1
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
ARG APPS_REV=1
ARG GITHUB_BASEURL=https://github.com
ARG EASY_ADD_VERSION=0.8.2
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
RUN chmod +x /usr/bin/easy-add
ARG RESTIFY_VERSION=1.7.1
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=1.2.0 --var app=restify --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG RCON_CLI_VERSION=1.6.4
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=1.6.1 --var app=rcon-cli --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_MONITOR_VERSION=0.12.6
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.11.0 --var app=mc-monitor --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_SERVER_RUNNER_VERSION=1.9.1
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=1.8.3 --var app=mc-server-runner --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.29.1
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
ARG MC_HELPER_VERSION=1.37.6
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
@@ -65,9 +68,7 @@ ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/
COPY --chmod=755 bin/mc-health /health.sh
COPY --chmod=644 files/log4j2.xml /image/log4j2.xml
# By default this file gets retrieved from repo, but bundle in image as potential fallback
COPY --chmod=644 files/cf-exclude-include.json /image/cf-exclude-include.json
COPY --chmod=644 files/* /image/
COPY --chmod=755 files/auto /auto
RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPatcher/releases/download/v1.0.1/Log4jPatcher-1.0.1.jar

View File

@@ -2,7 +2,7 @@
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/)
[![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues)
[![Discord](https://img.shields.io/discord/660567679458869252?label=Discord&logo=discord)](https://discord.gg/DXfKpjB)
[![Build and Publish](https://github.com/itzg/docker-minecraft-server/workflows/Build%20and%20Publish/badge.svg)](https://github.com/itzg/docker-minecraft-server/actions)
[![Build and Publish](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml/badge.svg)](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml)
[![](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-orange.svg)](https://www.buymeacoffee.com/itzg)
[![Documentation Status](https://readthedocs.org/projects/docker-minecraft-server/badge/?version=latest)](https://docker-minecraft-server.readthedocs.io/en/latest/?badge=latest)
@@ -511,8 +511,10 @@ Extra variables:
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
-e TYPE=MAGMA
-e MAGMA_VERSION=9f3a3c25
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
> To switch the MAGMA version, you need to take the name of the desired tag from the magmafoundation git repository, [for example, to version 1.18](https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/tags).
### Running a Mohist server
@@ -583,7 +585,7 @@ Configuration options with defaults:
NAME}"
> NOTE: instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.fandom.com/wiki/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
> NOTE: instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
### Running a Crucible server
@@ -599,7 +601,7 @@ Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:
- The project "slug", which is located in the URL shown here:
@@ -617,7 +619,7 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
![](docs/img/modrinth-version-id.drawio.png)
@@ -893,66 +895,6 @@ You may also download or copy over individual mods using the `MODS` environment
docker run -d -e MODS=https://www.example.com/mods/mod1.jar,/plugins/common,/plugins/special/mod2.jar ...
### ForgeAPI usage to use non-version specific projects
**NOTE:** This potentially could lead to unexpected behavior if the Mod receives an update with unexpected behavior.
This is more complicated because you will be pulling/using the latest mod for the release of your game. To get started make sure you have a [CursedForge API Key](https://docs.curseforge.com/#getting-started). Then use the environmental parameters in your docker build.
Please be aware of the following when using these options for your mods:
* Mod Release types: Release, Beta, and Alpha.
* Mod dependencies: Required and Optional
* Mod family: Fabric, Forge, and Bukkit.
Parameters to use the ForgeAPI:
* `MODS_FORGEAPI_KEY` - Required
* `MODS_FORGEAPI_FILE` - Required or use MODS_FORGEAPI_PROJECTIDS (Overrides MODS_FORGEAPI_PROJECTIDS)
* `MODS_FORGEAPI_PROJECTIDS` - Required or use MODS_FORGEAPI_FILE
* `MODS_FORGEAPI_RELEASES` - Default is release, Options: [Release|Beta|Alpha]
* `MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES` - Default is False, attempts to download required mods (releaseType Release) defined in Forge.
* `MODS_FORGEAPI_IGNORE_GAMETYPE` - Default is False, Allows for filtering mods on family type: FORGE, FABRIC, and BUKKIT. (Does not filter for Vanilla or custom)
* `REMOVE_OLD_FORGEAPI_MODS` - Default is False
* `REMOVE_OLD_DATAPACKS_DEPTH` - Default is 1
* `REMOVE_OLD_DATAPACKS_INCLUDE` - Default is *.jar
Example of expected forge api project ids, releases, and key:
```yaml
MODS_FORGEAPI_PROJECTIDS: 306612,256717
MODS_FORGEAPI_RELEASES: Release
MODS_FORGEAPI_KEY: $WRX...
```
Example of expected ForgeAPI file format.
**Field Description**:
* `name` is currently unused, but can be used to document each entry.
* `projectId` id is the id found on the CurseForge website for a particular mod
* `releaseType` Type corresponds to forge's R, B, A icon for each file. Default Release, options are (release|beta|alpha).
* `fileName` is used for version pinning if latest file will not work for you.
```json
[
{
"name": "fabric api",
"projectId": "306612",
"releaseType": "release"
},
{
"name": "fabric voice mod",
"projectId": "416089",
"releaseType": "beta"
},
{
"name": "Biomes o plenty",
"projectId": "220318",
"fileName": "BiomesOPlenty-1.18.1-15.0.0.100-universal.jar",
"releaseType": "release"
}
]
```
### Generic pack files
To install all the server content (jars, mods, plugins, configs, etc.) from a zip or tgz file, then set `GENERIC_PACK` to the container path or URL of the archive file. This can also be used to apply a CurseForge modpack that is missing a server start script and/or Forge installer.
@@ -991,7 +933,7 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
```
> Blank lines and lines that start with a `#` will be ignored
> [This compose file](examples/docker-compose-mods-file.yml) shows another example of using this feature.
> [This compose file](examples/mods-file/docker-compose.yml) shows another example of using this feature.
> It is recommended to combine this option with `REMOVE_OLD_MODS=TRUE` to ensure the mods/plugins remain consistent with the file's listing.
@@ -1148,7 +1090,7 @@ If you leave it off, a default is computed from the server type and version, suc
That way you can easily differentiate between several servers you may have started.
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.fandom.com/wiki/Formatting_codes) to be used consistently with all server versions. For example,
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.wiki/w/Formatting_codes) to be used consistently with all server versions. For example,
-e MOTD="A §l§cMinecraft§r §nserver"
@@ -1180,7 +1122,7 @@ To whitelist players for your Minecraft server, you can:
- Provide the url or path to a whitelist file via `WHITELIST_FILE` environment variable
`docker run -d -e WHITELIST_FILE=/extra/whitelist.json ...`
When either is set, [whitelisting of connecting users](https://minecraft.fandom.com/wiki/Server.properties#white-list) is enabled . If managing the list manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/Server.properties#white-list) is enabled . If managing the list manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
If whitelist configuration already exists, `WHITELIST_FILE` will not be retrieved and any usernames in `WHITELIST` are **added** to the whitelist configuration. You can enforce regeneration of the whitelist on each server startup by setting `OVERRIDE_WHITELIST` to "true". This will delete the whitelist file before processing whitelist configuration.
@@ -1190,7 +1132,7 @@ If whitelist configuration already exists, `WHITELIST_FILE` will not be retrieve
> If running Minecraft 1.7.5 or earlier, these variables will apply to `white-list.txt`, with 1.7.6 implementing support for `whitelist.json`. Make sure your `WHITELIST_FILE` is in the appropriate format.
To [enforce the whitelist changes immediately](https://minecraft.fandom.com/wiki/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true".
To [enforce the whitelist changes immediately](https://minecraft.wiki/w/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true".
### Op/Administrator Players
@@ -1361,7 +1303,7 @@ If using a negative value for the seed, make sure to quote the value such as:
By default, Minecraft servers are configured to run in Survival mode. You can
change the mode using `MODE` where you can either provide the [standard
numerical values](http://minecraft.gamepedia.com/Game_mode#Game_modes) or the
numerical values](http://minecraft.wiki/Game_mode#Game_modes) or the
shortcut values:
- creative
@@ -1383,9 +1325,9 @@ environment variable set to `false`, such as
### Level Type and Generator Settings
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.fandom.com/wiki/Server.properties#level-type).
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.wiki/w/Server.properties#level-type).
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation [as described here](https://minecraft.fandom.com/wiki/Server.properties#generator-settings).
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation [as described here](https://minecraft.wiki/w/Server.properties#generator-settings).
### Custom Server Resource Pack

View File

@@ -1,10 +1,10 @@
#!/bin/bash
if [[ $(uname -m) == "aarch64" ]]; then
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64
chmod +x /bin/gosu
elif [[ $(uname -m) == "x86_64" ]]; then
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64
chmod +x /bin/gosu
else
echo "Not supported!"

View File

@@ -36,7 +36,9 @@ dnf install -y ImageMagick \
zstd \
lbzip2 \
libpcap \
libwebp
libwebp \
findutils \
which
bash /build/ol/install-gosu.sh

View File

@@ -17,7 +17,7 @@ When the environment variable `REPLACE_ENV_IN_PLACE` is set to `true` (the defau
Variables that you want to replace need to be declared inside curly brackets and prefixed with a dollar sign, such as `${CFG_YOUR_VARIABLE}`, which is same as many scripting languages.
You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be subsituted, but not `${DB_HOST}`.
You can also change `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_", to limit which environment variables are allowed to be used. For example, with "CFG_" as the prefix, the variable `${CFG_DB_HOST}` would be substituted, but not `${DB_HOST}`. The prefix can be set to an empty string to allow for matching any variable name.
If you want to use a file's content for value, such as when using secrets mounted as files, declare the placeholder named like normal in the file and declare an environment variable named the same but with the suffix `_FILE`.
@@ -101,11 +101,11 @@ secrets:
## Patching existing files
JSON path based patches can be applied to one or more existing files by setting the variable `PATCH_DEFINITIONS` to the path of a directory that contains one or more [patch definition json files](https://github.com/itzg/mc-image-helper#patchdefinition) or a [patch set json file](https://github.com/itzg/mc-image-helper#patchset).
JSON path based patches can be applied to one or more existing files by setting the variable `PATCH_DEFINITIONS` to the path of a directory that contains one or more [patch definition json files](https://github.com/itzg/mc-image-helper#patchdefinition) or a [patch set json file](https://github.com/itzg/mc-image-helper#patchset).
Variable placeholders in the patch values can be restricted by setting `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_".
The `file` and `value` fields of the patch definitions may contain `${...}` variable placeholders. The allowed environment variables in placeholders can be restricted by setting `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_".
The following example shows a patch-set file were various fields in the `paper.yaml` configuration file can be modified and added:
The following example shows a patch-set file where various fields in the `paper.yaml` configuration file can be modified and added:
```json
{
@@ -139,4 +139,8 @@ The following example shows a patch-set file were various fields in the `paper.y
}
```
> **NOTES:** Only JSON and Yaml files can be patched at this time. TOML support is planned to be added next. Removal of comments and other cosmetic changes will occur when patched files are processed.
Supports the file formats:
- JSON
- JSON5
- Yaml
- TOML, but processed output is not pretty

View File

@@ -62,15 +62,36 @@ you can use
## Enable Remote JMX for Profiling
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true`, set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
```
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
```
!!! example
With `docker run`
```
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
```
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
!!! example
With a compose file:
```yaml
environment:
ENABLE_JMX: true
JMX_HOST: ${HOSTNAME}
JMX_PORT: "7092"
ports:
- "7092:7092"
```
## Enable Aikar's Flags
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
The set of flags documented there can be added using
-e USE_AIKAR_FLAGS=true

View File

@@ -61,7 +61,11 @@ If you would like to `docker attach` to the Minecraft server console with color
To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server.
> **NOTE** be sure to adjust Docker's shutdown timeout accordingly, such as using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/).
!!! warning "Increase stop grace period"
The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
## OpenJ9 Specific Options

View File

@@ -1,32 +1,74 @@
By default, the server configuration will be created and set based on the following environment variables, but only the first time the server is started. If the `server.properties` file already exists, the values in them will not be changed.
In order to unify management of the Minecraft server container, all of the [`server.properties`](https://minecraft.wiki/w/Server.properties) entries can be managed by the environment variables described in the sections below. Some of the mappings provide additional functionality above and beyond the properties file.
If you prefer to manually manage the `server.properties` file, set `OVERRIDE_SERVER_PROPERTIES` to "false". Similarly, you can entirely skip the startup script's creation of `server.properties` by setting `SKIP_SERVER_PROPERTIES` to "true".
> NOTE: to clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. A variables that maps to a server property that is unset, is ignored and the existing `server.property` is left unchanged.
!!! note
To clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. An unset variable is ignored and the existing `server.property` is left unchanged.
## Placeholders
When declaring a server properties via container environment variables, those values may contain placeholders that are processed when the `server.properties` file is updated.
The syntax of placeholders is DOS-style, `%VAR%`, to avoid being processed by Docker or the shell and the following options are available:
`%VAR%` or `%env:VAR%`
: Replaced with the resolved value or the environment variable `VAR`
`%date:FMT%`
: Formats the current date/time with the given `FMT` string processed by [Java's DateTimeFormatter](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html).
Any declared or resolved environment variable may be referenced, such as `VERSION` and `TYPE`. Additionally, [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md) and [Auto CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md) modpacks will expose the environment variables `MODPACK_NAME` and `MODPACK_VERSION`. The originally declared version, such as "LATEST" or "SNAPSHOT", is available in the variable `DECLARED_VERSION`
!!! example
As a compose file environment entry:
```yaml
MOTD: Running %MODPACK_NAME% version %env:MODPACK_VERSION%
LEVEL: world-%date:yyyy-MM-dd%
```
!!! warning
Placeholders are not supported when manually managing `server.properties`
## Properties
### Message of the Day
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
-e MOTD="My Server"
If you leave it off, a default is computed from the server type and version, such as
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable or a default is computed from the server type and version, such as
A Paper Minecraft Server powered by Docker
That way you can easily differentiate between several servers you may have started.
That way you can easily differentiate between several server types you may have started.
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.fandom.com/wiki/Formatting_codes) to be used consistently with all server versions. For example,
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.wiki/w/Formatting_codes) to be used consistently with all server versions. For Minecraft versions less than 1.20, unicode characters in `server.properties` will be escaped as `\uXXXX`, by default. That behavior can be altered by setting `SERVER_PROPERTIES_ESCAPE_UNICODE` to "true" or "false".
-e MOTD="A §l§cMinecraft§r §nserver"
!!! example
renders
With `docker run`
-e MOTD="A §l§cMinecraft§r §nserver"
or within a compose file
environment:
MOTD: "A §l§cMinecraft§r §nserver"
![](../img/motd-example.png)
renders
![](../img/motd-example.png)
To produce a multi-line MOTD, you will need to double escape the newline such as
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as
-e MOTD="Line one\\nLine two"
-e MOTD="Line one\nLine two"
!!! tip
You can also embed configured and resolved environment variables using [placeholders](#placeholders).
### Difficulty
@@ -40,49 +82,87 @@ Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an
error message will be output in the logs if it's not one of these
values.
Refer to [the Minecraft wiki](https://minecraft.wiki/w/Difficulty)
### Whitelist Players
!!! note
!!! warning "For public servers"
It is very important to set this with servers exposed to the internet where you want only limited players to join.
It is very important to consider setting a whitelist of expected players.
To whitelist players for your Minecraft server, you can:
- Provide a list of usernames and/or UUIDs separated by commas via the `WHITELIST` environment variable
`docker run -d -e WHITELIST=user1,uuid2 ...`
- Provide the url or path to a whitelist file via `WHITELIST_FILE` environment variable
`docker run -d -e WHITELIST_FILE=/extra/whitelist.json ...`
- Provide a list of usernames and/or UUIDs separated by commas or newlines via the `WHITELIST` environment variable
- Provide the URL or container path to a whitelist file via `WHITELIST_FILE` that will be retrieved/copied into the standard location
When either is set, [whitelisting of connecting users](https://minecraft.fandom.com/wiki/Server.properties#white-list) is enabled . If managing the list manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
!!! example
If whitelist configuration already exists, `WHITELIST_FILE` will not be retrieved and any usernames in `WHITELIST` are **added** to the whitelist configuration. You can enforce regeneration of the whitelist on each server startup by setting `OVERRIDE_WHITELIST` to "true". This will delete the whitelist file before processing whitelist configuration.
In a compose file, a text block can be used to improve maintainability, such as
!!! note
```yaml
WHITELIST: |
user1
user2
user3
```
You can provide both `WHITELIST_FILE` and `WHITELIST`, which are processed in that order.
When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/Server.properties#white-list) is enabled.
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options:
`SKIP` (default)
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
`SYNCHRONIZE`
: Synchronize the list of users in the file with the `WHITELIST` or `WHITELIST_FILE` provided. When using both, `WHITELIST` will take precedence. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "true".
`MERGE`
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
`SYNC_FILE_MERGE_LIST`
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
!!! note
UUIDs passed via `WHITELIST` need to be the dashed variant, otherwise it not be recognised and instead added as a username.
If running Minecraft 1.7.5 or earlier, these variables will apply to `white-list.txt`, with 1.7.6 implementing support for `whitelist.json`. Make sure your `WHITELIST_FILE` is in the appropriate format.
To [enforce the whitelist changes immediately](https://minecraft.fandom.com/wiki/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true".
For versions prior to 1.7.3, `white-list.txt` will be maintained instead. Only usernames are supported for those versions.
To [enforce the whitelist changes immediately](https://minecraft.wiki/w/Server.properties#enforce-whitelist) when whitelist commands are used , set `ENFORCE_WHITELIST` to "true". If managing the whitelist file manually, `ENABLE_WHITELIST` can be set to "true" to set the `white-list` property.
### Op/Administrator Players
Similar to the whitelist, to add users as operators (aka adminstrators) to your Minecraft server, you can:
Similar to the whitelist, users can be provisioned as operators (aka administrators) to your Minecraft server by
- Provide te url or path to an ops file via `OPS_FILE` environment variable
`docker run -d -e OPS_FILE=https://config.example.com/extra/ops.json ...`
- Provide a list of usernames and/or UUIDs separated by commas via the `OPS` environment variable
`docker run -d -e OPS=user1,uuid2 ...`
- Providing a list of usernames and/or UUIDs separated by commas or newlines via the `OPS` environment variable
- Providing the URL or container path to an ops file via `OPS_FILE` that will be retrieved/copied into the standard location
If ops configuration already exists, `OPS_FILE` will not be retrieved and any usernames in `OPS` are **added** to the ops configuration. You can enforce regeneration of the ops configuration on each server startup by setting `OVERRIDE_OPS` to "true". This will delete the ops file before processing ops configuration.
!!! example
!!! note
In a compose file, a text block can be used to improve maintainability, such as
Similar to whitelists, you can provide both `OPS_FILE` and `OPS`, and Minecraft 1.7.5 or earlier will use `ops.txt` rather than `ops.json`.
```yaml
OPS: |
user1
user2
user3
```
To change the behavior when the ops file already exists, set the variable `EXISTING_OPS_FILE` to one of the following options:
`SKIP` (default)
: Skip processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
`SYNCHRONIZE`
: Synchronize the list of users in the file with the `OPS` or `OPS_FILE` provided. When using both, `OPS` will take precedence. The `level` and `bypassesPlayerLimit` will be retained from previous entries. This is the same as setting the legacy variable `OVERRIDE_OPS` to "true".
`MERGE`
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
`SYNC_FILE_MERGE_LIST`
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
!!! note
For versions prior to 1.7.3, `ops.txt` will be maintained instead. Only usernames are supported for those versions.
### Enable/disable initial selection of datapacks
@@ -107,7 +187,7 @@ The server icon which has been set doesn't get overridden by default. It can be
RCON is **enabled by default** to allow for graceful shut down the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
The default password is "minecraft" but **change the password before deploying into production** by setting `RCON_PASSWORD`.
The default password is randomly generated if `RCON_PASSWORD` has not been set.
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
@@ -243,7 +323,7 @@ If using a negative value for the seed, make sure to quote the value such as:
By default, Minecraft servers are configured to run in Survival mode. You can
change the mode using `MODE` where you can either provide the [standard
numerical values](http://minecraft.gamepedia.com/Game_mode#Game_modes) or the
numerical values](http://minecraft.wiki/Game_mode#Game_modes) or the
shortcut values:
- creative
@@ -265,9 +345,45 @@ environment variable set to `false`, such as
### Level Type and Generator Settings
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.fandom.com/wiki/Server.properties#level-type).
be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.wiki/w/Server.properties#level-type).
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation [as described here](https://minecraft.fandom.com/wiki/Server.properties#generator-settings).
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation.
To configure the `GENERATOR_SEETINGS` you need to add the appropriate `GeneratorOptions` JSON configuration. In the case of a superflat world, you may omit the `flat_world_options`.
The layers are applied from -64 and up and are added in the order of the list
Example for a superflat world:
- 1x bedrock
- 2x stone
- 15x sandstone
- Desert biome
```yaml
LEVEL_TYPE: FLAT
GENERATOR_SETTINGS: >-4
{
"layers": [
{
"block": "minecraft:bedrock",
"height": 1
},
{
"block": "minecraft:stone",
"height": 2
},
{
"block": "minecraft:sandstone",
"height": 15
}
],
"biome": "minecraft:desert"
}
```
For more details, check the [official wiki](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format).
### Custom Server Resource Pack
@@ -317,22 +433,39 @@ If you must, the server port can be set like:
**however**, be sure to change your port mapping accordingly and be prepared for some features to break.
### Custom server properties
Some mods/plugins utilize custom `server.properties` entries which can be declared via the `CUSTOM_SERVER_PROPERTIES` environment variable. The contents must be newline delimited `name=value` pairs.
Within a compose file, newline delimited entries can be declared as shown here:
```yaml
CUSTOM_SERVER_PROPERTIES: |
custom1=value1
defaultworldgenerator-port=f8c04631-f744-11ec-b260-f02f74b094e0
```
When using `docker run` from a bash shell, the entries must be quoted with the `$'` syntax, such as
```
-e CUSTOM_SERVER_PROPERTIES=$'k1=v1\nk2=v2'
```
### Other server property mappings
| Environment Variable | Server Property |
| --------------------------------- | --------------------------------- |
| PLAYER_IDLE_TIMEOUT | player-idle-timeout |
|-----------------------------------|-----------------------------------|
| BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops |
| BROADCAST_RCON_TO_OPS | broadcast-rcon-to-ops |
| ENABLE_JMX | enable-jmx-monitoring |
| SYNC_CHUNK_WRITES | sync-chunk-writes |
| ENABLE_STATUS | enable-status |
| ENFORCE_SECURE_PROFILE | enforce-secure-profile |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | entity-broadcast-range-percentage |
| FUNCTION_PERMISSION_LEVEL | function-permission-level |
| NETWORK_COMPRESSION_THRESHOLD | network-compression-threshold |
| OP_PERMISSION_LEVEL | op-permission-level |
| PLAYER_IDLE_TIMEOUT | player-idle-timeout |
| PREVENT_PROXY_CONNECTIONS | prevent-proxy-connections |
| USE_NATIVE_TRANSPORT | use-native-transport |
| ENFORCE_WHITELIST | enforce-whitelist |
| ENABLE_WHITELIST | white-list and whitelist |
| SIMULATION_DISTANCE | simulation-distance |
| SYNC_CHUNK_WRITES | sync-chunk-writes |
| USE_NATIVE_TRANSPORT | use-native-transport |

View File

@@ -1,6 +1,5 @@
---
title: Intro
---
# Intro
[![Docker Pulls](https://img.shields.io/docker/pulls/itzg/minecraft-server.svg)](https://hub.docker.com/r/itzg/minecraft-server/)
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/)
[![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues)
@@ -30,4 +29,38 @@ where, in this case, the standard server port 25565, will be exposed on your hos
**DO NOT** port forward RCON on 25575 without first setting `RCON_PASSWORD` to a secure value. It is highly recommended to only use RCON within the container, such as with `rcon-cli`.
By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](versions/java.md) and the [`TYPE`](server-types/bukkit-spigot.md) can be configured to create many variations of desired Minecraft server.
By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](versions/java.md) and the [`TYPE`](types-and-platforms/index.md) can be configured to create many variations of desired Minecraft server.
## Using [Docker Compose](https://docs.docker.com/compose/)
1. Create a new directory
2. Put the contents of the file below in a file called `docker-compose.yml`
3. Run `docker compose up -d` in that directory
4. Done! Point your client at your host's name/IP address and port 25565.
```yaml
version: "3.8"
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data
```
To apply changes made to the compose file, just run `docker compose up -d` again.
Follow the logs of the container using `docker compose logs -f`, check on the status with `docker compose ps`, and stop the container using `docker compose stop`.
!!! note "More Compose Examples"
There are more [examples located in the Github repo](https://github.com/itzg/docker-minecraft-server/tree/master/examples).
!!! note "Deployment Examples"
The [deployments page](misc/deployment/index.md) provides more examples of deployment with and beyond Docker Compose.

View File

@@ -1,41 +1,31 @@
# AutoPause
# Auto-Pause
### Description
An auto-pause functionality is provided that monitors whether clients are connected to the server. If a client is not connected for a specified time, the Java process is put into a pause state. When a client attempts to connect while the process is paused, then process will be restored to a running state. The experience for the client does not change. This feature can be enabled by setting the environment variable `ENABLE_AUTOPAUSE` to "true".
There are various bug reports on [Mojang](https://bugs.mojang.com) about high CPU usage of servers with newer versions, even with few or no clients connected (e.g. [this one](https://bugs.mojang.com/browse/MC-149018), in fact the functionality is based on [this comment in the thread](https://bugs.mojang.com/browse/MC-149018?focusedCommentId=593606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-593606)).
!!! important
An autopause functionality has been added to this image to monitor whether clients are connected to the server. If for a specified time no client is connected, the Java process is stopped. When knocking on the server port (e.g. by the ingame Multiplayer server overview), the process is resumed. The experience for the client does not change.
Of course, even loaded chunks are not ticked when the process is stopped.
**You must greatly increase or disable max-tick-time watchdog functionality.** From the server's point of view, the pausing causes a single tick to take as long as the process is stopped, so the server watchdog might intervene after the process is continued, possibly forcing a container restart. To prevent this, ensure that the `max-tick-time` in the `server.properties` file is set to a very large value or -1 to disable it entirely, which is highly recommended. That can be set with `MAX_TICK_TIME` as described in [the section below](../../configuration/server-properties.md#max-tick-time).
!!! note
**You must greatly increase or disable max-tick-time watchdog functionality.** From the server's point of view, the pausing causes a single tick to take as long as the process is stopped, so the server watchdog might intervene after the process is continued, possibly forcing a container restart. To prevent this, ensure that the `max-tick-time` in the `server.properties` file is set to a very large value or -1 to disable it entirely, which is highly recommended. That can be set with `MAX_TICK_TIME` as described in [the section below](../../configuration/server-properties.md#max-tick-time).
Non-vanilla versions might have their own configuration file, you might have to disable their watchdogs separately. For PaperMC servers, you need to send the JVM flag `-Ddisable.watchdog=true`, this can be done with the docker env variable `-e JVM_DD_OPTS=disable.watchdog:true`
On startup the `server.properties` file is checked and, if applicable, a warning is printed to the terminal. When the server is created (no data available in the persistent directory), the properties file is created with the Watchdog disabled.
On startup the `server.properties` file is checked and, if applicable, a warning is printed to the terminal. When the server is created (no data available in the persistent directory), the properties file is created with the Watchdog disabled.
The utility used to wake the server (`knock(d)`) works at network interface level. So the correct interface has to be set using the `AUTOPAUSE_KNOCK_INTERFACE` variable when using non-default networking environments (e.g. host-networking, Portainer oder NAS solutions). See the description of the variable below.
A file called `.paused` is created in `/data` directory when the server is paused and removed when the server is resumed. Other services may check for this file's existence before waking the server.
A `.skip-pause` file can be created in the `/data` directory to make the server skip autopausing, for as long as the file is present. The autopause timer will also be reset.
A starting, example compose file has been provided in [examples/docker-compose-autopause.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autopause.yml).
### Enabling Autopause
Enable the Autopause functionality by setting:
```
-e ENABLE_AUTOPAUSE=TRUE
```
Autopause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
!!! note
When configuring kubernetes readiness/liveness health checks with auto-pause enabled, be sure to reference the `mc-health` wrapper script rather than `mc-status` directly.
## Additional configuration
The following environment variables define the behaviour of auto-pausing:
- `AUTOPAUSE_TIMEOUT_EST`, default `3600` (seconds)
@@ -53,7 +43,7 @@ The following environment variables define the behaviour of auto-pausing:
To troubleshoot, add `DEBUG_AUTOPAUSE=true` to see additional output
### Rootless Autopause
## Rootless Auto-Pause
If you're running the container as rootless, you might need to set change the default port forwarder from RootlessKit to slirp4netns.

View File

@@ -1,4 +1,4 @@
# AutoStop
# Auto-Stop
An option to stop the server after a specified time has been added for niche applications (e.g. billing saving on AWS Fargate). The function is incompatible with the Autopause functionality, as they basically cancel out each other.
@@ -6,6 +6,8 @@ An option to stop the server after a specified time has been added for niche app
the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
A `.skip-stop` file can be created in the `/data` directory to make the server skip autostopping, for as long as the file is present. The autostop timer will also be reset.
A starting, example compose file has been provided in [examples/docker-compose-autostop.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autostop.yml).
Enable the Autostop functionality by setting:

View File

@@ -1,11 +1,28 @@
Ensure buildx/BuildKit support is enabled and run:
```shell script
docker buildx build --platform=linux/arm64 --platform=linux/arm/v7 --platform=linux/amd64 --tag itzg/minecraft-server:multiarch --push .
## Building image locally with alternate Java base
The following shows how to change the base Java image used by the build:
```shell
docker build --build-arg BASE_IMAGE=ghcr.io/graalvm/graalvm-ce:ol8-java11 -t IMG_PREFIX/minecraft-server:java11-graalvm .
```
To build for local testing, use:
## Building a multi-architecture image
```shell script
docker buildx build --platform=linux/amd64 --tag mc-multiarch --load .
Ensure buildx/BuildKit support is enabled and run the following to build multi-architecture and push to the repository as named by the image:
```shell
docker buildx build --platform=linux/arm64 --platform=linux/arm/v7 --platform=linux/amd64 --tag IMG_PREFIX/minecraft-server --push .
```
To build for local images, multi-architecture is not supported, use the following with buildx to load the image into the local daemon:
```shell
docker buildx build --tag IMG_PREFIX/minecraft-server --load .
```
or just a plain build
```shell
docker build -t IMG_PREFIX/minecraft-server .
```

View File

@@ -17,7 +17,6 @@ First, build a baseline of the image to include the packages needed by existing
PowerShell: (Example of building and testing ForgeAPI)
```powershell
$env:MODS_FORGEAPI_KEY='$2a$...'
$env:FOLDER_TO_TEST="forgeapimods_projectids"
$env:IMAGE_TO_TEST="mc-dev"
docker build -t $env:IMAGE_TO_TEST .
@@ -36,7 +35,6 @@ docker build --build-arg BASE_IMAGE=$env:BASE_IMAGE -t $env:IMAGE_TO_TEST .
Bash: (Example of building and testing ForgeAPI)
```bash
export MODS_FORGEAPI_KEY='$2a$...'
export FOLDER_TO_TEST="forgeapimods_file"
export IMAGE_TO_TEST="mc-dev"
docker build -t $IMAGE_TO_TEST .
@@ -48,47 +46,59 @@ popd
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
```shell script
```shell
docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
```
From within the container you can run individual scripts via the attached `/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
```shell script
export VANILLA_VERSION=1.12.2
```shell
export VERSION=1.12.2
/scripts/start-magma
```
...or pre-pending script execution:
```shell script
VANILLA_VERSION=1.12.2 /scripts/start-magma
```shell
VERSION=1.12.2 /scripts/start-magma
```
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
!!! note
## Using development copy of mc-image-helper
You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
In the cloned copy of [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
## Using development copy of tools
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
```shell
./gradlew distTar
```
Assuming [http-server](https://www.npmjs.com/package/http-server) is installed globally, start a static web server using:
!!! note
The distribution's version will be `0.0.0-<branch>-SNAPSHOT`
For Go base tools, run
```shell
http-server ./build/distributions -p 8080
goreleaser release --snapshot --clean
```
Note the port that was selected by http-server and pass the build arguments, such as:
Clone [itzg/github-releases-proxy](https://github.com/itzg/github-releases-proxy) and run it according to the instructions shown there.
In the Docker build, configure the following
```shell
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT \
--build-arg MC_HELPER_BASE_URL=http://host.docker.internal:8080
--build-arg GITHUB_BASEURL=http://host.docker.internal:8080 \
--build-arg APPS_REV=1
```
Now the image can be built like normal, and it will install mc-image-helper from the locally built copy.
and declare one or more version overrides, such as
```
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT
```
## Generating release notes

View File

@@ -1 +0,0 @@
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Minecraft Server Deployment (CloudFormation) repository](https://github.com/vatertime/minecraft-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.

View File

@@ -1,26 +0,0 @@
Rather than type the server options below, the port mappings above, etc
every time you want to create new Minecraft server, you can now use
[Docker Compose](https://docs.docker.com/compose/). Start with a
`docker-compose.yml` file like the following:
``` yaml
version: "3"
services:
mc:
image: itzg/minecraft-server
ports:
- 25565:25565
environment:
EULA: "TRUE"
tty: true
stdin_open: true
restart: unless-stopped
```
and in the same directory as that file run
docker-compose up -d
Now, go play...or adjust the `environment` section to configure
this server instance.

View File

@@ -1,8 +0,0 @@
- itzg Helm Chart:
- [GitHub repo](https://github.com/itzg/minecraft-server-charts)
- [Helm Chart repo](https://itzg.github.io/minecraft-server-charts/)
- [mcsh/server-deployment](https://github.com/mcserverhosting-net/charts)
### Examples
The [examples directory](https://github.com/itzg/docker-minecraft-server/tree/master/examples) also provides examples of deploying the [itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server/) Docker image.

View File

@@ -0,0 +1,28 @@
# More Deployment Info
## On Kubernetes
### Using Helm
- itzg Helm Chart:
- [GitHub repo](https://github.com/itzg/minecraft-server-charts)
- [Helm Chart repo](https://itzg.github.io/minecraft-server-charts/)
- [mcsh/server-deployment](https://github.com/mcserverhosting-net/charts)
### Using Shulker
[Shulker](https://github.com/jeremylvln/Shulker) is a Kubernetes operator for managing complex and dynamic Minecraft infrastructures, including game servers and proxies. It uses the docker-minecraft-server and docker-bungeecord images under-the-hood.
## On CloudFormation (AWS)
If you're looking for a simple way to deploy this to the Amazon Web Services Cloud, check out the [Minecraft Server Deployment (CloudFormation) repository](https://github.com/vatertime/minecraft-spot-pricing). This repository contains a CloudFormation template that will get you up and running in AWS in a matter of minutes. Optionally it uses Spot Pricing so the server is very cheap, and you can easily turn it off when not in use.
## Supporting Articles
Below are supporting articles for server deployment.
- "Zero to Minecraft Server with Docker Desktop and Compose"
https://dev.to/rela-v/zero-to-minecraft-server-with-docker-desktop-and-compose-500a
- This is a reference guide/tutorial on how to set up a vanilla Minecraft server using this project, including step-by-step instructions, and information on topics such as port-forwarding.

28
docs/misc/examples.md Normal file
View File

@@ -0,0 +1,28 @@
# Examples
Various examples are [maintained in the repository](https://github.com/itzg/docker-minecraft-server/tree/master/examples). The sections below highlight a few particular ones.
## Bedrock compatible server
Using the [GeyserMC plugin](https://geysermc.org/) with a Paper server (or similar) "enables clients from Minecraft Bedrock Edition to join your Minecraft Java server". The example also includes [Floodgate](https://wiki.geysermc.org/floodgate/) which "allows Xbox Live authenticated Bedrock users to join without a Java Edition account".
```yaml
version: "3.8"
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: "PAPER"
PLUGINS: |
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
ports:
- "25565:25565"
- "19132:19132/udp"
volumes:
- ./data:/data
```
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)

View File

@@ -25,3 +25,8 @@ healthcheck:
```
Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
### Healthchecks for older versions
This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging.
For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3)

View File

@@ -0,0 +1,49 @@
# Auto-download from CurseForge
Mods and plugins can be auto-downloaded and upgraded from CurseForge by setting `CURSEFORGE_FILES` to a comma or space delimited list of [project-file references](#project-file-references). References removed from the declaration are automatically cleaned up and setting `CURSEFORGE_FILES` to an empty string removes all previously managed project-files.
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
!!! warning "CurseForge API key usage"
A CurseForge API key must be allocated and set with `CF_API_KEY` [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
## Project-file references
!!! tip
Individual project files typically represent a version of the mod/plugin, but CurseForge refers to these items broadly as "files" rather than "versions".
The following formats are supported in the list of project-file references:
- A project page URL, such as `https://www.curseforge.com/minecraft/mc-mods/jei`. _The newest applicable file will be automatically selected._
- A file page URL, such as `https://www.curseforge.com/minecraft/mc-mods/jei/files/4593548`
- Project slug, such as `jei`. _The newest applicable file will be automatically selected._
- Project ID, such as `238222`. _The newest applicable file will be automatically selected._
- Project slug or ID, `:`, and a file ID, such as `jei:4593548` or `238222:4593548`
- Project slug or ID, `@`, and a partial filename, such as `jei@10.2.1.1005`. This option is useful to refer to a version of the mod/plugin rather than looking up the file ID.
An `@` followed by the container path to a listing file can also be provided as a project-file reference. Each line is processed as a reference where blank lines and comments that start with `#` are ignored.
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
```text
# This comment is ignored
jei:10.2.1.1005
# This and previous blank line are ignore
geckolib
aquaculture
naturalist
```
!!! tip "Docker Compose"
Making use of the space delimited option, compose file declarations can be organized nicely with a [multi-line string](https://yaml-multiline.info/), such as
```yaml
CURSEFORGE_FILES: |
geckolib
aquaculture
naturalist
```

View File

@@ -1,220 +0,0 @@
## Auto CurseForge Management
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
### API Key
!!! warning "CurseForge API key usage"
A CurseForge API key is **required** to use this feature. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`.
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
```yaml
environment:
CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
If you use `docker run` you will need to make sure to use single quotes:
```shell
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). `$`'s in the value still need to escaped with a second `$` and the variable needs to be referenced from the compose file, such as:
```yaml
environment:
CF_API_KEY: ${CF_API_KEY}
```
To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
```
docker run --env-file=.env itzg/minecraft-server
```
!!! note
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../versions/java.md).
Most modpacks require a good amount of memory, so it best to set `MEMORY` to at least "4G" since the default is only 1 GB.
### Usage
Use one of the following to specify the modpack to install:
Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the modpack page "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8" or a specific file "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390". For example:
```
-e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
```
Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the short identifier visible in the URL after "/modpacks/", such as
![cf-slug](../img/cf-slug.png)
For example:
```
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
```
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
If the authors of the modpack have disallowed project distribution, then the desired **client** modpack zip will need to be manually downloaded and made available to the container. The path to that file must be passed to `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, the modpack slug or page URL must still be provided.
The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
- Use `CF_PAGE_URL`, but include the full URL to a specific file
- Set `CF_FILE_ID` to the numerical file ID
- Specify a substring to match the desired filename with `CF_FILENAME_MATCHER`
The following shows where to get the URL to the specific file and also shows where the file ID is located:
![cf-file-id](../img/cf-file-id.png)
The following examples all refer to version 1.0.7 of ATM8:
```
-e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390
```
```
-e CF_SLUG=all-the-mods-8 -e CF_FILE_ID=4248390
```
```
-e CF_SLUG=all-the-mods-8 -e CF_FILENAME_MATCHER=1.0.7
```
### Exlude client mods
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:
Mods can be excluded by passing a comma or space delimited list of **project** slugs or IDs via `CF_EXCLUDE_MODS`. Similarly, there are some mods that are incorrectly tagged as client only. For those, pass the **project** slugs or IDs via `CF_FORCE_INCLUDE_MODS`. These lists will be combined with the content of the exclude/include file, if given.
A mod's project ID can be obtained from the right hand side of the project page:
![cf-project-id](../img/cf-project-id.png)
For more complex scenarios, global and per modpack exclusions can be declared in a container-accessible JSON file and referenced with `CF_EXCLUDE_INCLUDE_FILE`. By default, [the file bundled with the image](https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json) will be used, but can be disabled by setting this to an empty string. The schema of this file [is documented here](https://github.com/itzg/mc-image-helper#excludeinclude-file-schema).
If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true" to ensure the exclude/includes are re-evaluated.
!!! important
These options are provided to empower you to get your server up and running quickly. Please help out by reporting an issue with the respective mod project. Ideally mod developers should [use correct registrations for one-sided client mods](https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods). Understandably, those code changes may be non-trivial, so mod authors can also add "Client" to the game versions when publishing.
### Extra options
Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the `LEVEL` to the resulting saves directory by setting `CF_SET_LEVEL_FROM` to either:
- `WORLD_FILE`
- `OVERRIDES`
Other configuration available:
- `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform
- `CF_OVERRIDES_SKIP_EXISTING` (default is false): if set, files in the overrides that already exist in the data directory are skipped. **NOTE** world data is always skipped, if present.
## Old approach
Enable this server mode by adding `-e TYPE=CURSEFORGE` to your command-line,
but note the following additional steps needed...
You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
variable. A CurseForge server modpack is available together with its respective
client modpack at <https://www.curseforge.com/minecraft/modpacks> .
Now you can add a `-e CF_SERVER_MOD=name_of_modpack.zip` to your command-line.
docker run -d -v /path/on/host:/data -e TYPE=CURSEFORGE \
-e CF_SERVER_MOD=SkyFactory_4_Server_4.1.0.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
If you want to keep the pre-download modpacks separate from your data directory,
then you can attach another volume at a path of your choosing and reference that.
The following example uses `/modpacks` as the container path as the pre-download area:
docker run -d -v /path/on/host:/data -v /path/to/modpacks:/modpacks \
-e TYPE=CURSEFORGE \
-e CF_SERVER_MOD=/modpacks/SkyFactory_4_Server_4.1.0.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
### Modpack data directory
By default, CurseForge modpacks are expanded into the sub-directory `/data/FeedTheBeast` and executed from there. (The default location was chosen for legacy reasons, when Curse and FTB were maintained together.)
The directory can be changed by setting `CF_BASE_DIR`, such as `-e CF_BASE_DIR=/data`.
### Buggy start scripts
Some modpacks have buggy or overly complex start scripts. You can avoid using the bundled start script and use this image's standard server-starting logic by adding `-e USE_MODPACK_START_SCRIPT=false`.
### Fixing "unable to launch forgemodloader"
If your server's modpack fails to load with an error [like this](https://support.feed-the-beast.com/t/cant-start-crashlanding-server-unable-to-launch-forgemodloader/6028/2):
unable to launch forgemodloader
then you apply a workaround by adding this to the run invocation:
-e FTB_LEGACYJAVAFIXER=true
## ForgeAPI usage to use non-version specific projects
!!! warning "Deprecated"
This approach will soon be deprecated in favor of a variation of `AUTO_CURSEFORGE` mechanism described above.
!!! warning
This potentially could lead to unexpected behavior if the Mod receives an update with unexpected behavior.
This is more complicated because you will be pulling/using the latest mod for the release of your game. To get started make sure you have a [CursedForge API Key](https://docs.curseforge.com/#getting-started). Then use the environmental parameters in your docker build.
Please be aware of the following when using these options for your mods:
* Mod Release types: Release, Beta, and Alpha.
* Mod dependencies: Required and Optional
* Mod family: Fabric, Forge, and Bukkit.
Parameters to use the ForgeAPI:
* `MODS_FORGEAPI_KEY` - Required
* `MODS_FORGEAPI_FILE` - Required or use MODS_FORGEAPI_PROJECTIDS (Overrides MODS_FORGEAPI_PROJECTIDS)
* `MODS_FORGEAPI_PROJECTIDS` - Required or use MODS_FORGEAPI_FILE
* `MODS_FORGEAPI_RELEASES` - Default is release, Options: [Release|Beta|Alpha]
* `MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES` - Default is False, attempts to download required mods (releaseType Release) defined in Forge.
* `MODS_FORGEAPI_IGNORE_GAMETYPE` - Default is False, Allows for filtering mods on family type: FORGE, FABRIC, and BUKKIT. (Does not filter for Vanilla or custom)
* `REMOVE_OLD_FORGEAPI_MODS` - Default is False
* `REMOVE_OLD_DATAPACKS_DEPTH` - Default is 1
* `REMOVE_OLD_DATAPACKS_INCLUDE` - Default is *.jar
Example of expected forge api project ids, releases, and key:
```yaml
MODS_FORGEAPI_PROJECTIDS: 306612,256717
MODS_FORGEAPI_RELEASES: Release
MODS_FORGEAPI_KEY: $WRX...
```
Example of expected ForgeAPI file format.
**Field Description**:
* `name` is currently unused, but can be used to document each entry.
* `projectId` id is the id found on the CurseForge website for a particular mod
* `releaseType` Type corresponds to forge's R, B, A icon for each file. Default Release, options are (release|beta|alpha).
* `fileName` is used for version pinning if latest file will not work for you.
```json
[
{
"name": "fabric api",
"projectId": "306612",
"releaseType": "release"
},
{
"name": "fabric voice mod",
"projectId": "416089",
"releaseType": "beta"
},
{
"name": "Biomes o plenty",
"projectId": "220318",
"fileName": "BiomesOPlenty-1.18.1-15.0.0.100-universal.jar",
"releaseType": "release"
}
]
```

View File

@@ -1,15 +1,35 @@
# Working with mods and plugins
## Mod platforms
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported mod platforms](../types-and-platforms/index.md).
The following are some supported mod platforms:
- [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md)
- [CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md)
- [Feed the Beast](../types-and-platforms/mod-platforms/ftb.md)
## Download automation
On the left, there are sections describing some download automation options.
## Mods vs Plugins
The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins"
## Optional plugins, mods, and config attach points
There are optional volume paths that can be attached to supply content to be copied into the data area:
`/plugins`
: contents are synchronized into `/data/plugins` for Bukkit related server types. The source can be changed by setting `COPY_PLUGINS_SRC`. The destination can be changed by setting `COPY_PLUGINS_DEST`. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/plugins` to take precedence over newer files in `/data/plugins`.
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`.
`/mods`
: contents are synchronized into `/data/mods` for Fabric and Forge related server types. The source can be changed by setting `COPY_MODS_SRC`. The destination can be changed by setting `COPY_MODS_DEST`.
: content in this directory is synchronized into `/data/mods` for server types that use mods, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_MODS_SRC` and destination by setting `COPY_MODS_DEST`.
`/config`
: contents are synchronized into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`. The source can be changed by setting `COPY_CONFIG_SRC`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/config` to take precedence over newer files in `/data/config`.
: contents are synchronized into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. The source can be changed by setting `COPY_CONFIG_SRC`. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/config` to take precedence over newer files in `/data/config`.
By default, the [environment variable processing](../configuration/interpolating.md) is performed on synchronized files that match the expected suffixes in `REPLACE_ENV_SUFFIXES` (by default "yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml") and are not excluded by `REPLACE_ENV_VARIABLES_EXCLUDES` and `REPLACE_ENV_VARIABLES_EXCLUDE_PATHS`. This processing can be disabled by setting `REPLACE_ENV_DURING_SYNC` to `false`.
@@ -21,68 +41,23 @@ For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMO
These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.
> For more flexibility with mods/plugins preparation, you can declare directories to use in [the `MODS` variable](#zip-file-modpack)
!!! information ""
For more flexibility with mods/plugins preparation, you can declare other directories, files, and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list).
## Auto-downloading SpigotMC/Bukkit/PaperMC plugins with Spiget
The `SPIGET_RESOURCES` variable can be set with a comma-separated list of SpigotMC resource IDs to automatically download [SpigotMC resources/plugins](https://www.spigotmc.org/resources/) using [the spiget API](https://spiget.org/). Resources that are zip files will be expanded into the plugins directory and resources that are simply jar files will be moved there.
> NOTE: the variable is purposely spelled SPIG**E**T with an "E"
The **resource ID** can be located from the numerical part of the URL after the shortname/slug and a dot. For example, the ID is **28140** from
https://www.spigotmc.org/resources/luckperms.28140/
=====
For example, the following will auto-download the [LuckPerms](https://www.spigotmc.org/resources/luckperms.28140/) and [Vault](https://www.spigotmc.org/resources/vault.34315/) plugins:
-e SPIGET_RESOURCES=28140,34315
!!! note
Some plugins, such as EssentialsX (resource ID 9089), do not permit automated downloads via Spiget. Instead you will need to pre-download the desired file and supply it to the container, such as using the `/plugins` mount point, described above.
## Auto-download mods and plugins from Modrinth
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric and Forge mods](https://modrinth.com/mods). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
- **MODRINTH_PROJECTS** : comma separated list of project slugs (short name) or IDs. The project ID can be located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
```
https://modrinth.com/mod/fabric-api
----------
|
+-- project slug
```
Also, specific version/type can be declared using colon symbol and version id/type after the project slug. The version id can be found at 'Metadata' section. Valid version types are `release`, `beta`, `alpha`. For instance:
```
-e MODRINTH_PROJECTS=fabric-api,fabric-api:PbVeub96,fabric-api:beta
```
- **MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES**=true : required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`
- **MODRINTH_ALLOWED_VERSION_TYPE**=release : the version type is used to determine the newest version to use from each project. The allowed values are `release`, `beta`, `alpha`.
## Zip file modpack
Like the `WORLD` option above, you can specify the URL or path of a "mod pack"
to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot.
To use this option pass the environment variable `MODPACK`, such as
Like the `WORLD` option above, you can specify the URL or container path of a "mod pack" to download and install into `mods` for Forge/Fabric or `plugins` for Bukkit/Spigot. To use this option pass the environment variable `MODPACK`, such as
```shell
docker run -d -e MODPACK=http://www.example.com/mods/modpack.zip ...
```
!!! note
The referenced URL must be a zip file with one or more jar files at the
The referenced URL/file must be a zip file with one or more jar files at the
top level of the zip archive. Make sure the jars are compatible with the
particular `TYPE` of server you are running.
You may also download or copy over individual mods using the `MODS` environment variable. `MODS` contains a comma-separated list of
- URL of a jar file
- container path to a jar file
- container path to a directory containing jar files
```shell
docker run -d -e MODS=https://www.example.com/mods/mod1.jar,/plugins/common,/plugins/special/mod2.jar ...
```
## Generic pack files
To install all the server content (jars, mods, plugins, configs, etc.) from a zip or tgz file, then set `GENERIC_PACK` to the container path or URL of the archive file. This can also be used to apply a CurseForge modpack that is missing a server start script and/or Forge installer.
@@ -103,9 +78,27 @@ If applying large generic packs, the update can be time-consuming. To skip the u
The most time-consuming portion of the generic pack update is generating and comparing the SHA1 checksum. To skip the checksum generation, set `SKIP_GENERIC_PACK_CHECKSUM` to "true.
## Mods/plugins list
You may also download or copy over individual mods/plugins using the `MODS` or `PLUGINS` environment variables. Both are a comma or newline delimited list of
- URL of a jar file
- container path to a jar file
- container path to a directory containing jar files
```shell
docker run -d -e MODS=https://www.example.com/mods/mod1.jar,/plugins/common,/plugins/special/mod2.jar ...
```
The newline delimiting allows for compose file usage like:
```yaml
PLUGINS: |
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
```
## Mod/Plugin URL Listing File
As an alternative to `MODS`, the variable `MODS_FILE` can be set with the path to a text file listing a mod/plugin URL on each line. For example, the following
As an alternative to `MODS`/`PLUGINS`, the variable `MODS_FILE` or `PLUGINS_FILE` can be set with the container path or URL of a text file listing a mod/plugin URLs on each line. For example, the following
-e MODS_FILE=/extras/mods.txt
@@ -126,8 +119,6 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
[This compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-mods-file.yml) shows another example of using this feature.
It is recommended to combine this option with `REMOVE_OLD_MODS=TRUE` to ensure the mods/plugins remain consistent with the file's listing.
## Remove old mods/plugins
When the `MODPACK` option above is specified you can also instruct script to delete old mods/plugins prior to installing new ones. This behaviour is desirable in case you want to upgrade mods/plugins from downloaded zip file.

View File

@@ -1,23 +0,0 @@
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
- The project "slug", which is located in the URL shown here:
![](../img/modrinth-project-slug.drawio.png)
- The project ID, which is located in the bottom of the left panel, shown here
![](../img/modrinth-project-id.drawio.png)
- The project page URL, such as <https://modrinth.com/modpack/cobblemon-fabric>. As described below, this can further be the page URL of a modpack's version page.
The automatic modpack version resolving can be narrowed in a few ways:
The latest release or beta version, respectively, of the Modrinth modpack is selected when `VERSION` is "LATEST" or "SNAPSHOT". That can be overridden by setting `MODRINTH_DEFAULT_VERSION_TYPE` to "release", "beta", or "alpha".
Furthermore, the resolved modpack version can be narrowed by setting `VERSION` to a specific Minecraft version, such as "1.19.2".
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
![](../img/modrinth-version-id.drawio.png)

View File

@@ -0,0 +1,30 @@
# Auto-download from Modrinth
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric and Forge mods](https://modrinth.com/mods). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
```
https://modrinth.com/mod/fabric-api
----------
|
+-- project slug
```
Also, a specific version/type can be declared using colon symbol and version id/type after the project slug. The version id can be found in the 'Metadata' section. Valid version types are `release`, `beta`, `alpha`.
!!! example
| Description | Example |
|---------------------------------|-----------------------|
| Select latest version | `fabric-api` |
| Select specific version | `fabric-api:PbVeub96` |
| Select latest beta version | `fabric-api:beta` |
| Latest version using project ID | `P7dR8mSH` |
## Extra options
`MODRINTH_DOWNLOAD_DEPENDENCIES`
: Can be set to `none` (the default), `required`, or `optional` to download required and/or optional dependencies.
`MODRINTH_ALLOWED_VERSION_TYPE`
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`.

View File

@@ -0,0 +1,19 @@
# Auto-download using Spiget
The `SPIGET_RESOURCES` variable can be set with a comma-separated list of SpigotMC resource IDs to automatically download [Spigot/Bukkit/Paper plugins](https://www.spigotmc.org/resources/) using [the spiget API](https://spiget.org/). Resources that are zip files will be expanded into the plugins directory and resources that are simply jar files will be moved there.
!!! important "SPIGET not SPIGOT"
The variable is purposely spelled SPIG**E**T with an "E"
The **resource ID** can be located from the numerical part of the URL after the shortname/slug and a dot. For example, the ID is **28140** from
https://www.spigotmc.org/resources/luckperms.28140/
=====
For example, the following will auto-download the [LuckPerms](https://www.spigotmc.org/resources/luckperms.28140/) and [Vault](https://www.spigotmc.org/resources/vault.34315/) plugins:
-e SPIGET_RESOURCES=28140,34315
!!! note
Some plugins, such as EssentialsX (resource ID 9089), do not permit automated downloads via Spiget. Instead, you will need to pre-download the desired file and supply it to the container, such as using the `/plugins` mount point, described [in the main section](index.md).

View File

@@ -1,9 +1,9 @@
mkdocs
mkdocs-material-extensions
mkdocs-material
mkdocs-autorefs
mkdocstrings
mkdocs-literate-nav
mdx-gh-links
mkdocs-click
mkdocs-static-i18n
mkdocs == 1.5.3
mkdocs-material-extensions == 1.3.1
mkdocs-material == 9.5.3
mkdocs-autorefs == 0.5.0
mkdocstrings == 0.24.0
mkdocs-literate-nav == 0.6.1
mdx-gh-links == 0.4
mkdocs-click == 0.8.1
mkdocs-static-i18n == 1.2.0

View File

@@ -1,32 +0,0 @@
Enable [Forge server](http://www.minecraftforge.net/) mode by adding a `-e TYPE=FORGE` to your command-line.
The overall version is specified by `VERSION`, [as described in the section above](../versions/minecraft.md) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGE_VERSION`, such as `-e FORGE_VERSION=14.23.5.2854`.
```
docker run -d -v /path/on/host:/data \
-e TYPE=FORGE \
-e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
```
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
specify the name of the installer file with `FORGE_INSTALLER`, such as:
```
docker run -d -v /path/on/host:/data ... \
-e FORGE_INSTALLER=forge-1.11.2-13.20.0.2228-installer.jar ...
```
To download a Forge installer from a custom location, such as your own file repository, specify
the URL with `FORGE_INSTALLER_URL`, such as:
```
docker run -d -v /path/on/host:/data ... \
-e FORGE_INSTALLER_URL=http://HOST/forge-1.11.2-13.20.0.2228-installer.jar ...
```
In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables.
!!! note
If an error occurred while installing Forge, it might be possible to resolve by temporarily setting `FORGE_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server.

View File

@@ -1,34 +0,0 @@
### Magma
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
-e TYPE=MAGMA
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
### Mohist
A [Mohist](https://github.com/MohistMC/Mohist) server can be used with
-e TYPE=MOHIST
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
-e VERSION=1.16.5 -e MOHIST_BUILD=374
### Catserver
A [Catserver](http://catserver.moe/) type server can be used with
-e TYPE=CATSERVER
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored

View File

@@ -0,0 +1,14 @@
# Server Types and Mod Platforms
Server types can be selected by setting the `TYPE` environment variable to one of the types described in these sections.
The default server type is [the official software provided by Mojang](https://www.minecraft.net/en-us/download/server), which can be explicitly selected by setting `TYPE` to "VANILLA".
**From the sections to the left...**
The **mod platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The mod platforms are selected by setting `MOD_PLATFORM`; however, for ease of use and compatibility, the selection can be set in `TYPE`.
The individual **server types** allow for selecting the mod loader / server type and specific versions of those.
!!! important
For all the server types, the `VERSION` environment variable is used to declare the Minecraft version itself, such as 1.19.4. Each server type will have specific variables for qualifying their version in addition to the Minecraft version.

View File

@@ -0,0 +1,167 @@
# Auto CurseForge
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
## API Key
!!! warning "CurseForge API key usage"
A CurseForge API key is **required** to use this feature. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
```yaml
environment:
CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
If you use `docker run` you will need to make sure to use single quotes:
```shell
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). `$`'s in the value still need to escaped with a second `$` and the variable needs to be referenced from the compose file, such as:
```yaml
environment:
CF_API_KEY: ${CF_API_KEY}
```
To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
```
docker run --env-file=.env itzg/minecraft-server
```
!!! note
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md).
Most modpacks require a good amount of memory, so it best to set `MEMORY` to at least "4G" since the default is only 1 GB.
## Usage
Use one of the following to specify the modpack to install:
Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the modpack page "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8" or a specific file "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390". For example:
```
-e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
```
Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the short identifier visible in the URL after "/modpacks/", such as
![cf-slug](../../img/cf-slug.png)
For example:
```
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
```
The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup.
- Use `CF_PAGE_URL`, but include the full URL to a specific file
- Set `CF_FILE_ID` to the numerical file ID
- Specify a substring to match the desired filename with `CF_FILENAME_MATCHER`
The following shows where to get the URL to the specific file and also shows where the file ID is located:
![cf-file-id](../../img/cf-file-id.png)
The following examples all refer to version 1.0.7 of ATM8:
```yaml
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390
```
```yaml
CF_SLUG: all-the-mods-8
CF_FILE_ID: "4248390"
```
```yaml
CF_SLUG: all-the-mods-8
CF_FILENAME_MATCHER: 1.0.7
```
## Manual Downloads
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
!!! note "Mods need download report"
A file called `MODS_NEED_DOWNLOAD.txt` will be created in the `/data` directory that lists the mods that need to be manually downloaded and where to get them.
!!! example
Assuming Docker compose is being used:
1. Create a directory next to the `docker-compose.yml` file. The name doesn't matter, but "downloads" is the common convention
2. From the "Mods Need Download" output, visit the download page of each, click on the file download and save that file into the directory created in the previous step
3. Add a host directory mount to the volumes section where the container path **must be** `/downloads`. The snippet below shows how that will look
4. Re-run `docker composwe up -d` to apply the changes
```yaml
volumes:
./downloads:/downloads
```
## Unpublished Modpacks
If you wish to use a unpublished modpack zip, set the container path to the file in `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, **the modpack slug or page URL must still be provided**.
## Exclude client mods
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:
Mods can be excluded by passing a comma or space delimited list of **project** slugs or IDs via `CF_EXCLUDE_MODS`. Similarly, there are some mods that are incorrectly tagged as client only. For those, pass the **project** slugs or IDs via `CF_FORCE_INCLUDE_MODS`. These lists will be combined with the content of the exclude/include file, if given.
A mod's project ID can be obtained from the right hand side of the project page:
![cf-project-id](../../img/cf-project-id.png)
For more complex scenarios, global and per modpack exclusions can be declared in a container-accessible JSON file and referenced with `CF_EXCLUDE_INCLUDE_FILE`. By default, [the file bundled with the image](https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json) will be used, but can be disabled by setting this to an empty string. The schema of this file [is documented here](https://github.com/itzg/mc-image-helper#excludeinclude-file-schema).
If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true" to ensure the exclude/includes are re-evaluated.
!!! important
These options are provided to empower you to get your server up and running quickly. Please help out by reporting an issue with the respective mod project. Ideally mod developers should [use correct registrations for one-sided client mods](https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods). Understandably, those code changes may be non-trivial, so mod authors can also add "Client" to the game versions when publishing.
## Excluding Overrides Files
Modpack zip files typically include an `overrides` subdirectory that may contain config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `CF_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory.
### Ant-style paths
Ant-style paths can include the following globbing/wildcard symbols:
| Symbol | Behavior |
|--------|---------------------------------------------------------|
| `*` | Matches zero, one, or many characters except a slash |
| `**` | Matches zero, one, or many characters including slashes |
| `?` | Matches one character |
!!! example
The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides
```yaml
CF_OVERRIDES_EXCLUSIONS: mods/iris*.jar,mods/sodium*.jar
```
or using newline delimiter, which improves maintainability
```yaml
CF_OVERRIDES_EXCLUSIONS: |
mods/iris*.jar
mods/sodium*.jar
```
## World/Level Data
Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the `LEVEL` to the resulting saves directory by setting `CF_SET_LEVEL_FROM` to either:
- `WORLD_FILE`
- `OVERRIDES`
## Extra options
Other configuration available:
- `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform
- `CF_OVERRIDES_SKIP_EXISTING` (default is false): if set, files in the overrides that already exist in the data directory are skipped. **NOTE** world data is always skipped, if present.

View File

@@ -0,0 +1,46 @@
# Manual CurseForge server packs
!!! warning "Deprecated"
This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments.
Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
variable. A CurseForge server modpack is available together with its respective
client modpack at <https://www.curseforge.com/minecraft/modpacks> .
Now you can add a `-e CF_SERVER_MOD=name_of_modpack.zip` to your command-line.
docker run -d -v /path/on/host:/data -e TYPE=CURSEFORGE \
-e CF_SERVER_MOD=SkyFactory_4_Server_4.1.0.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
If you want to keep the pre-download modpacks separate from your data directory,
then you can attach another volume at a path of your choosing and reference that.
The following example uses `/modpacks` as the container path as the pre-download area:
docker run -d -v /path/on/host:/data -v /path/to/modpacks:/modpacks \
-e TYPE=CURSEFORGE \
-e CF_SERVER_MOD=/modpacks/SkyFactory_4_Server_4.1.0.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
### Modpack data directory
By default, CurseForge modpacks are expanded into the sub-directory `/data/FeedTheBeast` and executed from there. (The default location was chosen for legacy reasons, when Curse and FTB were maintained together.)
The directory can be changed by setting `CF_BASE_DIR`, such as `-e CF_BASE_DIR=/data`.
### Buggy start scripts
Some modpacks have buggy or overly complex start scripts. You can avoid using the bundled start script and use this image's standard server-starting logic by adding `-e USE_MODPACK_START_SCRIPT=false`.
### Fixing "unable to launch forgemodloader"
If your server's modpack fails to load with an error [like this](https://support.feed-the-beast.com/t/cant-start-crashlanding-server-unable-to-launch-forgemodloader/6028/2):
unable to launch forgemodloader
then you apply a workaround by adding this to the run invocation:
-e FTB_LEGACYJAVAFIXER=true

View File

@@ -1,8 +1,14 @@
# Feed the Beast
!!! note
Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../../versions/java.md).
Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../versions/java.md).
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MOD_PLATFORM` or `TYPE` to "FTBA"
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by using `-e TYPE=FTBA` (**note** the "A" at the end of the type). This server type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified.
!!! note
The "A" at the end of "FTBA" is important. The value "FTB" used to be an alias for "CURSEFORGE".
This mod platform type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified.
### Environment Variables:
- `FTB_MODPACK_ID`: **required**, the numerical ID of the modpack to install. The ID can be located by [finding the modpack](https://www.feed-the-beast.com/modpack) and locating the ID in this part of the URL:
@@ -11,7 +17,9 @@
https://www.feed-the-beast.com/modpacks/23-ftb-infinity-evolved-17
^^
```
- `FTB_MODPACK_VERSION_ID`: optional, the numerical ID of the version to install. If not specified, the latest version will be installed. The "Version ID" can be obtained by hovering over a server file entry and grabbing [this ID in the URL](../img/ftba-version-id-popup.png).
- `FTB_MODPACK_VERSION_ID`: optional, the numerical ID of the version to install. If not specified, the latest version will be installed. The "Version ID" can be obtained by hovering over a server file entry and grabbing [this ID in the URL](../../img/ftba-version-id-popup.png).
- `FTB_FORCE_REINSTALL`: if the files become inconsistent, such as when accidentally removing them, the FTB can be forced to re-run by setting this to "true"
### Upgrading

View File

@@ -0,0 +1,56 @@
# Modrinth Modpacks
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
## Modpack project
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:
- The project "slug", which is located in the URL shown here:
![](../../img/modrinth-project-slug.drawio.png)
- The project ID, which is located in the bottom of the left panel, shown here
![](../../img/modrinth-project-id.drawio.png)
- The project page URL, such as <https://modrinth.com/modpack/cobblemon-fabric>. As described below, this can further be the page URL of a modpack's version page.
## Modpack version
The automatic modpack version resolving can be narrowed in a few ways:
The latest release or beta version, respectively, of the Modrinth modpack is selected when `VERSION` is "LATEST" or "SNAPSHOT". That can be overridden by setting `MODRINTH_DEFAULT_VERSION_TYPE` to "release", "beta", or "alpha".
The resolved modpack version can be narrowed by setting `VERSION` to a specific Minecraft version, such as "1.19.2".
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
![](../../img/modrinth-version-id.drawio.png)
## Ignore missing files
Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loader), use temporary files from the modpack and delete them when finished. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma or newline delimited list to `MODRINTH_IGNORE_MISSING_FILES`.
!!! example
In a Compose file
```yaml
environment:
MODRINTH_IGNORE_MISSING_FILES: |
config/mcinstanceloader/pack.mcinstance
```
## Excluding files
To exclude client mods that are incorrectly declared by the modpack as server-compatible, set `MODRINTH_EXCLUDE_FILES` to a comma or newline delimited list of partial file names to exclude. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
!!! example
In a Compose file:
```yaml
MODRINTH_EXCLUDE_FILES: |
notenoughanimations
lambdynamiclights
euphoriapatcher
```

View File

@@ -1,10 +1,20 @@
Enable Bukkit/Spigot server mode by adding a `-e TYPE=BUKKIT` or `-e TYPE=SPIGOT` to your command-line.
# Bukkit/Spigot
```
docker run -d -v /path/on/host:/data \
-e TYPE=SPIGOT \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
```
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
!!! example
Command-line
```
docker run ... -e TYPE=SPIGOT ...
```
Compose
```yaml
environment:
...
TYPE: SPIGOT
```
If the downloaded server jar is corrupted, set `FORCE_REDOWNLOAD` to "true" to force a re-download during next container startup. After successfully re-downloading, you should remove that or set to "false".
@@ -13,16 +23,14 @@ If you are hosting your own copy of Bukkit/Spigot you can override the download
- -e BUKKIT_DOWNLOAD_URL=<url>
- -e SPIGOT_DOWNLOAD_URL=<url>
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
Plugins can either be managed within the `plugins` subdirectory of the [data directory](../data-directory.md) or you can also [attach a `/plugins` volume](../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../mods-and-plugins/index.md#auto-downloading-spigotmcbukkitpapermc-plugins-with-spiget)
!!! note
Some of the `VERSION` values are not as intuitive as you would think, so make sure to click into the version entry to find the **exact** version needed for the download. For example, "1.8" is not sufficient since their download naming expects `1.8-R0.1-SNAPSHOT-latest` exactly.
## Build from source
You can build spigot from source by setting the environment variable `BUILD_FROM_SOURCE` to "true".
## Alternatives
### Canyon

View File

@@ -24,4 +24,4 @@ docker run -d -v /path/on/host:/data ... \
- Provide the path to a custom launcher jar available to the container with `FABRIC_LAUNCHER`, relative to `/data` (such as `-e FABRIC_LAUNCHER=fabric-server-custom.jar`)
- Provide the URL to a custom launcher jar with `FABRIC_LAUNCHER_URL` (such as `-e FABRIC_LAUNCHER_URL=http://HOST/fabric-server-custom.jar`)
See the [Working with mods and plugins](../mods-and-plugins/index.md) section to set up Fabric mods and configuration.
See the [Working with mods and plugins](../../mods-and-plugins/index.md) section to set up Fabric mods and configuration.

View File

@@ -0,0 +1,57 @@
A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "FORGE".
!!! example
```
docker run -e TYPE=FORGE ...
```
or in a compose file
```yaml
environment:
TYPE: FORGE
```
The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and provides the same benefits of upgrading as new versions are released. By default, the recommended version of Forge for that Minecraft version will be selected. The latest version can be selected instead by setting the environment variable `FORGE_VERSION` to "latest". You can also choose a specific Forge version by setting `FORGE_VERSION` with that version, such as "14.23.5.2854".
!!! example
```
docker run -e TYPE=FORGE -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 ...
```
or in a compose file
```yaml
environment:
TYPE: FORGE
VERSION: "1.12.2"
FORGE_VERSION: "14.23.5.2854"
```
To use a pre-downloaded Forge installer, place it in a location mounted into the container and specify the container path with `FORGE_INSTALLER`. To download a Forge installer from a custom location, such as your own file repository, specify the URL with `FORGE_INSTALLER_URL`.
In both of the cases above, there is no need for the `VERSION` or `FORGE_VERSION` variables.
!!! note
If an error occurred while installing Forge, it might be possible to resolve by temporarily setting `FORGE_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server.
## Alternatives
### NeoForge
Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge server can be automatically managed by setting `TYPE` to "NEOFORGE". `VERSION` specifies the Minecraft version and `NEOFORGE_VERSION` can be set to select a specific version, "latest", or "beta". By default, the latest, non-beta NeoForge version available for the requested Minecraft version will be used.
!!! example
```
docker run -e TYPE=NEOFORGE -e VERSION=1.20.1 -e NEOFORGE_VERSION=47.1.79 ...
```
or in a compose file
```yaml
environment:
TYPE: NEOFORGE
VERSION: "1.20.4"
NEOFORGE_VERSION: "beta"
```

View File

@@ -0,0 +1,61 @@
### Magma
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
-e TYPE=MAGMA
!!! note
The Magma project [has been terminated](https://git.magmafoundation.org/magmafoundation/magma-1-20-x/-/commit/4e7abe37403c47d09b74b77bcfc26a19b18f5891). Please use Magma Maintained for 1.12.2, 1.18.2, 1.19.3, and 1.20.1, or Ketting for 1.20.2+.
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc.
### Magma Maintained
A [Magma Maintained](https://github.com/magmamaintained/) server, which is a alternative project of Magma, can be used with
-e TYPE=MAGMA_MAINTAINED
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.18.2", "1.19.3", or "1.20.1".
In addition, `FORGE_VERSION` and `MAGMA_MAINTAINED_TAG` must be specified. You can find the supported `FORGE_VERSION` and `MAGMA_MAINTAINED_TAG` in a releases page for each repositories.
### Ketting
A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is a alternative project of Magma 1.20.2+, can be used with
-e TYPE=KETTING
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.2" or later.
In addition, `FORGE_VERSION` and `KETTING_VERSION` must be specified. You can find the supported `FORGE_VERSION` in the [project page](https://github.com/kettingpowered/Ketting-1-20-x), and `KETTING_VERSION` in the [release page](https://github.com/kettingpowered/Ketting-1-20-x/releases).
!!! note
The length of `KETTING_VERSION` is 8, not 7 since it is taken from an abbreviated git commit hash. The value can be found in a jar file link on an Assets section for each releases.
### Mohist
A [Mohist](https://github.com/MohistMC/Mohist) server can be used with
-e TYPE=MOHIST
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
-e VERSION=1.16.5 -e MOHIST_BUILD=374
### Catserver
A [Catserver](http://catserver.moe/) type server can be used with
-e TYPE=CATSERVER
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored

View File

@@ -6,7 +6,7 @@ Enable SpongeVanilla server mode by adding a `-e TYPE=SPONGEVANILLA` to your com
By default the container will run the latest `STABLE` version.
If you want to run a specific version, you can add `-e SPONGEVERSION=1.11.2-6.1.0-BETA-19` to your command-line.
Beware that current [Sponge](https://www.spongepowered.org) `STABLE` versions for Minecraft 1.12 require using [the Java 8 tag](../versions/java.md):
Beware that current [Sponge](https://www.spongepowered.org) `STABLE` versions for Minecraft 1.12 require using [the Java 8 tag](../../versions/java.md):
``` shell
docker run -d -v /path/on/host:/data -e TYPE=SPONGEVANILLA \
@@ -37,7 +37,7 @@ Configuration options with defaults:
!!! note
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.fandom.com/wiki/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
## Crucible
@@ -48,3 +48,21 @@ Configuration options with defaults:
- `CRUCIBLE_RELEASE`=latest
Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
## Custom
To use a custom server jar or class files, set `TYPE` to "CUSTOM" and continue with one of the following options:
The custom jar to be used can be set with `CUSTOM_SERVER` as either a URL to download or the path to a file within the container.
Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JAR_EXEC` to "`-cp <classpath> <classname>`" or "`-jar <jar file>`" form, such as
```
-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer
```
!!! note
When using `docker run` make sure to quote the entire value since it has spaces in it, such as
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"

View File

@@ -8,9 +8,9 @@ By default, the container will run the latest build of [Paper server](https://pa
If you are hosting your own copy of Paper you can override the download URL with `PAPER_DOWNLOAD_URL=<url>`.
If you have attached a host directory to the `/data` volume, then you can install plugins via the `plugins` subdirectory. You can also [attach a `/plugins` volume](../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
If you have attached a host directory to the `/data` volume, then you can install plugins via the `plugins` subdirectory. You can also [attach a `/plugins` volume](../../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../mods-and-plugins/index.md#auto-downloading-spigotmcbukkitpapermc-plugins-with-spiget)
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../../mods-and-plugins/spiget.md)
## Alternatives
@@ -57,9 +57,9 @@ By default, the container will run the latest build of [Folia server](https://pa
If you are hosting your own copy of Folia you can override the download URL with `FOLIA_DOWNLOAD_URL=<url>`.
If you have attached a host directory to the `/data` volume, then you can install plugins via the `plugins` subdirectory. You can also [attach a `/plugins` volume](../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
If you have attached a host directory to the `/data` volume, then you can install plugins via the `plugins` subdirectory. You can also [attach a `/plugins` volume](../../mods-and-plugins/index.md#optional-plugins-mods-and-config-attach-points). If you add plugins while the container is running, you'll need to restart it to pick those up.
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../mods-and-plugins/index.md#auto-downloading-spigotmcbukkitpapermc-plugins-with-spiget)
[You can also auto-download plugins using `SPIGET_RESOURCES`.](../../mods-and-plugins/spiget.md)
!!! note
The Folia type inherits from the Paper type. Paper's variables will override the Folia ones.

View File

@@ -24,4 +24,4 @@ docker run -d -v /path/on/host:/data ... \
- Provide the path to a custom launcher jar available to the container with `QUILT_LAUNCHER`, relative to `/data` (such as `-e QUILT_LAUNCHER=quilt-server-custom.jar`)
- Provide the URL to a custom launcher jar with `QUILT_LAUNCHER_URL` (such as `-e QUILT_LAUNCHER_URL=http://HOST/quilt-server-custom.jar`)
See the [Working with mods and plugins](../mods-and-plugins/index.md) section to set up Quilt mods and configuration.
See the [Working with mods and plugins](../../mods-and-plugins/index.md) section to set up Quilt mods and configuration.

View File

@@ -1,5 +1,11 @@
### **OS OPTIONS**
!!! warning
The variables listed on this page are manually documented and may be out-of-date or inaccurate.
All other documentation pages are actively maintained, so please use the search box above to find the desired topic.
### General options
<table>
<thead>
<tr>
@@ -48,7 +54,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
/etc/timezone:/etc/timezone:ro</code>
</td>
<td><code>1G</code></td>
<td><code>UTC</code></td>
<td>⬜️</td>
</tr>
<tr>
@@ -108,7 +114,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tbody>
</table>
### **SERVER**
### Server
<table>
<thead>
@@ -122,7 +128,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<tbody>
<tr>
<td><code>TYPE</code></td>
<td>The server <a href="java/server-types/">type</a></td>
<td>The server <a href="../types-and-platforms/">type</a></td>
<td><code>VANILLA</code></td>
<td>⬜️</td>
</tr>
@@ -260,7 +266,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tr>
<tr>
<td><code>MODE</code></td>
<td>Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the <a href="http://minecraft.gamepedia.com/Game_mode#Game_modes">standard numerical values</a> or the shortcut values:<br />
<td>Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the <a href="http://minecraft.wiki/Game_mode#Game_modes">standard numerical values</a> or the shortcut values:<br />
<ul>
<li>creative</li>
<li>survival</li>
@@ -278,14 +284,14 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tr>
<tr>
<td><code>LEVEL_TYPE</code></td>
<td>By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting LEVEL_TYPE to <a href="https://minecraft.fandom.com/wiki/Server.properties#level-type">an expected type listed here</a>.
<td>By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting LEVEL_TYPE to <a href="https://minecraft.wiki/w/Server.properties#level-type">an expected type listed here</a>.
</td>
<td><code>minecraft:default</code></td>
<td>⬜️</td>
</tr>
<tr>
<td><code>GENERATOR_SETTINGS</code></td>
<td>For some of the level types, <code>GENERATOR_SETTINGS</code> can be used to further customize the world generation <a href="https://minecraft.fandom.com/wiki/Server.properties#generator-settings">as described here</a>.</td>
<td>For some of the level types, <code>GENERATOR_SETTINGS</code> can be used to further customize the world generation <a href="https://minecraft.wiki/w/Server.properties#generator-settings">as described here</a>.</td>
<td><code></code></td>
<td>⬜️</td>
</tr>
@@ -448,7 +454,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tbody>
</table>
### **CUSTOM RESOURCE PACK**
### Custom resource pack
<table>
<thead>
@@ -481,7 +487,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tbody>
</table>
### **WHITELIST**
### Whitelist
<table>
<thead>
@@ -520,7 +526,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tbody>
</table>
### **RCON**
### RCON
<table>
<thead>
@@ -541,7 +547,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<tr>
<td><code>RCON_PASSWORD</code></td>
<td>You <strong>MUST</strong> change this value</td>
<td><code>minecraft</code></td>
<td><code>Randomly generated</code></td>
<td>✅</td>
</tr>
<tr>
@@ -589,7 +595,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</tbody>
</table>
### **AUTOPAUSE**
### Auto-Pause
!!! note
@@ -652,7 +658,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
### **AUTOSTOP**
### Auto-Stop
!!! note
@@ -702,11 +708,11 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
</table>
### **CURSEFORGE**
### CurseForge
!!! note
A CurseForge API key is required to use a CurseForge type server. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable CF_API_KEY
!!! tip
Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
<table>
<thead>

View File

@@ -4,26 +4,35 @@
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
When using the image `itzg/minecraft-server` without a tag, the `latest` image tag is implied from the table below. To use a different version of Java, please use an alternate tag to run your Minecraft server container.
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
| Tag name | Java version | Linux | JVM Type | Architecture |
|-------------------|--------------|--------|-------------|-------------------|
| latest | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java8 | 8 | Alpine | Hotspot | amd64 |
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
| java8-multiarch | 8 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
| java11 | 11 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java11-jdk | 11 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
| java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
| java17-openj9 | 17 | Debian | OpenJ9 | amd64 |
| java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 |
| java17-alpine | 17 | Alpine | Hotspot | amd64 |
| java20-alpine | 19 | Alpine | Hotspot | amd64 |
| java20 | 19 | Ubuntu | Hotspot | amd64,arm64 |
```
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader
cannot be cast to class java.net.URLClassLoader
```
When using the image `itzg/minecraft-server` without a tag, the `latest` image tag is implied from the table below. To use a different version of Java, please use an alternate tag to run your Minecraft server container. The `stable` tag is similar to `latest`; however, it tracks [the most recent repository release/tag](https://github.com/itzg/docker-minecraft-server/releases/latest).
| Tag name | Java version | Linux | JVM Type | Architecture |
|------------------|--------------|--------|----------------|-------------------|
| latest | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| stable | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java8 | 8 | Alpine | Hotspot | amd64 |
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
| java8-multiarch | 8 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
| java11 | 11 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java11-jdk | 11 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
| java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
| java17-jdk | 17 | Ubuntu | Hotspot+JDK | amd64,arm64,armv7 |
| java17-openj9 | 17 | Debian | OpenJ9 | amd64 |
| java17-graalvm | 17 | Oracle | Oracle GraalVM | amd64,arm64 |
| java17-alpine | 17 | Alpine | Hotspot | amd64 |
| java21-alpine | 21 | Alpine | Hotspot | amd64 |
| java21 | 21 | Ubuntu | Hotspot | amd64,arm64 |
| java21-graalvm | 21 | Oracle | Oracle GraalVM | amd64,arm64 |
For example, to use Java version 8 on any supported architecture:
@@ -45,3 +54,5 @@ The following image tags have been deprecated and are no longer receiving update
- openj9-nightly
- multiarch-latest
- java16/java16-openj9
- java17-graalvm-ce
- java20-graalvm, java20, java20-alpine

View File

@@ -2,7 +2,8 @@ To use a different Minecraft version, pass the `VERSION` environment variable (c
- LATEST (the default)
- SNAPSHOT
- or a specific version, such as "1.7.9"
- a specific version, such as "1.7.9"
- or an alpha and beta version, such as "b1.7.3" (server download might not exist)
For example, to use the latest snapshot:

4
examples/.gitignore vendored
View File

@@ -1,2 +1,4 @@
data/
modpacks/
modpacks/
.env
downloads/

View File

@@ -0,0 +1,37 @@
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# from .env
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7
# CF_FILENAME_MATCHER: 1.2.2
CF_OVERRIDES_EXCLUSIONS: |
mods/iris*.jar
mods/sodium*.jar
MEMORY: 4G
ports:
- "25565:25565"
volumes:
- mc-data:/data
- ./downloads:/downloads
# Manually download the following and put into the 'downloads' directory next to this compose file
#
# Mod Filename Download page
# =========================== ========================================= ====================================================================================
# Fish of Thieves [Fabric 1.20.1] Fish of Thieves v3.0.3 https://www.curseforge.com/minecraft/mc-mods/fish-of-thieves/files/4958329
# Only Hammers [FORGE/FABRIC] OnlyHammers-1.20.1-0.6-Fabric https://www.curseforge.com/minecraft/mc-mods/only-hammers-forge-fabric/files/4832068
# Sprinklerz sprinklerz-0.5_fabric.jar https://www.curseforge.com/minecraft/mc-mods/sprinklerz/files/4835664
# Frog Legs (Fabric/Forge) FrogLegs-v2.0.0-1.20.1-Fabric.jar https://www.curseforge.com/minecraft/mc-mods/froglegs/files/4917818
# TrimsEffects [FABRIC] TrimsEffects - MC 1.20.X - 1.1.0 https://www.curseforge.com/minecraft/mc-mods/trimseffects/files/4954156
# Display Case Display Case-fabric-1.20-1.0.8.jar https://www.curseforge.com/minecraft/mc-mods/displaycase/files/4921333
# Structory: Towers Structory Towers 1.20.4 v1.0.6 https://www.curseforge.com/minecraft/mc-mods/structory-towers/files/4937875
# Packet Fixer Packet Fixer Fabric 1.2.1 https://www.curseforge.com/minecraft/mc-mods/packet-fixer/files/4884316
# Perfect Plushies Perfect Plushies 1.9.0 [Fabric] https://www.curseforge.com/minecraft/mc-mods/perfect-plushies/files/4985767
# Structory Structory 1.20.2 v1.3.4 https://www.curseforge.com/minecraft/mc-mods/structory/files/4937872
volumes:
mc-data: {}

View File

@@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
@@ -15,7 +15,7 @@ services:
MEMORY: 4G
volumes:
- mc-data:/data
- ./downloads:/downloads
- ../downloads:/downloads
# Since Docker's default volume driver creates volumes owned by root, this
# init container will change ownership to match final UID of mc service, above
init-filebrowser:
@@ -29,12 +29,16 @@ services:
filebrowser:
image: filebrowser/filebrowser
depends_on:
- init-filebrowser
init-filebrowser:
condition: service_completed_successfully
user: "1000:1000"
environment:
FB_DATABASE: /database/filebrowser.db
volumes:
# Default FB_ROOT is /srv
# In this example, the left-side needs to be the same as /data volume of mc service
- mc-data:/srv
- filebrowser-db:/database
- ./filebrowser.json:/.filebrowser.json
ports:
- "25580:80"

View File

@@ -0,0 +1,22 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server
ports:
- "25565:25565"
environment:
EULA: "true"
MOD_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9
# Optional: select a specific version/file
#CF_FILENAME_MATCHER: "0.2.34"
MEMORY: 4G
volumes:
- mc-data:/data
- ./downloads:/downloads
volumes:
mc-data: {}

View File

@@ -0,0 +1,21 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: better-mc-fabric-bmc1
CF_FILENAME_MATCHER: v18.5
MEMORY: 4G
volumes:
- mc:/data
- ../downloads:/downloads
ports:
- "25565:25565"
volumes:
mc: {}

View File

@@ -0,0 +1,17 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: FORGE
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
VERSION: 1.19.2
CURSEFORGE_FILES: |
geckolib
aquaculture
naturalist
ports:
- "25565:25565"

View File

@@ -2,12 +2,12 @@ version: "3"
services:
mc:
image: ${IMAGE:-itzg/minecraft-server}
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: FABRIC
ports:
- 25565:25565
- "25565:25565"
volumes:
- fabric:/data

View File

@@ -0,0 +1,22 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
restart: unless-stopped
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data
ngrok:
image: shkoliar/ngrok:latest
ports:
- 4551:4551
environment:
- PARAMS=tcp -region=us -authtoken=YourAuthTokenHere mc:25565

View File

@@ -10,10 +10,12 @@ services:
environment:
EULA: "TRUE"
TYPE: FABRIC
MODS_FORGEAPI_PROJECTIDS: 433175
MODS_FORGEAPI_KEY: ${MODS_FORGEAPI_KEY}
MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES: "TRUE"
REMOVE_OLD_FORGEAPI_MODS: "TRUE"
MEMORY: "2G"
CURSEFORGE_FILES: |
fabric-api
chunky-pregenerator
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
# This is versus '|' that will leaving with two empty strings at top and bottom.
RCON_CMDS_STARTUP: |-

1
examples/downloads/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.jar

View File

@@ -0,0 +1,16 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: "PAPER"
PLUGINS: |
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
ports:
- "25565:25565"
- "19132:19132/udp"
volumes:
- ./data:/data

View File

@@ -19,6 +19,7 @@ spec:
containers:
- name: mc
image: itzg/minecraft-server
imagePullPolicy: Always
env:
- name: EULA
value: "TRUE"

View File

@@ -9,16 +9,15 @@ services:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: MODRINTH
MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
MOD_PLATFORM: MODRINTH
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
# or for auto-upgrading to latest
# MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
# or just cobblemon-fabric or 5FFgwNNP
# and could replace version URL with
# MODRINTH_VERSION: nvrqJg44
# MODRINTH_VERSION: 1.3.2
# MODRINTH_VERSION: "Cobblemon [Fabric] 1.3.2"
SETUP_ONLY: "true"
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data

View File

@@ -2,7 +2,7 @@ version: "3"
services:
mc:
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: PAPER

View File

@@ -10,7 +10,7 @@ services:
MODS_FILE: /extras/mods.txt
REMOVE_OLD_MODS: "true"
ports:
- 25565:25565
- "25565:25565"
volumes:
- data:/data
- ./mods.txt:/extras/mods.txt:ro

View File

@@ -706,5 +706,5 @@ update-client-command-list: true
register-command-list-data: true
# If LuckPerms should attempt to resolve Vanilla command target selectors for LP commands.
# See here for more info: https://minecraft.gamepedia.com/Commands#Target_selectors
# See here for more info: https://minecraft.wiki/Commands#Target_selectors
resolve-command-selectors: false

View File

@@ -0,0 +1,14 @@
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: NEOFORGE
VERSION: latest
NEOFORGE_VERSION: beta
ports:
- "25565:25565"
volumes:
- mc:/data
volumes:
mc: {}

View File

@@ -7,14 +7,14 @@ services:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
MOD_PLATFORM: AUTO_CURSEFORGE
# CF_API_KEY=... must be set in .env file or as environment variable
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: one-block-modded
# Modpack client zip must be manually downloaded from
# https://www.curseforge.com/minecraft/modpacks/one-block-modded
# due to authors disallowing project distribution
CF_MODPACK_ZIP: /modpacks/Modded+OneBock.zip
CF_MODPACK_ZIP: /modpacks/Modded+OneBlock.zip
CF_SET_LEVEL_FROM: OVERRIDES
DEBUG: "false"
MEMORY: 4G
@@ -23,4 +23,4 @@ services:
- ./modpacks:/modpacks:ro
volumes:
mc-data: {}
mc-data: {}

View File

@@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_SLUG: the-pixelmon-modpack
CF_FILENAME_MATCHER: "9.1.2"

View File

@@ -0,0 +1,15 @@
version: "3"
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
TYPE: QUILT
ports:
- "25565:25565"
volumes:
- data:/data
volumes:
data: {}

View File

@@ -0,0 +1,18 @@
version: "3.8"
services:
mc:
image: itzg/minecraft-server:java8-multiarch
environment:
EULA: true
MOD_PLATFORM: AUTO_CURSEFORGE
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: rlcraft
CF_FILENAME_MATCHER: 2.9.3
CF_FORCE_SYNCHRONIZE: true
MEMORY: 4G
volumes:
- ./data:/data
ports:
- "25565:25565"

View File

@@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_FORCE_SYNCHRONIZE: "true"
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560

View File

@@ -7,7 +7,7 @@ services:
- "25565:25565"
environment:
EULA: "true"
TYPE: AUTO_CURSEFORGE
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: # allocate from https://console.curseforge.com/
CF_SLUG: vault-hunters-1-18-2
CF_FILENAME_MATCHER: "Update-10.0.0"

View File

@@ -62,7 +62,13 @@ do
# Server startup
if mc_server_listening ; then
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_INIT))
logAutopause "MC Server listening for connections - pausing in $AUTOPAUSE_TIMEOUT_INIT seconds"
if [ -e /data/.skip-pause ] ; then
logAutopause "'/data/.skip-pause' file is present - skipping pausing"
else
logAutopause "MC Server listening for connections - pausing in $AUTOPAUSE_TIMEOUT_INIT seconds"
fi
STATE=K
fi
;;
@@ -71,6 +77,9 @@ do
if java_clients_connected ; then
logAutopause "Client connected - waiting for disconnect"
STATE=E
elif [ -e /data/.skip-pause ] ; then
logAutopause "'/data/.skip-pause' file is present - skipping pausing"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutopause "No client connected since startup / knocked - pausing"
@@ -92,6 +101,10 @@ do
if java_clients_connected ; then
logAutopause "Client reconnected - waiting for disconnect"
STATE=E
elif [ -e /data/.skip-pause ] ; then
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_EST))
logAutopause "'/data/.skip-pause' file is present - skipping pausing"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutopause "No client reconnected - pausing"

View File

@@ -28,7 +28,13 @@ do
# Server startup
if mc_server_listening ; then
TIME_THRESH=$(($(current_uptime)+AUTOSTOP_TIMEOUT_INIT))
logAutostop "MC Server listening for connections - stopping in $AUTOSTOP_TIMEOUT_INIT seconds"
if [ -e /data/.skip-stop ] ; then
logAutostop "'/data/.skip-stop' file is present - skipping stopping"
else
logAutostop "MC Server listening for connections - stopping in $AUTOSTOP_TIMEOUT_INIT seconds"
fi
STATE=II
fi
;;
@@ -37,6 +43,9 @@ do
if java_clients_connected ; then
logAutostop "Client connected - waiting for disconnect"
STATE=E
elif [ -e /data/.skip-stop ] ; then
logAutostop "'/data/.skip-stop' file is present - skipping stopping"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client connected since startup - stopping server"
@@ -58,6 +67,10 @@ do
if java_clients_connected ; then
logAutostop "Client reconnected - waiting for disconnect"
STATE=E
elif [ -e /data/.skip-stop ] ; then
TIME_THRESH=$(($(current_uptime)+$AUTOSTOP_TIMEOUT_EST))
logAutostop "'/data/.skip-stop' file is present - skipping stopping"
STATE=E
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client reconnected - stopping"

View File

@@ -4,7 +4,6 @@
"armor-toughness-bar",
"biomeinfo",
"block-drops-jei-addon",
"carry-on",
"cherished-worlds",
"controlling",
"ctm",
@@ -12,11 +11,15 @@
"defensive-measures",
"ding",
"dynamiclights-reforged",
"embeddium",
"enchantment-descriptions",
"entity-texture-features-fabric",
"entityculling",
"extreme-sound-muffler",
"ignitioncoil",
"inmisaddon",
"irisshaders",
"iris-flywheel-compat",
"just-enough-harvestcraft",
"just-enough-resources-jer",
"legendary-tooltips",
@@ -39,6 +42,7 @@
"rubidium",
"rubidium-extra",
"skin-layers-3d",
"sodium",
"textrues-rubidium-options",
"thaumic-jei",
"tips",

View File

@@ -0,0 +1,58 @@
{
"motd": {"env": "MOTD"},
"gamemode": {"env": "MODE"},
"difficulty": {"env": "DIFFICULTY"},
"white-list": {"env": "WHITELIST_PROP"},
"enforce-whitelist": {"env": "ENFORCE_WHITELIST"},
"level-type": {"env": "LEVEL_TYPE"},
"server-name": {"env": "SERVER_NAME"},
"server-ip": {"env": "SERVER_IP"},
"server-port": {"env": "SERVER_PORT"},
"allow-nether": {"env": "ALLOW_NETHER"},
"announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"},
"enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"},
"spawn-animals": {"env": "SPAWN_ANIMALS"},
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
"spawn-npcs": {"env": "SPAWN_NPCS"},
"spawn-protection": {"env": "SPAWN_PROTECTION"},
"generate-structures": {"env": "GENERATE_STRUCTURES"},
"view-distance": {"env": "VIEW_DISTANCE"},
"hardcore": {"env": "HARDCORE"},
"snooper-enabled": {"env": "SNOOPER_ENABLED"},
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
"force-gamemode": {"env": "FORCE_GAMEMODE"},
"max-tick-time": {"env": "MAX_TICK_TIME"},
"enable-query": {"env": "ENABLE_QUERY"},
"query.port": {"env": "QUERY_PORT"},
"enable-rcon": {"env": "ENABLE_RCON"},
"rcon.password": {"env": "RCON_PASSWORD"},
"rcon.port": {"env": "RCON_PORT"},
"max-players": {"env": "MAX_PLAYERS"},
"max-world-size": {"env": "MAX_WORLD_SIZE"},
"level-name": {"env": "LEVEL"},
"level-seed": {"env": "SEED"},
"pvp": {"env": "PVP"},
"generator-settings": {"env": "GENERATOR_SETTINGS"},
"online-mode": {"env": "ONLINE_MODE"},
"allow-flight": {"env": "ALLOW_FLIGHT"},
"resource-pack": {"env": "RESOURCE_PACK"},
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
"player-idle-timeout": {"env": "PLAYER_IDLE_TIMEOUT"},
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
"enable-jmx-monitoring": {"env": "ENABLE_JMX"},
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
"enable-status": {"env": "ENABLE_STATUS"},
"entity-broadcast-range-percentage": {"env": "ENTITY_BROADCAST_RANGE_PERCENTAGE"},
"function-permission-level": {"env": "FUNCTION_PERMISSION_LEVEL"},
"network-compression-threshold": {"env": "NETWORK_COMPRESSION_THRESHOLD"},
"op-permission-level": {"env": "OP_PERMISSION_LEVEL"},
"prevent-proxy-connections": {"env": "PREVENT_PROXY_CONNECTIONS"},
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
"simulation-distance": {"env": "SIMULATION_DISTANCE"},
"previews-chat": {"env": "PREVIEWS_CHAT"},
"enforce-secure-profile": {"env": "ENFORCE_SECURE_PROFILE"},
"initial-enabled-packs": {"env": "INITIAL_ENABLED_PACKS"},
"initial-disabled-packs": {"env": "INITIAL_DISABLED_PACKS"}
}

View File

@@ -1,3 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- statefulset.yml
- service.yml

View File

@@ -1,13 +1,12 @@
---
site_name: Minecraft Server on Docker (Java Edition)
site_url: https://docker-minecraft-server.readthedocs.io/
site_url: https://docker-minecraft-server.readthedocs.io/en/latest/
site_description: Documentation for Minecraft Server on Docker
repo_url: https://github.com/itzg/docker-minecraft-server
edit_uri: blob/master/docs/
theme:
name: material
features:
- navigation.instant
- navigation.tracking
- navigation.tabs
- navigation.tabs.sticky
@@ -54,9 +53,6 @@ copyright: Copyright &copy; itzg 2023.
plugins:
- search
- autorefs
- literate-nav:
nav_file: README.md
implicit_index: true
- mkdocstrings:
handlers:
python:
@@ -68,8 +64,11 @@ plugins:
show_signature_annotations: true
# https://github.com/ultrabug/mkdocs-static-i18n
- i18n:
default_language: en
languages:
en:
- locale: en
name: English
build: true
default: true
- literate-nav:
nav_file: README.md
implicit_index: true

1
notes/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/*.bkp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

93
notes/rbac-processing.mmd Normal file
View File

@@ -0,0 +1,93 @@
[Scia Reto](https://sciareto.org) mind map
> __version__=`1.1`,showJumps=`true`
---
# RBAC processing
## inputs
### whitelist
#### command or space limited
##### uuid
##### username
### ops
#### username
#### uuid
### whitelist file
#### url?
##### yes
###### download
##### no
###### copy
### override whitelist?
#### yes
##### replace all with given input list
#### no
##### append only
## format
### version \< 1\.7\.6?
#### yes
##### text file listing usernames
###### white\-list\.txt
###### ops\.txt
#### no
> leftSide=`true`
##### json file
###### array of objects
####### name
######## can be any string, even an empty one
####### uuid
> leftSide=`true`
######## username to UUID API
- LINK
<pre>https://wiki.vg/Mojang_API#Username_to_UUID</pre>
######## needs to be "dashed" UUID syntax
> leftSide=`true`
####### ops?
######## yes
######### also includes
########## level
########### integer, usually a 4
########## bypassesPlayerLimit
########### boolean

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -8,20 +8,14 @@
: "${GID:=1000}"
umask 0002
chmod g+w /data
if isTrue "${ENABLE_RCON:-true}" && ! [ -v RCON_PASSWORD ] && ! [ -v RCON_PASSWORD_FILE ]; then
RCON_PASSWORD=$(openssl rand -hex 12)
export RCON_PASSWORD
fi
# Remove from previous run and do this as elevated user since file used to be created before demoting
rm -f "$HOME/.rcon-cli.env"
if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
runAsUser=minecraft
runAsGroup=minecraft
# For rcon-cli access running via exec, which by default is running as root
echo "password=${RCON_PASSWORD}" > "$HOME/.rcon-cli.env"
if [[ -v UID ]]; then
if [[ $UID != 0 ]]; then
if [[ $UID != $(id -u minecraft) ]]; then

View File

@@ -15,11 +15,9 @@ IFS=$'\n\t'
: "${RCON_CMDS_FIRST_CONNECT:=}"
: "${RCON_CMDS_LAST_DISCONNECT:=}"
: "${RCON_CMDS_PERIOD:=10}"
: "${RCON_PASSWORD_FILE:=}"
: "${ENABLE_RCON:=true}"
: "${RCON_PASSWORD:=minecraft}"
: "${RCON_PORT:=25575}"
export ENABLE_RCON RCON_PASSWORD RCON_PORT
export ENABLE_RCON RCON_PORT
: "${MEMORY=1G}"
: "${INIT_MEMORY=${MEMORY}}"
@@ -49,6 +47,45 @@ if [ ! -e /data/eula.txt ]; then
writeEula
fi
if isTrue "${DEBUG_MEMORY:-false}"; then
log "Memory usage and availability (in MB)"
uname -a
free -m
fi
##########################################
# Setup RCON password
if isTrue "${ENABLE_RCON:-true}"; then
if [[ -v RCON_PASSWORD_FILE ]]; then
if [ ! -e "${RCON_PASSWORD_FILE}" ]; then
log ""
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
log "Please ensure your configuration."
log "If you are using Docker Secrets feature, please check this for further information: "
log " https://docs.docker.com/engine/swarm/secrets"
log ""
exit 1
else
RCON_PASSWORD=$(cat "${RCON_PASSWORD_FILE}")
export RCON_PASSWORD
fi
elif ! [[ -v RCON_PASSWORD ]]; then
RCON_PASSWORD=$(openssl rand -hex 12)
export RCON_PASSWORD
fi
# For rcon-cli access running via exec, which by default is running as root
echo "password=${RCON_PASSWORD}" > "$HOME/.rcon-cli.env"
echo "password: \"${RCON_PASSWORD}\"" > "$HOME/.rcon-cli.yaml"
else
rm -f "$HOME/.rcon-cli.env" "$HOME/.rcon-cli.yaml"
fi
##########################################
# Auto-pause/stop
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
log "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
exit 1
@@ -67,25 +104,6 @@ if [[ $PROXY ]]; then
sleep 5
fi
if [[ $RCON_PASSWORD_FILE ]]; then
log ""
if [ ! -e ${RCON_PASSWORD_FILE} ]; then
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
log "Please ensure your configuration."
log "If you are using Docker Secrets feature, please check this for further information: "
log " https://docs.docker.com/engine/swarm/secrets"
log ""
exit 1
else
RCON_PASSWORD=$(cat ${RCON_PASSWORD_FILE})
export RCON_PASSWORD
fi
log ""
fi
# For rcon-cli access
echo "password=${RCON_PASSWORD}" > "$HOME/.rcon-cli.env"
function fixJavaPath() {
# Some Docker management UIs grab all the image declared variables and present them for configuration.
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
@@ -105,38 +123,16 @@ function fixJavaPath() {
fi
}
if ! fixJavaPath; then
log "ERROR: could not locate path that contains java"
exit 1
fi
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
case "X$VERSION" in
X|XLATEST|Xlatest)
if ! VANILLA_VERSION=$(get --json-path '$.latest.release' "$VERSIONS_JSON"); then
log "ERROR: version lookup failed: $VANILLA_VERSION"
exit 1
fi
;;
XSNAPSHOT|Xsnapshot)
if ! VANILLA_VERSION=$(get --json-path '$.latest.snapshot' "$VERSIONS_JSON"); then
log "ERROR: version lookup failed: $VANILLA_VERSION"
exit 1
fi
;;
*)
VANILLA_VERSION=$VERSION
;;
esac
export VANILLA_VERSION
MAJOR_VANILLA_VERSION=$(get_major_version "$VANILLA_VERSION")
export MAJOR_VANILLA_VERSION
log "Resolved version given ${VERSION} into ${VANILLA_VERSION} and major version ${MAJOR_VANILLA_VERSION}"
cd /data || exit 1
export ORIGINAL_TYPE=${TYPE^^}
export DECLARED_TYPE=${TYPE^^}
export DECLARED_VERSION="$VERSION"
if isTrue "${ENABLE_AUTOPAUSE}"; then
"${SCRIPTS:-/}start-autopause"
@@ -158,12 +154,36 @@ then
"${SCRIPTS:-/}start-rconcmds"
fi
if versionLessThan 1.7; then
echo "
MC_HEALTH_EXTRA_ARGS=(
--use-server-list-ping
)
" > /data/.mc-health.env
: "${MOD_PLATFORM:=}"
case "${TYPE^^}" in
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA)
MOD_PLATFORM="$TYPE"
;;
esac
if [[ $MOD_PLATFORM ]]; then
case "${MOD_PLATFORM^^}" in
FTB|CURSEFORGE)
exec "${SCRIPTS:-/}start-deployCF" "$@"
;;
FTBA)
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
;;
AUTO_CURSEFORGE)
exec "${SCRIPTS:-/}start-deployAutoCF" "$@"
;;
MODRINTH)
exec "${SCRIPTS:-/}start-deployModrinth" "$@"
;;
*)
log "ERROR; Invalid MOD_PLATFORM: '$MOD_PLATFORM'"
exit 1
;;
esac
fi
log "Resolving type given ${TYPE}"
@@ -181,10 +201,13 @@ case "${TYPE^^}" in
;;
FORGE)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployForge" "$@"
;;
NEOFORGE|NEOFORGED)
exec "${SCRIPTS:-/}start-deployNeoForge" "$@"
;;
FABRIC)
exec "${SCRIPTS:-/}start-deployFabric" "$@"
;;
@@ -193,25 +216,6 @@ case "${TYPE^^}" in
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
;;
FTBA)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
;;
FTB|CURSEFORGE)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployCF" "$@"
;;
AUTO_CURSEFORGE)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployAutoCF" "$@"
;;
MODRINTH)
exec "${SCRIPTS:-/}start-deployModrinth" "$@"
;;
VANILLA)
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
;;
@@ -230,6 +234,16 @@ case "${TYPE^^}" in
exec "${SCRIPTS:-/}start-deployMagma" "$@"
;;
MAGMA_MAINTAINED)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployMagmaMaintained" "$@"
;;
KETTING)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployKetting" "$@"
;;
MOHIST)
evaluateJavaCompatibilityForForge
exec "${SCRIPTS:-/}start-deployMohist" "$@"
@@ -257,20 +271,14 @@ case "${TYPE^^}" in
;;
CRUCIBLE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
log " since some mods require Java 8"
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
log " can be fixed with java8"
log "**********************************************************************"
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
;;
*)
log "Invalid type: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
log " CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
log " MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH, CANYON, LIMBO, CRUCIBLE"
log "ERROR: Invalid TYPE: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
log " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
log " CANYON, LIMBO, CRUCIBLE"
exit 1
;;

View File

@@ -15,6 +15,7 @@ set -eu
: "${CF_FORCE_INCLUDE_MODS:=}"
: "${CF_SET_LEVEL_FROM:=}" # --set-level-from
: "${CF_OVERRIDES_SKIP_EXISTING:=false}" # --overrides-skip-existing
: "${CF_OVERRIDES_EXCLUSIONS:=}" # --overrides-exclusions
: "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}"
: "${CF_MODPACK_MANIFEST:=}"
@@ -43,6 +44,9 @@ fi
if [[ ${CF_SET_LEVEL_FROM} ]]; then
args+=(--set-level-from="$CF_SET_LEVEL_FROM")
fi
if [[ ${CF_OVERRIDES_EXCLUSIONS} ]]; then
args+=(--overrides-exclusions="$CF_OVERRIDES_EXCLUSIONS")
fi
args+=(
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
@@ -66,13 +70,11 @@ if ! mc-image-helper install-curseforge "${args[@]}"; then
exit 1
fi
# grab SERVER, FAMILY and export it
# grab SERVER, TYPE, VERSION and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
# grab the version resolved from modpack
VANILLA_VERSION="$VERSION"
export VANILLA_VERSION
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -1,6 +1,7 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
set -e
@@ -20,7 +21,7 @@ function buildSpigotFromSource {
logn ''
curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
java $jvmOpts -jar /data/temp/BuildTools.jar --rev $VANILLA_VERSION 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; log "done"
java $jvmOpts -jar /data/temp/BuildTools.jar --rev "$VERSION" 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; log "done"
case ${TYPE^^} in
SPIGOT)
@@ -60,14 +61,14 @@ function downloadSpigot {
esac
if [[ ${VERSION^^} = LATEST ]]; then
VANILLA_VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]')
VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]')
fi
if [[ -z $downloadUrl ]]; then
if versionLessThan 1.16.5 || ([[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VANILLA_VERSION} = "1.16.5" ]]); then
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
if versionLessThan 1.16.5 || ([[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]]); then
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
else
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
fi
fi
@@ -108,15 +109,16 @@ EOF
function setServerVar {
case "$TYPE" in
*BUKKIT|*bukkit)
export SERVER=craftbukkit_server-${VANILLA_VERSION}.jar
export SERVER=craftbukkit_server-${VERSION}.jar
;;
*)
export SERVER=spigot_server-${VANILLA_VERSION}.jar
export SERVER=spigot_server-${VERSION}.jar
;;
esac
}
if isTrue "$BUILD_SPIGOT_FROM_SOURCE" || isTrue "$BUILD_FROM_SOURCE"; then
resolveVersion
setServerVar
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
buildSpigotFromSource

View File

@@ -24,6 +24,11 @@ loadForgeVars() {
isDebugging && set -x
if [[ ${VERSION^^} == LATEST ]]; then
log "WARNING for the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value"
fi
resolveVersion
: "${FTB_BASE_DIR:=${CF_BASE_DIR:-/data/FeedTheBeast}}"
export FTB_BASE_DIR

View File

@@ -29,4 +29,4 @@ fi
export FAMILY=HYBRID
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -6,7 +6,7 @@ set -o pipefail
set -e
isDebugging && set -x
requireVar VANILLA_VERSION
resolveVersion
: "${CRUCIBLE_RELEASE:=latest}"
crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases
@@ -16,14 +16,14 @@ else
crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE}
fi
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VANILLA_VERSION}-.*\.jar/)].browser_download_url" \
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VERSION}-.*\.jar/)].browser_download_url" \
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
exit 1
fi
if [[ $downloadUrl = null ]]; then
log "ERROR: failed to locate Crucible jar for $VANILLA_VERSION from ${CRUCIBLE_RELEASE}"
log "ERROR: failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
exit 1
fi
@@ -57,4 +57,4 @@ fi
export SERVER
export FAMILY=HYBRID
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -1,18 +1,22 @@
#!/bin/bash
: "${CUSTOM_SERVER:=}"
: "${GENERIC_PACK:=}"
: "${CUSTOM_JAR_EXEC:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
if isURL ${CUSTOM_SERVER}; then
filename=$(basename ${CUSTOM_SERVER})
if isURL "${CUSTOM_SERVER}"; then
filename=$(basename "${CUSTOM_SERVER}")
export SERVER=/data/${filename}
if [[ -f ${SERVER} ]] || [ -n "$FORCE_REDOWNLOAD" ]; then
if [[ -f ${SERVER} ]] && ! isTrue "$FORCE_REDOWNLOAD"; then
log "Using previously downloaded jar at ${SERVER}"
else
log "Downloading custom server jar from ${CUSTOM_SERVER} ..."
if ! curl -sSL -o ${SERVER} ${CUSTOM_SERVER}; then
if ! curl -sSL -o "${SERVER}" "${CUSTOM_SERVER}"; then
log "Failed to download from ${CUSTOM_SERVER}"
exit 2
fi
@@ -25,6 +29,9 @@ elif [[ ${GENERIC_PACK} ]]; then
log "Using custom server jar from generic pack at ${CUSTOM_SERVER} ..."
export SERVER=${CUSTOM_SERVER}
elif [[ ${CUSTOM_JAR_EXEC} ]]; then
log "CUSTOM_JAR_EXEC is in use, so \$SERVER will not be set"
else
log "CUSTOM_SERVER is not properly set to a URL or existing jar file"
exit 2
@@ -34,4 +41,4 @@ fi
# Allow for overriding Family on custom for testing.
export FAMILY="${FAMILY:-HYBRID}"
exec ${SCRIPTS:-/}start-setupWorld $@
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -1,5 +1,7 @@
#!/bin/bash
: "${FTB_FORCE_REINSTALL:=false}"
ftbInstallMarker=".ftb-installed"
# shellcheck source=start-utils
@@ -32,7 +34,7 @@ elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
exit 1
fi
if ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
ftbInstaller=/data/ftb-installer
if ! [[ -f "${ftbInstaller}" ]]; then
log "Downloading FTB installer"
@@ -64,6 +66,8 @@ fi
forgeVersion=$(jq -r '.targets|unique[] | select(.name == "forge") | .version' version.json)
fabricVersion=$(jq -r '.targets|unique[] | select(.name == "fabric") | .version' version.json)
mcVersion=$(jq -r '.targets|unique[] | select(.name == "minecraft") | .version' version.json)
VERSION="$mcVersion"
export VERSION
variants=(
"forge-${mcVersion}-${forgeVersion}.jar"

View File

@@ -19,9 +19,10 @@ if [[ $FABRIC_LAUNCHER ]]; then
if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \
--from-local-file="$FABRIC_LAUNCHER"; then
log "ERROR failed to install Fabric launcher from $FABRIC_LAUNCHER"
log "ERROR failed to use provided Fabric launcher"
exit 1
fi
# Custom fabric jar url
elif [[ $FABRIC_LAUNCHER_URL ]]; then
if ! mc-image-helper install-fabric-loader \
@@ -30,19 +31,21 @@ elif [[ $FABRIC_LAUNCHER_URL ]]; then
log "ERROR failed to install Fabric launcher from $FABRIC_LAUNCHER_URL"
exit 1
fi
# Official fabric launcher
else
if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \
--minecraft-version="${VANILLA_VERSION}" \
--minecraft-version="${VERSION}" \
--installer-version="${FABRIC_LAUNCHER_VERSION}" \
--loader-version="${FABRIC_LOADER_VERSION}"; then
log "ERROR failed to install Fabric launcher from $VANILLA_VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
log "ERROR failed to install Fabric launcher given $VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
exit 1
fi
fi
# grab SERVER and export it
# grab SERVER, etc and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"

View File

@@ -8,4 +8,4 @@ if [[ $FOLIABUILD ]]; then
export PAPERBUILD="$FOLIABUILD"
fi
PAPER_PROJECT="folia" PAPER_NAME="FoliaMC" exec ${SCRIPTS:-/}start-deployPaper "$@"
PAPER_PROJECT="folia" PAPER_NAME="FoliaMC" exec "${SCRIPTS:-/}start-deployPaper" "$@"

View File

@@ -7,8 +7,6 @@
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
isDebugging && set -x
# NOTE: VERSION rather than VANILLA_VERSION is specified to allow for latest supported
# Forge version to be selected.
if [[ ${FORGE_INSTALLER} ]]; then
if ! mc-image-helper install-forge \
--output-directory=/data \

31
scripts/start-deployKetting Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
: "${KETTING_VERSION:=}"
: "${KETTING_TAG:=${KETTING_VERSION:0:7}}"
resolveVersion
if ! downloadUrl="https://github.com/kettingpowered/Ketting-1-20-x/releases/download/${KETTING_TAG}/ketting-${VERSION}-${FORGE_VERSION}-${KETTING_VERSION}-server.jar"; then
log "ERROR failed to locate latest Ketting download for ${VERSION}. Is that version supported?"
exit 1
fi
if [[ $downloadUrl == null ]]; then
log "ERROR Ketting does not seem to be available for $VERSION"
exit 1
fi
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Ketting server jar from $downloadUrl"
exit 1
fi
export SERVER
export FAMILY=HYBRID
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -4,10 +4,17 @@
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
: "${VANILLA_VERSION?}"
: "${MAGMA_VERSION:=}"
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VANILLA_VERSION}/latest"); then
log "ERROR failed to locate latest Magma download for ${VANILLA_VERSION}. Is that version supported?"
resolveVersion
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest/${MAGMA_VERSION}"); then
log "ERROR failed to locate latest Magma download for ${VERSION}. Is that version supported?"
exit 1
fi
if [[ $downloadUrl == null ]]; then
log "ERROR Magma does not seem to be available for $VERSION"
exit 1
fi
@@ -19,4 +26,4 @@ fi
export SERVER
export FAMILY=HYBRID
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -0,0 +1,38 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
: "${FORGE_VERSION:=}"
: "${MAGMA_MAINTAINED_TAG:=}"
resolveVersion
if [ -z $MAGMA_MAINTAINED_TAG ]; then
log "ERROR the variable MAGMA_MAINTAINED_TAG is not specified"
exit 1
fi
# Magma-1.12.2/releases/download/88659fb/Magma-1.12.2-88659fb-server.jar
# Magma-1.20.1/releases/download/adec9ce/magma-1.20.1-47.2.17-adec9ce-server.jar
if [[ ${VERSION} = "1.12.2" ]]; then
fileName="Magma-${VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
else
if [ -z $FORGE_VERSION ]; then
log "ERROR the variable FORGE_VERSION is not specified"
exit 1
fi
fileName="magma-${VERSION}-${FORGE_VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
fi
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/${fileName}"
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Magma Maintained server jar from $downloadUrl"
exit 1
fi
export SERVER
export FAMILY=HYBRID
exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -6,18 +6,29 @@ set -eu
resultsFile=/data/.install-modrinth.env
requireVar MODRINTH_PROJECT
: "${MODRINTH_MODPACK:=${MODRINTH_PROJECT:-}}"
: "${MODRINTH_LOADER:=}"
: "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}"
: "${MODRINTH_IGNORE_MISSING_FILES:=}"
: "${MODRINTH_EXCLUDE_FILES:=}"
if [[ ! $MODRINTH_MODPACK ]]; then
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
exit 1
fi
isDebugging && set -x
args=(
--results-file="$resultsFile"
--project="${MODRINTH_PROJECT}"
--project="${MODRINTH_MODPACK}"
--output-directory=/data
)
if [[ $MODRINTH_IGNORE_MISSING_FILES ]]; then
args+=(--ignore-missing-files "$MODRINTH_IGNORE_MISSING_FILES")
fi
case "${VERSION^^}" in
LATEST)
: "${MODRINTH_DEFAULT_VERSION_TYPE:=release}"
@@ -42,19 +53,18 @@ setArg() {
setArg --loader MODRINTH_LOADER
setArg --version MODRINTH_VERSION
setArg --default-version-type MODRINTH_DEFAULT_VERSION_TYPE
setArg --exclude-files MODRINTH_EXCLUDE_FILES
if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then
log "ERROR failed to install Modrinth modpack"
exit 1
fi
# grab SERVER, FAMILY and export it
# grab SERVER, TYPE, VERSION and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
# grab the version resolved from modpack
VANILLA_VERSION="$VERSION"
export VANILLA_VERSION
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -6,14 +6,14 @@ set -o pipefail
set -e
isDebugging && set -x
requireVar VANILLA_VERSION
resolveVersion
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
mohistJobs=https://ci.codemc.io/job/MohistMC/job/
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
mohistJob=${mohistJobs}Mohist-${VERSION}/
if ! get --exists "${mohistJob}"; then
log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}"
log "ERROR: mohist builds do not exist for ${VERSION}"
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
log " and set VERSION accordingly"
exit 1
@@ -25,7 +25,7 @@ buildRelPath=$(
baseName=$(basename "${buildRelPath}")
if [[ ${baseName} != *-server.jar* ]]; then
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
log "ERROR: mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
log " and set VERSION accordingly"
exit 1
@@ -40,4 +40,4 @@ fi
export FAMILY=HYBRID
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
exec "${SCRIPTS:-/}start-spiget" "$@"

Some files were not shown because too many files have changed in this diff Show More