MCPSERV.CLUB
Lancache

Lancache

Self-Hosted

Local game download cache for faster, bandwidth‑saving installs

Stale(57)
837stars
0views
Updated Feb 22, 2025
Lancache screenshot 1
1 / 5

Overview

Discover what makes Lancache powerful

Lancache’s *Monolithic* container bundles a full game‑download cache stack into a single Docker image, simplifying deployment for LAN and remote gaming environments. From a technical standpoint it acts as an edge proxy that intercepts HTTP/HTTPS requests to popular game distribution services (Steam, Epic Games Store, GOG, etc.), serves cached assets from local storage, and records cache hit/miss statistics for analysis. The architecture is intentionally lightweight yet modular: the core consists of a high‑performance HTTP/HTTPS reverse proxy (nginx or caddy), a DNS resolver for redirecting clients to the cache, and optional Sniproxy for handling TLS termination. All components communicate over a local network bridge, allowing the container to be positioned at the edge of any LAN or WAN.

Language & Runtime

Configuration Management

Storage

Networking

Overview

Lancache’s Monolithic container bundles a full game‑download cache stack into a single Docker image, simplifying deployment for LAN and remote gaming environments. From a technical standpoint it acts as an edge proxy that intercepts HTTP/HTTPS requests to popular game distribution services (Steam, Epic Games Store, GOG, etc.), serves cached assets from local storage, and records cache hit/miss statistics for analysis. The architecture is intentionally lightweight yet modular: the core consists of a high‑performance HTTP/HTTPS reverse proxy (nginx or caddy), a DNS resolver for redirecting clients to the cache, and optional Sniproxy for handling TLS termination. All components communicate over a local network bridge, allowing the container to be positioned at the edge of any LAN or WAN.

Technical Stack

  • Language & Runtime: The container is built around Go‑compiled binaries for the DNS and Sniproxy services, while the HTTP cache leverages nginx (or caddy) configured via templated conf.d files. The entrypoint script orchestrates service startup.
  • Configuration Management: YAML/JSON files are mounted into /etc/lancache and processed by the entrypoint to generate runtime configs. Environment variables expose key parameters (e.g., cache size, backend URL patterns).
  • Storage: Cached assets are stored on a local filesystem volume (e.g., /mnt/cache). The image supports mounting of external persistent storage via Docker volumes or bind mounts, enabling scaling to petabyte‑scale caches.
  • Networking: A Docker bridge network exposes ports 80, 443, and the DNS port (53). The container can be run in host mode to bind directly to physical NICs, reducing latency for high‑throughput scenarios.

Core Capabilities

  • Transparent Caching: By configuring local DNS to point to the container, all client traffic is automatically routed through Lancache without requiring per‑client configuration.
  • Protocol Support: Handles HTTP, HTTPS, and custom game‑store protocols (e.g., Steam’s steam:// scheme) via URL rewriting rules.
  • Analytics: Exposes a RESTful API (/api/stats) that returns JSON metrics on cache hits, misses, bandwidth savings, and per‑game statistics. Developers can integrate this into monitoring dashboards (Prometheus, Grafana).
  • Health Checks: Built‑in /healthz endpoint for orchestration tools to verify service readiness.

Deployment & Infrastructure

  • Self‑Hosting: The monolithic image can run on any Docker‑enabled host, from a Raspberry Pi to an enterprise server. It requires minimal external dependencies: a network interface, storage volume, and optionally a reverse proxy for HTTPS termination.
  • Scalability: While the container is designed as a single instance, horizontal scaling can be achieved by running multiple replicas behind an upstream load balancer. Each replica shares a common cache storage (e.g., NFS, Ceph) to maintain consistency.
  • Containerization: Docker Hub hosts the image (lancachenet/monolithic), with tags reflecting supported OS bases (Alpine, Debian). The container is stateless except for the mounted cache volume, making it easy to roll back or upgrade.

Integration & Extensibility

  • Plugin Hooks: The configuration templating system allows custom scripts to run before and after service startup, enabling integration with CI/CD pipelines or configuration management tools (Ansible, Terraform).
  • Webhooks: The stats API can trigger webhooks on cache miss thresholds, allowing automated alerts or dynamic scaling actions.
  • Custom Rules: Developers can add custom URL rewrite rules or cache purging policies by editing the templated config files and re‑deploying.

Developer Experience

  • Documentation: The project hosts comprehensive guides on its website, covering deployment, configuration, and advanced usage. API references are available in the docs folder.
  • Community Support: Active forums on r/lanparty and a responsive GitHub issue tracker provide quick assistance. The MIT license removes licensing friction, encouraging modification.
  • Configuration Simplicity: Most settings are exposed via environment variables or simple YAML files, reducing the learning curve for new developers.

Use Cases

  • LAN Parties & Gaming Events: Quickly set up a local cache to reduce external bandwidth usage and speed up game installs for dozens of participants.
  • Remote Game Servers: Deploy at the edge of a data center to serve client downloads from a nearby cache, lowering latency for players worldwide.
  • Enterprise Gaming Departments: Centralize game distribution within an organization, providing consistent asset delivery and detailed usage analytics.

Advantages

  • Performance: Edge caching eliminates round‑trip delays to distant game servers, delivering assets at local network speeds.
  • Flexibility: The monolithic container can be customized for any environment, from small home networks to large enterprise deployments.
  • Licensing & Cost: MIT‑licensed, free of charge, with no vendor lock‑in. Developers can modify the source to fit niche requirements.
  • Ease of Deployment: One Docker image, minimal configuration, and built‑in health checks make it a low‑maintenance solution compared to multi‑component stacks.

Lancache’s monolithic container is thus an attractive choice for developers seeking a turnkey, high‑performance game‑download cache that can be deployed quickly, scaled on demand, and integrated into existing monitoring or orchestration workflows.

Open SourceReady to get started?

Join the community and start self-hosting Lancache today