Caching Forged Alliance Forever downloads

In additional to this post here about caching steam games

I’ve run a few LAN parties where downloading updates from the FAF servers can take a while. This is no fault of the FAF servers, just i’ll have up to 10 people hitting the same mod and we all sit there watching progress bars as it downloads.

solution : modify the steamcache container image to also cache downloads for FAF
added benefit : takes load off the faf servers

If you want to give it a go, all you need to do;
(you’ll need a bit of experience with docker / containers)

  • download and run steamcache/steamcache container. This is effectively a reverse proxy running nginx. You can download the image form here https://hub.docker.com/r/steamcache/steamcache/
  • modify /etc/nginx/sites-available/steamcache.conf file in the container. Add the following directly below the existing “location /depot/” entry (for steam) to cache all /faf/ URI requests;
location /faf/ {
try_files $uri @mirror;
access_log /data/logs/access.log steamcache-local;
}
  • redirect local DNS queries for content.faforever.com to your local server (above). I entered a host entry on my local DNS (pfsense : resolver)
  • profit

There is a built-in script /scripts/watchlog.sh that displays access.log and highlights in green any cache HITS (why i’ve left logging classified as “steamcache-local”)