Skip to content

Set up the cache on your server

Open your cache from CDN & Caching → Manage, then scroll down to the server.cfg configuration block.

server.cfg configuration

  1. Copy config copies the two lines to add
  2. Whitelist required: the 57.130.34.0/24 range to allow at your host
  3. Regenerate (new domain): creates a new cache domain
  4. Origin server: your FiveM server’s public IP and port
  5. Save stores a new server address

Paste the two lines into your server.cfg then restart your server:

fileserver_add ".*" "https://abc123def456.xdpfilter.net/files"
adhesive_cdnKey "CDN-0000AAAA1111"
Line Purpose
fileserver_add ".*" "https://…/files" Tells players to download all resources (.*) from your cache
adhesive_cdnKey "CDN-…" The key that lets the cache fetch files from your server

The cache must be able to fetch files from your server. Allow the 57.130.34.0/24 range in your host’s firewall or anti-DDoS:

  • OVH: Manager → your server → IP → Network Firewall → Allow rule, IPv4, source 57.130.34.0/24, high priority (as for the Reverse Proxy)
  • Linux with ufw: ufw allow from 57.130.34.0/24
  • Other hosts: add an allow rule for this range in their panel

Without this rule, the cache can’t read your resources and players keep downloading from your server.

After the restart, have a player join then look at the dashboard: Data served should go up and the Cache hit ratio should rise as players connect. The Active badge on the server.cfg configuration block confirms the cache is running.

Under Origin server, type the new address (IP:port) then Save. The domain and key stay the same: no need to touch your server.cfg.

Regenerate (new domain) creates a new cache domain. Use it if the old one is targeted by attacks or has leaked. After regenerating, copy the new lines into your server.cfg and restart: the old ones stop working.