Self-hosted build agents give you full control over your CI/CD pipeline — custom software dependencies, faster builds with no queue times, and complete privacy for your build artifacts. A Windows VPS is the ideal platform for running Windows-based build agents, especially for .NET, C++, and Unity projects that require Windows-specific tooling.
This guide covers setting up self-hosted agents for both Azure DevOps Pipelines and GitHub Actions on a Windows VPS.
Why Use a Self-Hosted Windows Agent?
- No queue wait: Microsoft-hosted agents can have 30-60 minute queue times during peak hours
- Custom software: Pre-install SDKs, tools, and dependencies once instead of installing every build
- Cost savings: One VPS (5-40/mo) can replace 2000+ minutes/month of hosted agents
- Build speed: Dedicated CPU means consistent build times, no noisy neighbors
- Security: Your source code and artifacts never leave your VPS
See the best Windows VPS providers for development to find a suitable plan for your build server.
Hardware Recommendations
| Build Type | Min Specs | Recommended |
|---|---|---|
| .NET / C# (small projects) | 2 vCPU, 4 GB RAM, 50 GB SSD | 4 vCPU, 8 GB RAM |
| .NET / C# (large solutions) | 4 vCPU, 8 GB RAM, 100 GB SSD | 8 vCPU, 16 GB RAM |
| C++ / Unreal Engine | 4 vCPU, 16 GB RAM, 200 GB SSD | 8 vCPU, 32 GB RAM |
| Unity builds | 4 vCPU, 8 GB RAM, 100 GB SSD | 8 vCPU, 16 GB RAM |
Setting Up an Azure DevOps Self-Hosted Agent
1. RDP into your Windows VPS. 2. Create a dedicated service account (not your admin account) for the agent. 3. Download the agent from Azure DevOps: Organization Settings → Agent Pools → Default → New Agent → Windows. 4. Extract the agent zip to C:gents. 5. Run config.cmd and enter your Azure DevOps URL, PAT token, and agent pool name. 6. Run run.cmd to test, then configure as a Windows service: .config.cmd --runasservice.
Setting Up a GitHub Actions Self-Hosted Runner
1. RDP into your Windows VPS. 2. Go to your GitHub repo → Settings → Actions → Runners → New self-hosted runner → Windows. 3. Download and extract the runner package. 4. Run config.cmd --url https://github.com/YOUR_ORG --token YOUR_TOKEN. 5. Run run.cmd to verify, then install as a service: .svc.ps1 install. 6. Add a .github/workflows/build.yml file with runs-on: self-hosted to use your runner.
Pre-Installing Build Dependencies
The main advantage of self-hosted agents is pre-installing dependencies. Run these once on your VPS and every build uses them instantly:
- .NET SDKs:
winget install Microsoft.DotNet.SDK.8 - Visual Studio Build Tools: Install via Visual Studio Installer with the workloads you need (ASP.NET, Desktop, UWP)
- Node.js, Python, Git: Install via winget or chocolatey
- SQL Server LocalDB or Developer Edition for integration tests
Security Best Practices
- Run the agent under a dedicated service account with minimal privileges
- Enable Windows Firewall to restrict inbound traffic to RDP/SSH only
- Use Windows Defender or a third-party AV to scan build outputs
- Rotate PAT tokens and registration tokens regularly
- Separate production and staging build pools on different VPS instances
A well-configured self-hosted Windows build agent pays for itself in developer productivity within weeks. Start with a 4 vCPU / 8 GB RAM VPS — you can always scale up as your pipeline grows. Find the right Windows VPS for your build infrastructure.



