Quickstart

Get caching in five minutes.

fivemcdn is a pull-through CDN. You point FiveM's resource downloads at us; we fetch each file from your origin once, cache it at Cloudflare's edge, and serve every future request from there.

  1. Create a server. Sign up and add your origin as ip:port — we'll validate it against /info.json and generate your key + endpoint.
  2. Paste the config block (below) into your server.cfg.
  3. Restart your server. That's it — downloads now flow through the CDN. Your dashboard shows the cache-hit rate climbing.
The config block

Just two lines

Your dashboard generates these with your real key and tenant id. That's the whole setup — no firewall, no reverse proxy, no SDK:

server.cfg
# fivemcdn.com — add these 2 lines to server.cfg, then restart your server
fileserver_add ".*" "https://cdn.fivemcdn.com/t/ab12cd34/files"
set adhesive_cdnKey "k9f2Qv7pXn3wLtB8sZ1aRcYd"
fileserver_add
Routes every resource download to your CDN endpoint. Note: the URL must not end with a slash.
adhesive_cdnKey
Forces a single global obfuscation key so cached files are byte-identical for every player. Without it FiveM uses a per-client key and nothing is cacheable.
Optional: lock your origin to Cloudflare (advanced)

Caching works without this. If you want to stop anyone who discovers your origin IP from pulling your paid assets straight from it, add these two lines too. They need FXServer build 10543+ and still require no firewall access.

server.cfg (optional)
# Optional: restrict your file server to Cloudflare's edge only (FXServer build 10543+)
set sv_proxyIPRanges "173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 …"
set sv_httpFileServerProxyOnly true
Cache invalidation

Updates are never served stale.

FiveM has no native cache-busting — a resource can change while its URL stays identical. We solve this with a cache version baked into every edge and R2 key (t/<id>/v<version>/…). When you update a resource, bump the version:

deploy-hook.sh
# Bump the cache version from your deploy pipeline
curl -X POST https://fivemcdn.com/api/tenants/<id>/version \
  -H "Authorization: Bearer <api-key>"

The old version is instantly orphaned; the new one cold-fills once. It's free, automatic, and has no purge rate limits. You can also click Bump version in the dashboard.

Preloading

Warm the edge before players arrive.

On a cold cache, the first joiners after a restart can exceed FiveM's ~2-minute pre-connect window and fail to connect (issue #4009). Preloading fetches your resource tree ahead of time so real players hit a hot cache. Trigger it on demand from the dashboard, or automatically after a version bump.

Preloading is included on every plan — it's a reliability feature, not an upsell.
FAQ

Common questions

Does this work with ESX / QBCore / txAdmin?

Yes — it's framework-agnostic. We sit in front of resource downloads, so no changes to your resources are needed.

What if a file has never been requested and my origin is down?

Cached files keep serving from the edge for up to 30 days. Only never-before-seen files need the origin — and preloading makes those rare.

Do I need to open a firewall port or add IP allowlists?

No. Everything is in server.cfg. The origin lock uses FiveM's built-in convars, so it works even on shared/managed hosting.

Ready to try it?

Start free