CDN Setup

From alt:V Wiki
Jump to navigation Jump to search

CDN (Content delivery Network) is a function to speedup the download of the ressources for connecting users and to relive the server. The CDN can be provided with any filehosting server that supports HTTP/HTTPS.
It's working as followed: The client connects to the CDN Server, which provides the resource files for the client. After the download is complete, the client connects to the alt:V Server.

Step-by-Step Tutorial

Example values

In this tutorial following example values are used:

Key Value Description
cdnUrl The url to the cdn server.
Server IP The IP address of the alt:V server.
Server Port 7788 The Port of the alt:V server.

Step-by-Step Example

  1. Add useCdn: true to server.cfg.
  2. Add cdnUrl: to server.cfg.
  3. Start you server with params --host --port 7788 --justpack
  4. Add all generated files from the folder cdn_upload to your CDN Server, the files should be placed in the root of the domain. (You should be abble to access connect.json under
  5. For direct connect use your cdnUrl

Known Bugs

  1. The CDN can't currently follow redirects. So ensure that you don't enforce HTTPS or explicitly connect via HTTPS
  2. If resources have dependencies, they don't get packed correctly with --justpack. You should remove the dependencies from resource.cfg while using --justpack until this Problem is fixed.