Skip to main content

🛜 Self hosting

Self hosting serves ZIP files through CraftEngine's built-in HTTP server. Downloads use your server's outbound bandwidth.

Configuration​

Declare each pack under packs. All self packs share the HTTP server configured under self-host.

resource-pack:
packs:
default:
type: self
default: true
storage_path: ./cache/hosted/default/resource_pack.zip

self-host:
ip: auto
port: auto
protocol: http
deny_non_minecraft_request: true
one_time_token: true
strict_validation: false
rate_limiting:
max_bandwidth_per_second: 5_000_000
min_download_speed_per_player: 50_000
qps_per_ip: 5/60

storage_path is the destination ZIP file, relative to plugins/CraftEngine or an absolute path. It defaults to ./cache/hosted/<id>/resource_pack.zip. Uploads are saved directly to this file and loaded again after a restart. For the first upload, run a workflow containing an upload step:

resource-pack:
workflows:
upload_default:
steps:
- type: upload
pack: default
path: ./generated/resource_pack.zip

Add this workflow to the same resource-pack section. Run /ce reload host after changing host settings, or /ce reload after only changing the workflow. Once the ZIP exists, run /ce workflow upload_default.

Field Reference​

Place all server settings below under resource-pack.self-host.

FieldDefaultDescription
ip"auto"IP advertised in download links. "auto" detects the public IP via Cloudflare trace. This does not control the bind address.
port"auto"Port the HTTP server listens on. "auto" shares the Minecraft server port (piggybacks on its Netty pipeline). Set a number (e.g. 8163) for a dedicated port.
url(auto)If set, overrides the auto-generated URL sent to clients. See below. Must start with http:// or https://. Trailing / auto-appended.
protocol"http"Protocol for the auto-generated URL. Ignored when url is set.
deny_non_minecraft_requesttrueRejects requests whose User-Agent doesn't start with Minecraft Java/.
one_time_tokentrueAppends a unique ?token= to each player's download URL. Tokens expire after 1 minute and are single-use.
strict_validationfalseBinds the token to the player's UUID via the X-Minecraft-UUID header. Do not enable on offline-mode servers.
rate_limiting.*—IP-based rate limiting.

When the public address differs from the bind address​

By default, the download URL sent to players is auto-built from ip, port, and protocol:

http://111.222.333.444:8163/download/default

When the internal bind address differs from what players should use — a reverse proxy, a CDN, or VPS NAT where the public IP and port don't match the internal ones — set url to override it:

resource-pack:
self-host:
url: "https://real-public-address/"

This produces https://real-public-address/download/default (with optional ?token=...). Two common scenarios:

Reverse proxy — nginx, Caddy, or HAProxy sits in front, handles TLS, and forwards to the internal HTTP server.

VPS with NAT / port mapping — the server's internal IP and port differ from the public ones (common with cloud providers).

resource-pack:
self-host:
ip: auto
port: 8163
url: "https://real-public-address/"
deny_non_minecraft_request: false
strict_validation: false
caution

The built-in server serves HTTP. HTTPS download URLs require a front-end service, such as a reverse proxy, with TLS and a valid certificate.