This guide covers setting up Dokploy locally on Windows and deploying applications with internet access.
Install the following before proceeding:
| Software | Download |
|---|---|
| Caddy | caddyserver.com/download |
| Dev Tunnels | winget install Microsoft.devtunnel |
| Docker Desktop | docker.com/products/docker-desktop |
| NSSM | nssm.cc/download |
After downloading Caddy and NSSM, move caddy.exe and nssm.exe to C:\Windows\System32\.
Launch Docker Desktop and wait for it to fully start.
Open PowerShell and run:
docker run -d `
--name dokploy `
--restart unless-stopped `
-p 3000:3000 `
-v /var/run/docker.sock:/var/run/docker.sock `
-v dokploy-data:/app/data `
dokploy/dokploy:latestOpen http://localhost:3000 in your browser and complete the initial setup.
Metabase is an open-source business intelligence tool for creating dashboards and visualizations.
- In Dokploy, click Create Project in the top right
- Enter a project name (e.g., "Analytics")
- Inside your project, click Create Service
- Select Template as the service type
- Browse the template library and select Metabase
- Click Create Service
- Click Deploy
- Go to your Metabase service in Dokploy
- Navigate to Domains
- Add a new domain using the traefik.me format:
product-metabase-rh2s0l-15cda3-172-30-12-90.traefik.me - Save and wait for Traefik to pick up the configuration
Note: traefik.me is a free wildcard DNS service that resolves
*.traefik.meto the IP address embedded in the subdomain.
curl http://product-metabase-rh2s0l-15cda3-172-30-12-90.traefik.meCreate C:\Users\me\Caddyfile:
:3030 {
reverse_proxy http://product-metabase-rh2s0l-15cda3-172-30-12-90.traefik.me {
header_up Host product-metabase-rh2s0l-15cda3-172-30-12-90.traefik.me
}
}
Why
header_up Host? The upstream server checks the Host header for routing. Without this, requests arrive withHost: localhost:3030and return 404.
Run PowerShell as Administrator:
nssm install CaddyIn the GUI that opens:
| Field | Value |
|---|---|
| Path | C:\Windows\System32\caddy.exe |
| Startup directory | C:\Users\me |
| Arguments | run --config C:\Users\me\Caddyfile |
Click Install service, then start it:
nssm start CaddyOpen http://localhost:3030 — you should see Metabase.
Login to Dev Tunnels:
devtunnel user loginCreate a persistent tunnel (requires authentication to access):
devtunnel create
devtunnel port create -p 3030Note the tunnel ID returned (e.g., abc123xyz).
Start hosting:
devtunnel hostThe output will show your public URL:
Hosting port 3030 at https://<tunnel_id>-3030.usw2.devtunnels.ms/
Users must authenticate with the same Microsoft/GitHub account to access the tunnel.
Run PowerShell as Administrator:
$action = New-ScheduledTaskAction -Execute "devtunnel" -Argument "host"
$trigger = New-ScheduledTaskTrigger -AtStartup
$trigger.Delay = "PT30S"
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -RunLevel Highest -LogonType S4U
Register-ScheduledTask -TaskName "DevTunnel-Dokploy-3030" -Action $action -Trigger $trigger -Settings $settings -Principal $principalTest the task:
Start-ScheduledTask -TaskName "DevTunnel-Dokploy-3030"nssm status Caddy # Check status
nssm start Caddy # Start
nssm stop Caddy # Stop
nssm restart Caddy # Restart
caddy reload --config C:\Users\me\Caddyfile # Reload config
caddy validate --config C:\Users\me\Caddyfile # Validate configdevtunnel list # List tunnels
devtunnel host # Start hosting
devtunnel user show # Check login status- Verify the upstream URL works directly in browser
- Ensure
header_up Hostis configured correctly - Check that Traefik picked up the domain in Dokploy
This is expected. Users need to authenticate with a Microsoft or GitHub account that has been granted access, or use the same account that created the tunnel.
netstat -ano | findstr :3030Kill the process or choose a different port.
| App | Local URL | Traefik Domain | Public URL |
|---|---|---|---|
| Metabase | http://localhost:3030 | product-metabase-rh2s0l-15cda3-172-30-12-90.traefik.me | https://<tunnel_id>-3030.devtunnels.ms |