{"id":22820628,"url":"https://github.com/devedse/DeveLanCacheUI_Backend","last_synced_at":"2025-08-10T11:31:38.014Z","repository":{"id":177040988,"uuid":"659862287","full_name":"devedse/DeveLanCacheUI_Backend","owner":"devedse","description":"A UI for Lan Cache","archived":false,"fork":false,"pushed_at":"2024-11-26T09:06:38.000Z","size":8070,"stargazers_count":34,"open_issues_count":10,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-26T10:53:34.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devedse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-28T18:16:08.000Z","updated_at":"2024-11-26T09:06:31.000Z","dependencies_parsed_at":"2024-01-02T13:57:59.861Z","dependency_job_id":"e49b9dc0-1ebd-4109-b696-61a5d5c09d44","html_url":"https://github.com/devedse/DeveLanCacheUI_Backend","commit_stats":null,"previous_names":["devedse/develancacheui_backend"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devedse%2FDeveLanCacheUI_Backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devedse%2FDeveLanCacheUI_Backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devedse%2FDeveLanCacheUI_Backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devedse%2FDeveLanCacheUI_Backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devedse","download_url":"https://codeload.github.com/devedse/DeveLanCacheUI_Backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229406080,"owners_count":18067993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T15:26:50.680Z","updated_at":"2025-08-10T11:31:37.982Z","avatar_url":"https://github.com/devedse.png","language":"C#","funding_links":[],"categories":["C#"],"sub_categories":[],"readme":"- [DeveLanCacheUI\\_Backend](#develancacheui_backend)\n  - [Screenshots](#screenshots)\n  - [Homepage integration](#homepage-integration)\n  - [How to run this](#how-to-run-this)\n    - [Minimal Setup](#minimal-setup)\n    - [Advanced setup](#advanced-setup)\n    - [Actual Steam Automatic Update Integration](#actual-steam-automatic-update-integration)\n    - [Configuration variable explanation](#configuration-variable-explanation)\n  - [Automatic updates](#automatic-updates)\n  - [How it works](#how-it-works)\n  - [Issue: My access.log file is updated but my DeveLanCacheUI\\_Backend isn't reading the new lines](#issue-my-accesslog-file-is-updated-but-my-develancacheui_backend-isnt-reading-the-new-lines)\n  - [Progress / Plans](#progress--plans)\n  - [Related projects](#related-projects)\n  - [Build status](#build-status)\n  - [DockerHub](#dockerhub)\n  - [Code Coverage Status](#code-coverage-status)\n  - [Code Quality Status](#code-quality-status)\n\n# DeveLanCacheUI_Backend\nA UI for [LanCache.NET](https://lancache.net/)\n[![](https://dcbadge.limes.pink/api/server/https://discord.gg/BKnBS4u?style=flat)](https://discord.gg/BKnBS4u)\n\n** Important Upgrade Guide**\n\nAs of version 1.0.57 you need to migrate to a new Docker-Compose.yml. Here's how:\n\n![Screenshot](DockerComposeMigrationGuide.png)\n\nNote: Also add the DNS line if you errors in the container logs that it can't get the manifests due to a 401 unauthorized\n\n## Screenshots\n\nCan show Steam Games that were downloaded / cached:\n![Screenshot](Screenshot_Frontend_1.png)\n\nCan show other Download events:\n![Screenshot](Screenshot_Frontend_2.png)\n\nCan show client / service stats:\n![Screenshot](Screenshot_Frontend_3.png)\n\n## Homepage integration\n\nIt's also possible to integrate DeveLanCacheUI with [Homepage](https://gethomepage.dev/):\n![Screenshot](Screenshot_HomepageWidget.png)\n\n[Learn More](https://gethomepage.dev/widgets/services/develancacheui/)\n\n## How to run this\n\nSteps:\n1. Create/mount the relevant directories\n1. Update the docker-compose.yml with your own URL's / paths. Changing the TZ and LANG only impact the way the container logs. (E.g. 23/04/2023 instead of 04/23/2023)\n1. Run the docker-compose file\n1. Github Sponsor me 5k euro's kthnx\n1. Profit\n\n### Minimal Setup\n\nThis setup is meant to work and change as little configuration values as possible.\nOnly change the host part of the volumes and the DNS.\n\ndocker-compose.yml:\n\n```\nversion: '3'\n\nservices:\n  develancacheui_backend:\n    image: devedse/develancacheui_backend:latest\n    restart: unless-stopped\n    ports:\n      - '7301:80'\n    environment:\n      - TZ=Europe/Amsterdam\n      - LANG=en_GB.UTF-8\n    volumes:\n      - \"/home/pi/dockercomposers/develancacheui/backend:/var/develancacheuidata\"\n      - \"/mnt/mynas/DockerComposers/lancache/logs:/var/develancacheui/lancachelogs:ro\"\n    dns:\n      - 10.88.20.254\n  develancacheui_frontend:\n    image: devedse/develancacheui_frontend:latest\n    restart: unless-stopped\n    ports:\n      - '7302:80'\n    environment:\n      - BACKENDURL=http://10.88.20.2:7301 #iclude http/https here\n      - AllowedHosts=*\n```\n\n### Advanced setup\n\nIt's possible that you want to configure more, here's an example for that.\n\ndocker-compose.yml:\n\n```\nversion: '3'\n\nservices:\n  develancacheui_backend:                           # needs to be named exactly like this if using magic 'reverseproxyapi'\n    image: devedse/develancacheui_backend:latest\n    restart: unless-stopped\n    ports:\n      - '7301:80'\n    environment:\n      - LanCacheLogsDirectory=/var/develancacheui/lancachelogs\n      - DeveLanCacheUIDataDirectory=/var/develancacheuidata\n      - ConnectionStrings__DefaultConnection=Data Source={DeveLanCacheUIDataDirectory}/database/develancacheui.db;\n      - TZ=Europe/Amsterdam\n      - LANG=en_GB.UTF-8\n      - Feature_DirectSteamIntegration=true\n      - Feature_SkipLinesBasedOnBytesRead=true\n      - ExcludedClientIps=192.168.1.12,192.168.1.13\n    volumes:\n      - \"/home/pi/dockercomposers/develancacheui/backend:/var/develancacheuidata\"\n      - \"/mnt/mynas/DockerComposers/lancache/logs:/var/develancacheui/lancachelogs:ro\"\n    dns:\n      - 10.88.20.254\n  develancacheui_frontend:\n    image: devedse/develancacheui_frontend:latest\n    restart: unless-stopped\n    ports:\n      - '7302:80'\n    environment:\n      - BACKENDURL=http://10.88.20.2:7301 #iclude http/https here                           \n      - AllowedHosts=*\n```\n\nNote: You could also configure a Reverse Proxy (Like Nginx Proxy Manager) to handle CORS. This would allow you to remove the following environment variable (See: https://github.com/devedse/DeveLanCacheUI_Backend/issues/49):\n```\n- AllowedHosts=*\n```\n\n### Actual Steam Automatic Update Integration\n\ntpil90 helped me build a feature where the application actually integrates with the Steam API to constantly watch for updated depots. This feature can be activated by adding the following lines to the environment of the backend:\n\n```\nservices:\n  develancacheui_backend:\n    ...\n    environment:\n      - Feature_DirectSteamIntegration=true\n      - Feature_SkipLinesBasedOnBytesRead=true\n    ...\n```\n\nThis should now all works quite neatly, if it doesn't, let me know in a github issue or on the LanCache.NET discord :smile:.\n\n### Configuration variable explanation\n\n**Environment Variables Backend**\n\n| Variable  | Explanation | Default | \n| -- | -- | -- |\n| LanCacheLogsDirectory | The internal folder inside the container the backend tries to look for the lancache log files. Ideally don't touch this. | /var/develancacheui/lancachelogs |\n| DeveLanCacheUIDataDirectory | The internal folder inside the container the backend stores all it's data. Ideally don't touch this. | /var/develancacheuidata |\n| ConnectionStrings__DefaultConnection | The connection string used with SQLite. Ideally don't touch this. | Data Source={DeveLanCacheUIDataDirectory}/database/develancacheui.db; |\n| TZ | Set this to your timezone | ?? |\n| LANG | Set this to your language | ?? |\n| Feature_DirectSteamIntegration | When false, the backend will download a .CSV file with all depot =\u003e steam game mappings (from: https://github.com/devedse/DeveLanCacheUI_SteamDepotFinder_Runner/releases). When true, the tool wil generate this itself / keep it up to date. I would suggest turning this on. | false (for now) |\n| Feature_SkipLinesBasedOnBytesRead | When false, it will re-read through the whole file on startup. When true, it tries to be smart and start reading from where it last left off. I would suggest turning this on. | false (for now) |\n| ExcludedClientIps | A comma separated list of IP addresses to exclude in the downloads pages | |\n\n**Volume Mounts Backend**\n\n| Path  | Explanation | \n| -- | -- |\n| - \"/home/pi/dockercomposers/develancacheui/backend:/var/develancacheuidata\" | Change the part before the `:` to an empty data directory |\n| - \"/mnt/mynas/DockerComposers/lancache/logs:/var/develancacheui/lancachelogs:ro\" | Change the part before the `:` to the log directory for lancache |\n\n**Environment Variables Backend**\n| Variable  | Explanation | Default | \n| -- | -- | -- |\n| AllowedHosts | Sets the HOSTS header for CORS. Leave at * unless you know what you're doing | * |\n| BACKENDURL | The backend url where the frontend connects to. Since this is usually a different domain you need to setup CORS correctly. See *1 | N/A |\n\n\n1.  CORS can be quite hard to setup. So I added a secret magic flag: `BACKENDURL=reverseproxyapi` If you enter this the frontend itself will forward the requests to the backend over the docker internal network. The url is hardcoded to `http://develancacheui_backend:80` so please ensure you leave the servicename exactly like that: `develancacheui_backend`. Else docker won't be able to resolve this.\n\n## Automatic updates\n\nI would strongly suggest setting up https://github.com/containrrr/watchtower for this. It works amazing.\n\n## How it works\n\nDeveLanCacheUI_Backend starts by reading through the whole access.log file generated by LanCache.\nBesides processing the whole existing access.log file, it will also 'watch' the file for new log lines.\nAll log lines that were already processed before are skipped.\nIt parses every line and tries to create \"DownloadEvents\". A download event is an event that starts at a specific point in time and ends.\nDownload events are separated/grouped by a unique identifier: clientIp, service, downloadIdentifier (some unique identifier, e.g. DepotId for Steam. Not all services have this)\nAll new log lines that happen within 5 minutes of the last update of the download event with the same unique identifier will be grouped.\n\nLet's say at 00:00 we start downloading CounterStrike on steam. A unique identifier is made: 192.168.2.123,steam,2347771\nIf a new log entry with the same unique identifier is found, it's searching the db for past event that were updated in the last 5 minutes.\nIf that's the case, this log entry is appended to the existing download event.\n\nThis results in download events being specific instances of a certain client download a certain application/update/game.\n\n## Issue: My access.log file is updated but my DeveLanCacheUI_Backend isn't reading the new lines\n\nSo apparently if the access.log file is in a SMB Share which is mounted in docker (as is the case for me) the DeveLanCacheUI_Backend application takes a READ lock on the share. This apparently lets CIFS decide that no other applications will write to this file which allows it to cache things.\nIf you manually execute the `ls` command in the lancachelogs directory it will in fact start reading the file again.\n\nTo work around this issue you need to add `cache=none` to the CIFS mount in `/etc/fstab`:\n```\n//192.168.2.201/DockerComposers /mnt/mynas/DockerComposers cifs credentials=/home/pi/.mynascredentialssmb,iocharset=utf8,vers=3.0,sec=ntlmssp,cache=none 0 0\n```\n\nReferences:\nhttps://stackoverflow.com/questions/14920591/how-to-disable-caching-in-cifs-samba-on-client-side-in-linux\nhttps://www.samba.org/samba/docs/old/Samba3-HOWTO/locking.html\nhttps://linux.die.net/man/8/mount.cifs\n\n## Progress / Plans\n\n| Task | Progress |\n|:----:|:--------:|\n| Automated Deployments | 100% |\n| Dockerization | 100% |\n| Implement other services besides steam | 80% (I don't show games for other services yet) |\n| Auto refresh | 100% |\n| More data things | 80% (We have stats now) |\n| Dark Theme + Toggle | 100% (A bit jank, but it works) |\n\n## Related projects\n\n| Project | Explanation |\n| -- | -- |\n| [DeveLanCacheUI_Backend](https://github.com/devedse/DeveLanCacheUI_Backend/) | The main project. Contains the readme. |\n| [DeveLanCacheUI_Frontend](https://github.com/devedse/DeveLanCacheUI_Frontend/) | The Frontend. |\n| [DeveLanCacheUI_SteamDepotFinder](https://github.com/devedse/DeveLanCacheUI_SteamDepotFinder) | A tool to generate the mapping for steam depots and games. Kinda deprecated when `Feature_DirectSteamIntegration` is set to true |\n| [DeveLanCacheUI_SteamDepotFinder_Runner](https://github.com/devedse/DeveLanCacheUI_SteamDepotFinder_Runner) | Runs the SteamDepotFinder on a weekly basis. |\n\n## Build status\n\n| GitHubActions Builds |\n|:--------------------:|\n| [![GitHubActions Builds](https://github.com/devedse/DeveLanCacheUI_Backend/workflows/GitHubActionsBuilds/badge.svg)](https://github.com/devedse/DeveLanCacheUI_Backend/actions/workflows/githubactionsbuilds.yml) |\n\n## DockerHub\n\n| Docker Hub |\n|:----------:|\n| [![Docker pulls](https://img.shields.io/docker/v/devedse/develancacheui_backend)](https://hub.docker.com/r/devedse/develancacheui_backend/) |\n\n## Code Coverage Status\n\n| CodeCov |\n|:-------:|\n| [![codecov](https://codecov.io/gh/devedse/DeveLanCacheUI_Backend/branch/master/graph/badge.svg)](https://codecov.io/gh/devedse/DeveLanCacheUI_Backend) |\n\n## Code Quality Status\n\n| SonarQube |\n|:---------:|\n| [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=DeveLanCacheUI_Backend\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=DeveLanCacheUI_Backend) |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevedse%2FDeveLanCacheUI_Backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevedse%2FDeveLanCacheUI_Backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevedse%2FDeveLanCacheUI_Backend/lists"}