RustNet Chocolatey Package
March 27, 2026 · View on GitHub
This repository contains the Chocolatey package for RustNet, a network monitoring TUI application.
Installation
Step 1: Install Npcap Runtime (Required)
Before installing RustNet, you must install Npcap Runtime for packet capture:
- Download the Npcap installer (e.g.,
npcap-1.84.exe) from https://npcap.com/dist/ - Run the installer
- Important: Select "WinPcap API compatible mode" during installation
Note: Download the Npcap runtime installer, NOT the SDK. The SDK is only needed for building software.
Step 2: Install RustNet
Note: Chocolatey installation commands must be run from an elevated PowerShell or Command Prompt. To open as Administrator:
- Press
Win + Xand select "Windows PowerShell (Admin)" or "Terminal (Admin)" - Or right-click PowerShell/Command Prompt in Start Menu → "Run as Administrator"
# Install from Chocolatey Community Repository
choco install rustnet
# Or install from source
git clone https://github.com/domcyrus/rustnet-chocolatey
cd rustnet-chocolatey
choco pack
choco install rustnet -source . -y
Step 3: Run RustNet
# Run from Command Prompt or PowerShell
rustnet
# Note: Depending on your Npcap installation settings, you may or may not need
# Administrator privileges. If you didn't select the option to restrict packet
# capture to administrators during Npcap installation, RustNet can run with
# normal user privileges.
GeoIP Databases (Optional)
RustNet supports GeoIP lookups to show country codes, city names, and ASN information for remote IPs. This requires a free MaxMind account and the geoipupdate tool:
- Download
geoipupdatefor Windows from https://github.com/maxmind/geoipupdate/releases - Edit
%LOCALAPPDATA%\GeoIP\GeoIP.confwith your MaxMind credentials and set:EditionIDs GeoLite2-City GeoLite2-ASN - Run
geoipupdateto download the databases
Tip:
GeoLite2-Cityis a superset ofGeoLite2-Country— it provides city names and postal codes in addition to country data, so you only need one.
See the GeoIP setup guide for full instructions.
Troubleshooting
"Unable to obtain lock file access" or "Access denied" errors
If you encounter errors about lock file access or "access denied to lib-bad" during installation:
Cause: These errors occur when Chocolatey commands are run without administrator privileges.
Solution:
- Ensure you're running PowerShell/Command Prompt as Administrator (see Step 2 above)
- If you previously had a failed installation, clean up any stale lock files:
# Run as Administrator Remove-Item "C:\ProgramData\chocolatey\lib\*" -Include "*.lock" -Force -ErrorAction SilentlyContinue Remove-Item "C:\ProgramData\chocolatey\lib-bad" -Force -Recurse -ErrorAction SilentlyContinue - Retry the installation with admin privileges
Why admin rights are needed: Chocolatey installs packages to C:\ProgramData\chocolatey\, which is a system-protected directory that requires administrator privileges to modify.
Requirements
- Windows 10/11
- Npcap installed in WinPcap API compatible mode
- Administrator privileges (depending on Npcap configuration)
Package Structure
rustnet-chocolatey/
├── rustnet.nuspec # Package specification
├── tools/
│ ├── chocolateyinstall.ps1 # Installation script
│ └── chocolateyuninstall.ps1 # Uninstallation script
├── .github/workflows/
│ ├── update-package.yml # Automated package updates
│ └── publish-package.yml # Manual publish to Chocolatey
└── README.md
Automated Workflows
This repository includes GitHub Actions workflows that automate package maintenance:
- Automatic Updates: Triggered by the main RustNet release workflow
- Manual Updates: Can be triggered with a specific version
- Publishing: Can publish to Chocolatey Community Repository
See .github/workflows/README.md for details.
Manual Package Update
To manually update to a specific version:
# Trigger via GitHub Actions
gh workflow run update-package.yml -f version=1.0.0
# Update and publish in one step
gh workflow run update-package.yml -f version=1.0.0 -f publish=true
# Or use the GitHub UI: Actions → Update Chocolatey Package → Run workflow
Publishing
The package can be published to Chocolatey in two ways:
- During update: Set
publish=truewhen triggering the update workflow - Separately: Use the publish workflow after updating
Setup for publishing:
- Add
CHOCO_API_KEYto repository secrets - Get your API key from: https://community.chocolatey.org/account
Required Secrets
| Secret | Repository | Purpose |
|---|---|---|
CHOCOLATEY_PAT | domcyrus/rustnet | Trigger updates from main release |
CHOCO_API_KEY | This repo | Publish to Chocolatey Community |
License
Apache License 2.0