How Do I Mount an S3 Bucket on Windows?
You can mount an Amazon S3 bucket as a virtual drive on a Windows server using a free, open-source tool called rclone. This allows you to interact with your S3 bucket like a local drive for file transfer, scripting, and application access.
This guide walks through installing the required components and mounting a bucket using explicit credentials and a bucket-scoped configuration.
Prerequisites
Windows Server with internet access
An S3 bucket
AWS access key and secret key with bucket permissions
PowerShell access
Administrator PowerShell recommended for install steps
Step 1 — Install WinFsp (required for mounting)
WinFsp provides the Windows filesystem driver used by rclone mount.
Run PowerShell as Administrator:
$api = "https://api.github.com/repos/winfsp/winfsp/releases/latest"
$release = Invoke-RestMethod $api
$asset = $release.assets | Where-Object { $_.name -match "winfsp-.*\.msi$" } | Select-Object -First 1
$msi = "$env:TEMP\$($asset.name)"
Invoke-WebRequest $asset.browser_download_url -OutFile $msi
Start-Process msiexec.exe -ArgumentList "/i `"$msi`" /qn /norestart" -WaitReboot after installation:
Restart-ComputerStep 2 — Download and Install rclone
$zipUrl = "https://downloads.rclone.org/rclone-current-windows-amd64.zip"
$zip = "$env:TEMP\rclone.zip"
$dst = "C:\rclone"
Invoke-WebRequest $zipUrl -OutFile $zip
Expand-Archive $zip -DestinationPath $env:TEMP -Force
$exe = Get-ChildItem $env:TEMP -Recurse -Filter rclone.exe | Select-Object -First 1
New-Item -ItemType Directory -Force -Path $dst | Out-Null
Copy-Item $exe.FullName "$dst\rclone.exe" -Force
$env:Path += ";$dst"
[Environment]::SetEnvironmentVariable("Path",$env:Path,"Machine")Verify:
rclone versionOpen a new PowerShell window if PATH has not refreshed.
Step 3 — Configure rclone S3 Remote
Create a remote using explicit credentials.
$RemoteName = "s3remote"
$Region = "us-east-1"
rclone config create $RemoteName s3 `
provider AWS `
access_key_id YOUR_ACCESS_KEY `
secret_access_key YOUR_SECRET_KEY `
region $Region `
env_auth falseStep 4 — Verify Bucket Access
Always reference the bucket path when testing.
$BucketName = "your-bucket-name"
rclone ls "${RemoteName}:$BucketName" --max-depth 1Successful output confirms connectivity and permissions.
Step 5 — Create Bucket-Scoped Alias Remote
Create an alias remote that points directly to the bucket. This keeps all operations scoped to that bucket.
$AliasName = "s3bucket"
rclone config create $AliasName alias remote "${RemoteName}:$BucketName"Verify:
rclone lsd "${AliasName}:"Step 6 — Create Cache Directory
New-Item -ItemType Directory -Force -Path "C:\rclone-cache" | Out-NullStep 7 — Mount the S3 Bucket as a Drive
Choose an unused drive letter (example: X:).
rclone mount "${AliasName}:" X: `
--vfs-cache-mode writes `
--cache-dir C:\rclone-cache `
--dir-cache-time 10m `
--poll-interval 1m `
--attr-timeout 1m `
--volname "S3Mount" `
--log-level INFO `
--log-file C:\rclone-mount.logAfter the command succeeds, open File Explorer and navigate to the drive letter to view bucket contents.
The mount remains active while the PowerShell window stays open.
Step 8 — Optional: Mount Only a Prefix
To mount a specific folder inside the bucket:
rclone mount "${AliasName}:some/prefix" X: `
--vfs-cache-mode writes `
--cache-dir C:\rclone-cacheStep 9 — Make the Mount Persistent at Startup
Create a scheduled task that mounts the drive at system boot.
$action = New-ScheduledTaskAction -Execute "C:\rclone\rclone.exe" -Argument @"
mount s3bucket: X: --vfs-cache-mode writes --cache-dir C:\rclone-cache --dir-cache-time 10m --poll-interval 1m --attr-timeout 1m --log-level INFO --log-file C:\rclone-mount.log
"@
$trigger = New-ScheduledTaskTrigger -AtStartup
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
Register-ScheduledTask -TaskName "RcloneS3Mount" -Action $action -Trigger $trigger -Principal $principalReboot and confirm the drive appears automatically.