Repository navigation
CDN
By default players download the pack from PackLoader's built-in web server. If you cannot open a port, or want faster downloads, serve the pack from a CDN or any web host instead.
cdn:
mode: none # none | url | upload
public-url: "https://cdn.example.com/packs/{file}"
upload-url: "https://storage.example.com/packs/{file}"
upload-method: PUT # PUT | POST
upload-headers:
AccessKey: "your-storage-api-key"The built-in server is used.
Players download from public-url. You upload plugins/PackLoader/generated/pack-<sha1>.zip to that address yourself. PackLoader does not check that the file exists.
After every successful build, PackLoader uploads the pack to upload-url with an HTTP PUT (or POST) request and the headers from upload-headers. Players download from public-url.
If the upload fails (network error or a non-2xx response), PackLoader logs a warning and falls back to the built-in server, so players still get a pack.
| Placeholder | Value |
|---|---|
{hash} |
SHA-1 of the pack (40 hex characters) |
{file} |
File name, pack-<sha1>.zip
|
Use one of them in the URLs. Every pack version then has its own address, so CDN caches never serve an outdated pack.
public-url: "https://cdn.example.com/packs/{file}"
upload-url: "https://storage.example.com/packs/{file}"The request is a plain HTTP upload of the zip with Content-Type: application/zip, so it works with services that accept a raw PUT:
-
Bunny Storage:
upload-url: https://storage.bunnycdn.com/<zone>/{file}, headerAccessKey: <password>,public-url= your pull-zone URL +/{file}. -
WebDAV:
upload-url= the WebDAV file URL, headerAuthorization: Basic <base64 user:pass>. -
S3 / R2 with pre-signed URLs: pre-signed URLs expire and cannot contain
{hash}signed in advance, so they are not suitable for automatic uploads. Use a service that accepts a static API key header, or put a small upload endpoint in front. -
Your own server: any endpoint that accepts
PUTand serves the file afterwards.
Service-specific details change; check your provider's documentation for the exact upload URL and authentication.
- Uploads run on a background thread and the server is never blocked.
-
upload-urlandupload-headersare hidden in/packloader diag. - Keep
config.ymlprivate; it contains your API key in plain text. - Use HTTPS URLs for the CDN. Minecraft clients download from whatever
public-urlyou give.
After /packloader reload the console shows either Pack uploaded to CDN (HTTP 201 ...) or a warning with the reason for the fallback. /packloader url prints the URL players use.
PackLoader by Natan/Ezra - All Rights Reserved - github.com/natan307
PackLoader
Features
Reference