The BlackBox Hub Local Cache Server allows studios to add a download cache to BlackBox Hub. This greatly reduces the download needs of a studio 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 the local cache instead.
Before you begin
To set up the BlackBox Hub Local Cache Server you need at least the following:
Memory - 4 GB
CPU - 2 cores
Fast SSD for cache storage (Nvme M.2)
Fast Ethernet network
Before you can set up the BlackBox Hub local cache server, you need to do the following:
Install Ubuntu/Ubuntu Server >= 20.04 (currently not tested with other OS versions)
Install Docker >= v20.10 (API version 1.41)
Install Local Cache Installer (by request from AccelByte)
[Optional ] Prepare a directory for the cache target. This can be a folder or mounted disk drive (e.g /mnt/volume1/cache )
[Optional ]Set the permissions of the cache target as 755
Set up your firewall to allow the machine to listen to a specific port (e.g 8080)
Install the Local Cache Server
There are two ways to install the Local Cache Server; interactive mode and command line mode. The installation steps for both of these are described below.
To make the setup file executable in terminal, you need to run sudo chmod +x local-cache-setup-ubuntu-v1.3.0 by typing it on the command line before starting the installation
Install the Local Cache Server in Interactive Mode
Install the Local Cache Server as follows:
Execute the following command:
./local-cache-setup-ubuntu-v1.3.0 install -i
Complete the required information.
Cache Retention: how long to keep the cache (default: 12h)
Port: the local cache server port to be served (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: the namespace of your game
GameIDs: optional field - this is the id you used during integration with BlackBox.
You do not need to start the Local Cache Server. It starts automatically after the installation process is successful.
Check the status of the Local Cache Server
To check the status of the Local Cache Server:
Execute one of the following:
systemctl status bblocalcache
Make sure the service is running (if it’s not running repeat the install procedure).
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 successfully installed and running
To check if your Local Cache Server is successfully installed and running:
Open BlackBox Hub on your computer.
Click the Settings icon on the top right corner.
Fill the proxy-cache text field with your Local Cache Server IP address.
Click the Verify button. When the IP address is found, a green Verified message displays.
Click the Save Changes button.
Uninstalling a Local Cache Server
You can remove a Local Cache Server using the script provided:
Download the uninstall script by running the following command: