How to Configure Windows Sandbox Local EdgeDB Graph-Relational Database via XML in Windows 11

Modern full-stack web applications frequently turn to graph-relational databases—such as EdgeDB (now Gel)—to bridge the conceptual gap between relational SQL databases and graph object models. Testing EdgeDB schema migrations, EdgeQL query sets, and strict type constraints directly on a developer workstation often causes port conflicts (port 5656/10700) and leaves persistent PostgreSQL data clusters on local disks. In Windows 11, Windows Sandbox provides a pristine, isolated testing platform. By authoring custom Windows Sandbox XML (.wsb) configuration files, you can deploy a standalone EdgeDB development server in seconds.

Architecture of the Disposable EdgeDB Sandbox

Windows Sandbox provides a disposable, hypervisor-isolated guest environment that resets completely upon termination. To provision an automated EdgeDB instance, the architecture requires:

  • A mapped host folder: A directory containing the portable edgedb.exe CLI binary and schema migration files.
  • A WSB configuration file: An XML blueprint that mounts the mapped directory and initiates the database server automatically via LogonCommand.

Authoring the Windows Sandbox WSB Blueprint

Create a working directory on your host machine, such as C:\SandboxEdgeDB. Download the Windows binary of the EdgeDB CLI into this directory, then create RunEdgeDB.wsb with the following XML code:

<Configuration>
  <VGpu>Default</VGpu>
  <Networking>Default</Networking>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\SandboxEdgeDB</HostFolder>
      <SandboxFolder>C:\EdgeDBFiles</SandboxFolder>
      <ReadOnly>false</ReadOnly>
    </MappedFolder>
  </MappedFolders>
  <LogonCommand>
    <Command>powershell.exe -ExecutionPolicy Bypass -NoExit -File C:\EdgeDBFiles\Start-EdgeDB.ps1</Command>
  </LogonCommand>
</Configuration>

Authoring EdgeDB Startup Script

Inside the mapped host folder (C:\SandboxEdgeDB), create the PowerShell initialization script named Start-EdgeDB.ps1:

Write-Host "=============================================" -ForegroundColor Cyan
Write-Host " Starting EdgeDB Graph-Relational Engine...  " -ForegroundColor Green
Write-Host " EdgeQL Port: 127.0.0.1:5656                 " -ForegroundColor Yellow
Write-Host " Web UI:      http://127.0.0.1:5656/ui       " -ForegroundColor Yellow
Write-Host "=============================================" -ForegroundColor Cyan

# Set environment credentials
$env:EDGEDB_SERVER_TLS_CERT_MODE = "generate_self_signed"
$env:EDGEDB_SERVER_DEFAULT_AUTH_METHOD = "Trust"

# Launch EdgeDB server in dev mode
& "C:\EdgeDBFiles\edgedb.exe" server --bind-address 0.0.0.0 --port 5656 --security=insecure_dev_mode

Running and Validating Queries in the Sandbox

Double-click RunEdgeDB.wsb on your Windows 11 host. Windows Sandbox boots up, mounts the mapped folder, and immediately launches EdgeDB inside an interactive PowerShell window.

The database server binds to port 5656 and serves the embedded EdgeDB Web UI. Open Microsoft Edge inside the sandbox and navigate to http://127.0.0.1:5656/ui to view the visual schema viewer and EdgeQL query runner.

You can execute graph traversal queries, test schema migrations, and benchmark link properties in total isolation. When testing concludes, closing the sandbox window instantly eliminates all database clusters, migration state, and server processes, leaving your host workstation completely clean.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.