Cloud-native application developers frequently require local Amazon S3-compatible object storage to test bucket operations, file uploads, and pre-signed URL generation. Rather than configuring complex persistent containers or installing permanent services on your primary workstation, Windows Sandbox in Windows 11 provides a sterile, disposable environment. By authoring custom Windows Sandbox XML (.wsb) configuration files, you can launch a fully functional MinIO S3 server automatically upon boot.
Prerequisites and Environment Architecture
Windows Sandbox provides an isolated Hyper-V-based guest operating system that resets completely upon closure. To provision a local MinIO instance seamlessly, our architecture consists of two files residing on the host machine:
- A mapped host folder: A directory containing the portable
minio.exebinary and initial bucket setup scripts. - A sandbox configuration file: An XML file with the
.wsbextension specifying folder mounting and an automatedLogonCommand.
Authoring the Windows Sandbox WSB Configuration
Create a dedicated folder on your host machine, for instance C:\SandboxMinIO. Download the Windows MinIO server binary into this folder and create the configuration file LaunchMinIO.wsb with the following XML structure:
<Configuration>
<VGpu>Default</VGpu>
<Networking>Default</Networking>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\SandboxMinIO</HostFolder>
<SandboxFolder>C:\MinIOFiles</SandboxFolder>
<ReadOnly>false</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -NoExit -File C:\MinIOFiles\Start-MinIO.ps1</Command>
</LogonCommand>
</Configuration>
Authoring the Automated Startup Script
Inside the same host directory (C:\SandboxMinIO), create the provisioning script named Start-MinIO.ps1:
# Establish MinIO environment credentials
$env:MINIO_ROOT_USER = "admin"
$env:MINIO_ROOT_PASSWORD = "StrongSandboxSecretKey123"
# Define storage data path inside the sandbox
$StoragePath = "C:\MinIOFiles\Data"
if (-not (Test-Path $StoragePath)) {
New-Item -Path $StoragePath -ItemType Directory -Force | Out-Null
}
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " Starting Disposable MinIO S3 Server... " -ForegroundColor Green
Write-Host " Endpoint API: http://127.0.0.1:9000 " -ForegroundColor Yellow
Write-Host " Web Console: http://127.0.0.1:9001 " -ForegroundColor Yellow
Write-Host " Root User: admin " -ForegroundColor Gray
Write-Host "==========================================" -ForegroundColor Cyan
# Launch MinIO server with custom API and Console ports
& "C:\MinIOFiles\minio.exe" server $StoragePath --address ":9000" --console-address ":9001"
Launching and Validating the Sandbox S3 Environment
Double-click the LaunchMinIO.wsb file on your Windows 11 host. Windows Sandbox initialises, mounts the mapped folder, and automatically triggers the PowerShell script inside an elevated console window.
Within seconds, the MinIO server starts listening on ports 9000 (S3 API) and 9001 (Web Console). Open Microsoft Edge inside the sandbox or access the web console from your application test scripts. You can upload objects, configure bucket access policies, and test AWS SDK integrations in absolute isolation. When testing concludes, closing the sandbox window instantly eradicates all temporary objects, log files, and server processes without leaving remnants on your host operating system.