What is resource caching and how to use it
Resource caching is a feature for FiveM servers hosted on a VibeGAMES VPS or dedicated server. When it is enabled, the files that players download when they join your server are served from our global CDN instead of directly from your machine.
Why enable it?
- Faster join times. Players download your resources from the CDN location closest to them, which speeds up joining, especially for players who live far away from your server.
- DDoS protection. The resource download endpoint of a FiveM server is a popular attack vector. With caching enabled, download traffic goes to our CDN instead of hitting your server directly.
Enabling resource caching
- Log in to your dashboard and open the VPS or dedicated server that runs your FiveM server.
- Open the Details tab and find the caching section. On a VPS it is called FiveM resource caching, on a dedicated server FiveM resource cache (CDN).
- Turn the switch on.
Updating your server.cfg
Turning the switch on is only half of the setup. Your FXServer also needs to be told to send players to the CDN, which takes three config lines. The dashboard shows these lines with your personal values already filled in:
- On a VPS the FiveM resource caching snippet card appears on the same Details tab.
- On a dedicated server, click Show snippet in the FiveM resource cache (CDN) card.
Copy the snippet and paste it at the bottom of your server.cfg. Do not change or remove any of your existing endpoints. The snippet looks like this:
fileserver_add ".*" "http://cdn.fivem-server.net/YOUR-SERVICE-ID/files"
adhesive_cdnKey "YOUR-SERVICE-ID"
endpoint_add_tcp "0.0.0.0:9999"
What the lines do:
fileserver_add ".*" ...tells FXServer to point clients at the CDN for all resource downloads.adhesive_cdnKeyis the key our CDN uses to identify your server. It is your service ID, prefilled in the dashboard snippet.endpoint_add_tcp "0.0.0.0:9999"opens the endpoint our CDN uses to fetch the original files from your server.
Restart your FiveM server after saving the file. From then on, players joining your server download resources through the CDN.
Do I ever need to clear the cache?
Normally not. The cache is invalidated automatically whenever a resource changes on your server, so players always receive the latest version of your files. The Clear cache button in the dashboard forces the CDN to drop all cached copies and fetch everything again from your server. It is only kept for backwards compatibility and will be removed in a future release.
Turning it off
Flip the switch off in the dashboard, remove the three snippet lines from your server.cfg and restart your server. Players will then download resources directly from your server again.
¿Esto resolvió tu problema?
¿Sigues atascado?
Nuestro equipo de soporte conoce de verdad los juegos que alojamos. Abre un ticket y lo resolvemos juntos.
Abrir un ticket