Logo
Winget-Repo Documentation

⚙️ Winget-Repo Server Settings Overview

This document describes the configuration options available in the Winget-Repo Server Settings panel.


🔧 Server Settings Table

Name Description
Server Name (Max. 12) Sets the name of your Winget server (max 12 characters). Appears in the UI.
Winget-Client Versions Lists the compatible Winget client versions separated by commas.
Client Authentication Enables client-side authentication for secure access.
DNS Server IP address of the DNS server used for client resolution and authentication.
Domain Suffix The DNS suffix applied to clients during authentication. (e.g. fritz.box)
Enable Terms of Service If enabled, the Winget client will require the user to accept the Terms of Service before interacting with the repo.
Enable Package Store (Internet required) Enables online package store integration (requires internet access).
IP Restriction Restricts access to specific IPv4/IPv6 addresses, ranges, or subnets.
Winget pre-indexed Source If enabled, the WinGet REST source and client authentication will no longer function. Instead, you can add the winget repository in the same way as the official Microsoft WinGet repository.
Use Reverse Proxy (X-Headers) Reads the client's real IP address and domain from the X-Forwarded-For and X-Forwarded-Host headers, which a reverse proxy (e.g. Nginx or Traefik) sets instead of the application receiving them directly.
Use DNS validation with client authentication Allows the client authentication to check your client against the DNS for extra security
Version Overflow Delete Only keep the specified number of most recent versions per package; 0 keeps all versions.
Download package updates daily Requires Package Store. Runs within 30 seconds of first activation, then every 24 hours while the server is running. Downloads matching installer variants from each package's latest existing version.

🛡️ IP Restriction

The IP restriction system validates incoming requests based on the client's IP address. You can define a whitelist using various formats.

Supported Formats

The system is flexible and supports the following notations:

  • Default (No Restriction): * Value: DEFAULT
    • Allows all IP addresses.
  • Single IP Addresses: * Example: 192.168.1.1 or 2001:db8::1
  • IP Ranges (Hyphenated): * Example: 192.168.1.1 - 192.168.1.100
    • Note: Start and end IP must be of the same version (IPv4 or IPv6).
  • CIDR Notation (Subnets): * Example: 10.0.0.0/24 or 2001:db8::/32

Configuration Rules

  • Separators: Use a comma (,) or a semicolon (;) to separate multiple entries.
  • Case Sensitivity: The DEFAULT keyword is case-insensitive.
  • Validation: Any client IP not matching the defined rules will be denied access automatically.

💡 Technical Notes

  • Client Authentication: We strongly recommend enabling this alongside IP restrictions for a multi-layered security approach.
  • Ensure the DNS Server and Domain Suffix match your internal network setup.

🔐 .env File

The .env file contains sensitive values and environment-specific settings. It is read when the server starts.

Name Value Description
SECRET_KEY String Flask secret key used to sign sessions and cookies.
DOWNLOAD_KEY String Key used to encrypt package downloads of the server.
ENCRYPTION_KEY String Key used to encrypt the Pre-Indexed Source.
USE_SSL 'True' or 'False' Decides whether the server runs with HTTPS (True) or plain HTTP (False).

⚠️ Important: Keep the .env file private and never commit it to version control.

🧩 Advanced Settings (settings.py)

These settings are located in settings.py and are intended for advanced setups. In most cases the default values are sufficient.

📁 Paths / Settings

Name Description
URL_PACKAGE_DOWNLOAD Base URL used for package download links. DEFAULT uses the address of the server itself.
PATH_FILES Base directory for all files managed by the server (packages, logos, etc.).
PATH_LOGOS Directory where uploaded package logos are stored.
PATH_CONFIG Directory containing the server configuration (database, SSL certificates, plugins).
PATH_DATABASE Location of the server's SQLite database file.

🔒 Paths Cert

Name Description
CERT_FILE Path to the SSL certificate (cert.pem). Used when USE_SSL='True'.
KEY_FILE Path to the private SSL key (key.pem). Used when USE_SSL='True'.

🛒 Paths Store

Name Description
PATH_WINGET_REPOSITORY Local directory where the downloaded Winget package store data is saved.
PATH_WINGET_REPOSITORY_DB Path to the index.db of the local package store used for package lookups.
URL_WINGET_REPOSITORY Source URL from which the package store data is downloaded (Microsoft Winget CDN).

📦 Pre-Indexed

Name Description
PATH_PREINDEXED_FILES Directory where the generated Pre-Indexed Source files are stored.
PATH_CERTIFICATES Directory containing the certificates used to sign the Pre-Indexed Source.
PATH_PACKER_TOOL Path to the tool used to pack the Pre-Indexed Source. DEFAULT uses the automatically detected tool.
PATH_SIGNING_TOOL Path to the tool used to sign the Pre-Indexed Source. DEFAULT uses the automatically detected tool.

🔌 Plugins

Name Description
PATH_PLUGINS Directory from which server plugins are loaded.

🔄 Repository

Name Description
RELEASE_API_URL GitHub API endpoint used to check for the latest server release.
RELEASES_URL Link to the GitHub releases page of the project.
CONTAINER_URL Link to the container image (GHCR) of the project.

💡 Technical Notes (Advanced)

  • Changes in settings.py and .env require a server restart to take effect.
  • When running in a container, make sure the paths (e.g. Config, Files) are mounted as persistent volumes, otherwise data is lost on updates.
  • SECRET_KEY, DOWNLOAD_KEY and ENCRYPTION_KEY should not be changed after the initial setup, as existing sessions, downloads or Pre-Indexed Sources may become invalid.