With the AccelByte Development Toolkit (ADT) Local Cache Server, studios can add a download cache to ADT Web, which greatly reduces their download needs during development build distribution. It does this by intelligently caching initial downloads of builds, then intercepting further downloads of the same build from S3 and providing them from a local cache instead.
Minimum requirements for ADT Hub Local Cache Server setup:
- Memory: 4 GB
- CPU: 2 cores
- Fast SSD for cache storage (NVMe M.2)
- Fast ethernet network
Before you can set up the ADT Hub local cache server, follow these steps.
- Install Ubuntu/Ubuntu Server >= 20.04. Note that this is not tested with other OS versions yet.
- Install Docker >= v20.10 (API version 1.41).
- Install the Local Cache Installer. Local Cache is an add-on you can request from AccelByte.
- Optional. Prepare a directory for the cache target, which can be a folder or mounted disk drive (e.g
- Optional. Set the permissions of the cache target as
- Set up your firewall to allow the machine to listen to a specific port (e.g
Install the Local Cache Server
There are two ways to install the Local Cache Server: Interactive Mode and Command Line Mode, as described below.
Install the Local Cache Server in interactive mode
To install the Local Cache Server, follow these steps:
Execute the following command:
./local-cache-setup install -i
Complete the requested information.
Cache Retention: how long to keep the cache (default: 12h)
Port: the local cache server port to serve (default: 80)
Number of workers: how many workers to serve (default: 8, usually same as the number of CPU cores)
Cache Mount: The location of your cache directory (default:
none) (optional field)
Namespace: Than namespace of your game.
GameIDs: (optional field)
Cache Retention(12h) :
Number of worker(8) :
Cache Mount() : <CACHE_DIRECTORY> (optional)
Namespace() : <YOUR_NAMESPACE> (required)
GameIDs() : <PRIORITY_GAME_ID> (optional)
Installation will complete.
2021/12/21 15:23:04 prepare docker...
2021/12/21 15:23:04 writing config file...
2021/12/21 15:23:04 copy executable....
2021/12/21 15:23:04 installing service...
2021/12/21 15:23:04 blackbox local cache installed
Install the Local Cache Server in command line mode
To install the Local Cache Server in command line mode, enter these fields and their values on the command line:
-i, --install-dir: Target installation directory, default
-p, --port: Local cache server port to be served
-w, --workerLocal cache server worker
-r, --retentionLocal cache server retention
-c, --cache-mountLocal cache mount directory
./ABYLocalCacheServerSetup install --port 8080 --worker 8 --retention 12h --cache-mount /home/cache
Start the local cache server
The local cache server starts automatically after the installation process is successful.
Check the status of the local cache server
Follow these steps to check the status of the Local Cache Server:
Execute the following:
Make sure the service is running (if it's not running check the install procedure again)
2021/12/23 10:50:49 service is running.
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/nginx.conf.template to /etc/nginx/nginx.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
Check that the local cache server is running
To check if your local cache server is running:
- Log in to ADT Web.
- Click the Settings icon on the top right corner of your display.
- Fill the proxy-cache text field with your Cache Server IP address.
- Click the Verify button. When the IP address is found, a green Verified message displays.
- Click the Save Changes button.
Cache is not working - I tried to download the same binary twice with the same internet speed
- Check your local cache server to ensure it allows user
systemd-journalto rename the file.
- Try giving your local cache server folder 777 permission.
- Change your local cache server folder's owner to something other than the root.
Cannot connect to the local cache server
Check your firewall, make sure it has access to the port that you specified during the installation process.
Download speed is still slow
A number of factors can affect download speed:
- Ensure you have a fast SSD on the server for cache storage.
- Ensure the connection between your computer and the local cache server uses Gigabit Ethernet (1 Gbps).
- Try to increase your memory on the local cache server.