Getting Started
Aspire hosting integration for Gluetun, a lightweight VPN client container supporting 30+ providers. Models Gluetun as a first-class Aspire resource and lets other containers route their traffic through the VPN tunnel.
Package
Section titled “Package”| Package | NuGet |
|---|---|
| Aspire AppHost |
Features
Section titled “Features”- First-class Aspire resource — Gluetun VPN container with
NET_ADMINcapability and/dev/net/tundevice access - Container routing — route any container’s traffic through the VPN with a single method call
- VPN provider support — typed configuration for OpenVPN and WireGuard, with support for any Gluetun environment variable
- Aspire parameter integration — use
ParameterResourcefor secrets (private keys, passwords) - Docker Compose publish — routed containers automatically get
network_mode: "service:<vpn>"and their ports are transferred to the Gluetun service
Quick Start
Section titled “Quick Start”-
Install the package into your AppHost project
-
Add a Gluetun VPN container and route other containers through it
var builder = DistributedApplication.CreateBuilder(args);var vpn = builder.AddGluetun("vpn").WithVpnProvider("mullvad").WithWireGuard(builder.AddParameter("wireguard-key", secret: true)).WithServerCountries("US", "Canada");var scraper = builder.AddContainer("scraper", "my-scraper").WithHttpEndpoint(targetPort: 8080);vpn.WithRoutedContainer(scraper);builder.Build().Run();
AI Coding Assistant
Section titled “AI Coding Assistant”An AI skill is available for Shiny Aspire Gluetun to help configure AppHost and VPN routing directly in your IDE.
Claude Code
claude plugin add github:shinyorg/skillsGitHub Copilot — Copy the shiny-aspire skill file into your repository’s custom instructions.
Requirements
Section titled “Requirements”- .NET 10
- .NET Aspire 13.1+