DevPod: Open Source Cloud Development Environments
DevPod is an open source tool from Loft Labs that creates cloud development environments on any infrastructure. Think GitHub Codespaces — a fully-configured development container you can start, stop, and share — but running on your own hardware, your own cloud account, or your local machine.
The key insight: your dev environment is defined in a devcontainer.json file (the same spec VS Code and GitHub Codespaces use), and DevPod makes that file work anywhere.
Why Cloud Dev Environments Matter
The appeal of containerized dev environments is reproducibility. Instead of "works on my machine" becoming "works in this specific version of Node with these system dependencies installed last Thursday", your dev environment is code:
// .devcontainer/devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": ["esbenp.prettier-vscode", "ms-azuretools.vscode-docker"]
}
}
}
New team member? Run devpod up. Switching computers? Run devpod up. Onboarding a contractor? Send them devpod up.
Installing DevPod
macOS:
brew install loft-sh/tap/devpod
Linux:
curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64"
sudo install -c -m 0755 devpod /usr/local/bin
Windows: Download the installer from the DevPod releases page, or use winget:
winget install loft-sh.devpod
Desktop App: DevPod also ships a graphical desktop app (Electron) if you prefer a UI over the CLI. Download from devpod.sh.
Providers: Where DevPod Runs
DevPod's provider system defines where dev environments live. You configure a provider once, then all your workspaces use it.
Docker (Default — Local Development)
devpod provider add docker
devpod use provider docker
This is exactly what it sounds like — Docker on your local machine. DevPod manages containers with dev container spec support. This replaces the VS Code Remote Containers workflow with a more composable CLI tool.
SSH Remote Machine
If you have a powerful workstation, cloud VM, or homelab server:
devpod provider add ssh
devpod provider configure ssh \
--option HOST=192.168.1.100 \
--option USER=developer \
--option SSH_KEY=~/.ssh/id_rsa
DevPod SSHs into the machine, runs Docker there, and maps your editor back through SSH tunneling. Heavy builds happen on the remote machine; your laptop stays cool and your battery lasts.
AWS EC2
devpod provider add aws
# Configure with your credentials
devpod provider configure aws \
--option AWS_REGION=us-west-2 \
--option AMI_ID=ami-0c02fb55956c7d316 # Amazon Linux 2
DevPod creates an EC2 instance when you start a workspace, and terminates it when you stop. You pay only for compute time actually used. A t3.medium at ~$0.042/hour costs less than $1/day for an 8-hour workday.
Kubernetes
For teams with a shared cluster:
devpod provider add kubernetes
devpod provider configure kubernetes \
--option KUBERNETES_NAMESPACE=devpod \
--option STORAGE_CLASS=standard
Each developer gets a pod. Cluster admins control resource limits via namespace quotas. Workspaces persist in PersistentVolumeClaims across pod restarts.
Google Cloud, Azure, DigitalOcean
All supported with their respective providers. The pattern is the same:
devpod provider add gcloud
devpod provider add azure
devpod provider add digitalocean
Creating Your First Workspace
With a provider configured, starting a workspace is one command:
# From a GitHub URL
devpod up github.com/your-org/your-repo
# From a local directory
devpod up /path/to/your/project
# Specifying a provider explicitly
devpod up github.com/your-org/your-repo --provider aws
# With a specific IDE
devpod up github.com/your-org/your-repo --ide vscode
devpod up github.com/your-org/your-repo --ide cursor
devpod up github.com/your-org/your-repo --ide goland
devpod up github.com/your-org/your-repo --ide clion
DevPod clones the repo, reads .devcontainer/devcontainer.json, builds the container, and opens your editor connected to it.
IDE Support
DevPod works with any editor that supports remote development:
| IDE | How it connects |
|---|---|
| VS Code | Remote SSH extension, auto-configured |
| Cursor | Same as VS Code (Cursor is a VS Code fork) |
| JetBrains IDEs | JetBrains Gateway + SSH |
| Jupyter | Browser-based, via port forwarding |
| Any editor | SSH connection you can use manually |
The VS Code integration is the smoothest. DevPod installs the Remote SSH extension if needed and configures the SSH config entry automatically.
Managing Workspaces
# List all workspaces
devpod list
# Stop a running workspace (keeps state)
devpod stop my-workspace
# Start a stopped workspace
devpod up my-workspace
# Open in IDE without rebuilding
devpod up my-workspace --recreate=false
# Delete a workspace entirely
devpod delete my-workspace
# SSH into a workspace manually
devpod ssh my-workspace
# Run a command in a workspace
devpod run my-workspace -- npm test
Defining Dev Containers
DevPod uses the same devcontainer spec as VS Code and GitHub Codespaces, so any existing .devcontainer/devcontainer.json works:
Base image approach:
{
"image": "mcr.microsoft.com/devcontainers/go:1-1.22-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
}
Dockerfile approach (more control):
{
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"remoteUser": "vscode"
}
Docker Compose approach (multi-container services):
{
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace"
}
The Docker Compose approach is powerful for projects that need databases, caches, or other services running alongside the dev environment.
DevPod vs GitHub Codespaces
| Feature | DevPod | GitHub Codespaces |
|---|---|---|
| Infrastructure | Your choice | GitHub's (Azure) |
| Cost | Pay for compute | $0.18–0.36/core-hour |
| Private repos | Any repo | GitHub only |
| Data privacy | Yours | GitHub/Microsoft |
| Offline | Yes (local provider) | No |
| Custom images | Full control | Limited |
| Team management | Self-managed | GitHub org settings |
The headline tradeoff: Codespaces is zero-setup but vendor-locked and expensive for heavy use. DevPod is slightly more operational work but runs anywhere and costs only what compute costs.
For a solo developer: if you're already paying for GitHub, Codespaces's free tier (60 core-hours/month) is fine for light use. If you need more, DevPod on a $6/month VPS or your existing AWS account costs a fraction.
For teams: DevPod on Kubernetes lets you standardize dev environments without Microsoft lock-in.
Dotfiles Integration
DevPod can automatically apply your dotfiles to every workspace:
devpod context set-options --dotfiles-url=github.com/yourname/dotfiles
When a new workspace starts, DevPod clones your dotfiles repo and runs install.sh (or bootstrap.sh, or however you've named your setup script). Your shell config, aliases, editor config, and tools are available immediately.
Port Forwarding
Access services running in your dev environment:
# Forward a single port
devpod ports add my-workspace 3000
# Forward multiple ports
devpod ports add my-workspace 3000:3000 5432:5432 8080:8080
Or configure automatic port forwarding in devcontainer.json:
{
"forwardPorts": [3000, 5432, 8080],
"portsAttributes": {
"3000": {
"label": "App",
"onAutoForward": "notify"
}
}
}
Self-Hosting DevPod Pro (Optional)
The open source DevPod CLI is free. Loft Labs also offers DevPod Pro — a web UI for managing team workspaces across providers, with SSO and centralized configuration. It's self-hosted and open source under BSL, free for small teams.
For personal use or small teams, the CLI is sufficient. DevPod Pro makes sense when you want a web interface for non-technical team members to start and stop their own workspaces.
Practical Use Cases
CPU-intensive development: Your laptop struggles with Rust compilation or ML model training. DevPod on a cloud VM with 32 cores handles it; your laptop just runs VS Code.
Consistent team environments: Every developer runs devpod up and gets the same environment. No more "it works on my machine" — if it works in the devcontainer, it works for everyone.
Client project isolation: Each client project gets its own workspace with its own dependencies. No version conflicts, no global package pollution.
Testing on different OS: Run a Linux dev environment from macOS for testing Linux-specific builds. Or run multiple Linux distributions simultaneously.
Ephemeral security: Dev containers don't persist secrets to your host. Work on a sensitive project, delete the workspace, and nothing remains on the machine.
DevPod is worth trying even if you ultimately stick with Codespaces or local development. Running through a few workspaces clarifies which model fits your actual workflow — and knowing how to spin up a standardized dev environment on demand is a useful tool to have.