Can winget install software on a Windows machine with no internet access? Could another server download packages and serve them locally, like a mirror?
Can winget install packages on a machine without internet access?
Answers
A private winget source by itself is only part of the solution. The package manifest includes an installer location, which may still point to the vendor's internet site. The target needs to be able to reach the installer as well as the source.
For a local mirror setup, you would need to host the installer files somewhere the target can reach and use manifests that point to those local files. You'll also need a way to keep the manifests and installers updated.
Reply to this answer
Take a look at winget download. It can download an installer and dependencies for offline use. You could run it on a connected machine, transfer the downloaded files, then install from those files on the offline machine.
That's a different workflow from asking winget on the target to fetch a package automatically through a mirror, but it may be simpler if you only need a few packages.
Reply to this answer
If the target is allowed to reach the internet through an intermediary, a proxy is another option and winget can be configured to use one. That isn't the same thing as a local mirror, though. It depends on what your network rules allow.
Reply to this answer
One thing to consider before building a repository: winget still runs each application's own installer. Different installer technologies can behave differently, and some packages may show prompts or have outdated versions. Test the packages you plan to deploy rather than assuming they'll all install the same way.
Reply to this answer
If you're not tied to winget, Chocolatey is another package manager worth looking at for this kind of setup. Compare how you'd host and maintain the packages before committing to either approach.
Reply to this answer
Add your answer
Answers are reviewed before publication.
docket_728~unsealed:
That distinction helps. The target can reach the other server, but it can't reach the internet directly.