You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/types-and-platforms/mod-platforms/auto-curseforge.md
+50-26Lines changed: 50 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,33 +7,33 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
7
7
!!! warning "CurseForge API key usage"
8
8
9
9
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`.
10
-
10
+
11
11
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.
12
-
12
+
13
13
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
If you use `docker run` you will need to make sure to use single quotes:
19
-
19
+
20
20
```shell
21
21
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
22
22
```
23
-
24
-
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). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**.
25
-
23
+
24
+
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). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**.
25
+
26
26
```title=".env"
27
27
CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
28
28
```
29
-
29
+
30
30
The variable should to be referenced from the compose file, such as:
31
-
31
+
32
32
```yaml title="compose.yaml"
33
33
environment:
34
34
CF_API_KEY: ${CF_API_KEY}
35
35
```
36
-
36
+
37
37
The .env file should be placed in the same directory as your compose file like so:
38
38
39
39
```
@@ -42,20 +42,20 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
42
42
├── compose.yaml
43
43
├── data/
44
44
```
45
-
45
+
46
46
To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
47
47
```shell
48
48
docker run --env-file=.env itzg/minecraft-server
49
49
```
50
-
50
+
51
51
Alternately you can use [docker secrets](https://docs.docker.com/compose/how-tos/use-secrets/) with a `CF_API_KEY_FILE` environment variable:
52
52
```yaml title="compose.yaml"
53
53
service:
54
54
environment:
55
55
CF_API_KEY_FILE: /run/secrets/cf_api_key
56
56
secrets:
57
57
- cf_api_key
58
-
58
+
59
59
secrets:
60
60
cf_api_key:
61
61
file: cf_api_key.secret
@@ -64,14 +64,14 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
64
64
65
65
!!! note
66
66
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md).
67
-
67
+
68
68
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.
69
69
70
70
## Usage
71
71
72
72
Use one of the following to specify the modpack to install:
73
73
74
-
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".
74
+
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".
75
75
76
76
!!! example "Using CF_PAGE_URL"
77
77
@@ -83,7 +83,7 @@ Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
89
89
```
@@ -102,7 +102,7 @@ Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the
102
102
CF_API_KEY: ${CF_API_KEY}
103
103
CF_SLUG: all-the-mods-8
104
104
```
105
-
105
+
106
106
```title="Using docker run"
107
107
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
108
108
```
@@ -137,6 +137,30 @@ The following examples all refer to version 1.0.7 of ATM8:
137
137
138
138
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
139
139
140
+
### Custom modloader versions
141
+
142
+
By default, AUTO_CURSEFORGE will use the exact modloader version declared by the modpack. However, you can override the modloader version by setting the following environment variable:
143
+
144
+
- `CF_MOD_LOADER_VERSION`: Override the mod loader version (e.g., `43.4.22`)
145
+
146
+
!!! example "Override mod loader version"
147
+
148
+
```yaml
149
+
environment:
150
+
MODPACK_PLATFORM: AUTO_CURSEFORGE
151
+
CF_API_KEY: ${CF_API_KEY}
152
+
CF_SLUG: all-the-mods-8
153
+
CF_MOD_LOADER_VERSION: "43.4.22"
154
+
```
155
+
156
+
```title="Using docker run"
157
+
docker run -e CF_MOD_LOADER_VERSION=43.4.22 -e CF_SLUG=my-fabric-pack ...
158
+
```
159
+
160
+
!!! warning "Compatibility"
161
+
162
+
Using a custom modloader version that differs significantly from what the modpack was designed for may cause compatibility issues. Use this feature carefully and test thoroughly.
163
+
140
164
## Manual Downloads
141
165
142
166
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.
@@ -148,12 +172,12 @@ For mod, modpacks, and world files that are not allowed for automated download,
148
172
!!! example
149
173
150
174
Assuming Docker compose is being used:
151
-
175
+
152
176
1. Create a directory next to the `compose.yaml` file. The name doesn't matter, but "downloads" is the common convention
153
177
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
154
178
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
155
179
4. Re-run `docker compose up -d` to apply the changes
156
-
180
+
157
181
```yaml
158
182
volumes:
159
183
./downloads:/downloads
@@ -182,7 +206,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
182
206
```
183
207
184
208
where an exported manifest file should look like:
185
-
209
+
186
210
```json
187
211
{
188
212
"minecraft": {
@@ -222,7 +246,7 @@ Mods can be excluded by passing a comma or space delimited list of **project** s
222
246
223
247
!!! note
224
248
`CF_FORCE_INCLUDE_MODS`will not download additional mods.
225
-
249
+
226
250
For additional mods, refer to [the `CURSEFORGE_FILES` variable](../../mods-and-plugins/curseforge-files.md).
227
251
228
252
A mod's project ID can be obtained from the right hand side of the project page:
@@ -238,7 +262,7 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"
238
262
!!! tip "Embedded comments"
239
263
240
264
Comments can be embedded in the list using the `#` character.
241
-
265
+
242
266
```yaml
243
267
CF_EXCLUDE_MODS: |
244
268
# Exclude client-side mods not published correctly
@@ -248,7 +272,7 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"
248
272
249
273
## Excluding Overrides Files
250
274
251
-
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.
275
+
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.
252
276
253
277
### Ant-style paths
254
278
@@ -261,15 +285,15 @@ Ant-style paths can include the following globbing/wildcard symbols:
261
285
| `?` | Matches one character |
262
286
263
287
!!! example
264
-
288
+
265
289
The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides
0 commit comments