Skip to content

CLI tool to automatically prefill a Lancache with Steam games

License

Notifications You must be signed in to change notification settings

TurboSlayer/steam-lancache-prefill

 
 

Repository files navigation

steam-lancache-prefill

Automatically fills a Lancache with games from Steam, so that subsequent downloads for the same content will be served from the Lancache, improving speeds and reducing load on your internet connection.

Inspired by the lancache-autofill project for Steam games.


Features

  • Select apps to prefill through an interactive menu.
  • Supports login with Steam Guard, and Steam Guard Mobile Authenticator
  • No installation required! A completely self-contained, portable application.
  • Multi-platform support (Windows, Linux, MacOS)
  • High-performance! Downloads are significantly faster than using Steam, and can easily reach 10gbit/s or more!
  • Game install writes no data to disk, so there is no need to have enough free space available. This also means no unnecessary wear-and-tear to SSDs!
  • Completely implemented from scratch, has no dependency on SteamCMD!
  • No Steam API key required!

Initial Setup

  1. Download the latest version for your OS from the Releases page.
  2. Unzip to a directory of your choice
  3. (Linux / OSX Only) Give the downloaded executable permissions to be run with chmod +x .\SteamPrefill
  4. (Windows Only) Configure your terminal to use Unicode, for much nicer looking UI output.
    • Unicode on Windows is not enabled by default, however adding the following to your Powershell profile.ps1 will enable it.
    • [console]::InputEncoding = [console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
    • If you do not already have a Powershell profile created, follow this step-by-step guide https://lazyadmin.nl/powershell/powershell-profile/

Getting Started

Selecting what to prefill

Prior to prefilling for the first time, you will have to decide which apps should be prefilled. This will be done using an interactive menu, for selecting what to prefill from all of your currently owned apps. To display the interactive menu, run the following command

.\SteamPrefill.exe select-apps

Once logged into Steam, all of your currently owned apps will be displayed for selection. Navigating using the arrow keys, select any apps that you are interested in prefilling with space. Once you are satisfied with your selections, save them with enter.

Interactive app selection

These selections will be saved permanently, and can be freely updated at any time by simply rerunning select-apps again at any time.

Initial prefill

Now that a prefill app list has been created, we can now move onto our initial prefill run by using

.\SteamPrefill.exe prefill

The prefill command will automatically pickup the prefill app list, and begin downloading each app. During the initial run, it is likely that the Lancache is empty, so download speeds should be expected to be around your internet line speed (in the below example, a 1gbit connection was used). Once the prefill has completed, the Lancache should be fully ready to serve clients cached data.

Initial Prefill

Updating previously prefilled apps

Updating any previously prefilled apps can be done by simply re-running the prefill command, which will use same prefill app list as before.

SteamPrefill keeps track of which version of each app was previously prefilled, and will only re-download if there is a newer version of the app available. Any apps that are currently up to date, will simply be skipped.

Prefilled app up to date

However, if there is a newer version of an app that is available, then SteamPrefill will re-download the app. Due to how Lancache works, this subsequent run should complete much faster than the initial prefill (example below used a 10gbit connection). Any data that was previously downloaded, will be retrieved from the Lancache, while any new data from the update will be retreived from the internet.

Prefill run when app has an update

Detailed Command Usage

prefill

--all

Downloads all owned apps, useful for prefilling a completely empty cache.

-f|--force

By default, SteamPrefill will keep track of the most recently prefilled apps, and will only attempt to prefill if there it determines there a newer version available for download. This default behavior will work best for most use cases, as no time will be wasted re-downloading files that have been previously prefilled.

Running with the flag --force will override this behavior, and instead will always run the prefill, re-downloading all files for the specified product. This flag may be useful for diagnostics, or benchmarking network performance.

Need Help?

If you are running into any issues, feel free to open up a Github issue on this repository.

You can also find us at the LanCache.NET Discord.

Other Docs

External Docs

About

CLI tool to automatically prefill a Lancache with Steam games

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 98.0%
  • PowerShell 2.0%