Quick Start Guide
This guide will get you up and running with devbox in just a few minutes. You’ll create your first isolated development environment and learn the basic workflow.
Prerequisites
Section titled “Prerequisites”Before starting, make sure you have devbox installed. If you haven’t installed it yet, follow the Installation Guide first.
Create Your First Project
Section titled “Create Your First Project”Let’s create a Python development environment:
devbox init my-python-app --template pythonThis command:
- Creates a new project called
my-python-app - Uses the Python template (includes Python 3, pip, and common tools)
- Sets up a Docker box (container) with Ubuntu 22.04
- Creates a workspace directory at
~/devbox/my-python-app/
Enter Your Development Environment
Section titled “Enter Your Development Environment”devbox shell my-python-appYou’re now inside an isolated Ubuntu box! Notice how your prompt changes to indicate you’re in the devbox environment.
By default, the box will stop automatically when you exit the shell. To keep it running after you exit, pass --keep-running.
Explore the Environment
Section titled “Explore the Environment”Inside the box, you can:
# Check what's availablepython3 --versionpip3 --versionwhich python3
# Your workspace is mounted at /workspacecd /workspacels -la
# Install additional packagesapt updateapt install tree htop
# Install Python packagespip3 install requests flask
# These installs are automatically recorded to /workspace/devbox.lock# so the environment can be reproduced on rebuild or by teammates.Create and Run Code
Section titled “Create and Run Code”Create a simple Python application:
# Create a simple web appcat > /workspace/app.py << 'EOF'from flask import Flask
app = Flask(__name__)
@app.route('/')def hello(): return 'Hello from devbox! 🚀'
if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=True)EOF
# Run your apppython3 app.pyManage Your Projects
Section titled “Manage Your Projects”# List all your projectsdevbox list
# Create more projectsdevbox init node-app --template nodejsdevbox init go-service --template go
# Each project is completely isolateddevbox shell node-app # Node.js environmentdevbox shell go-service # Go environmentClean Up
Section titled “Clean Up”When you’re done with a project:
# Stop and remove the box (keeps your files)devbox destroy my-python-app
# Or just stop the box without removing itdevbox stop my-python-app
# Your files are still in ~/devbox/my-python-app/ls ~/devbox/my-python-app/
# To recreate the environment later:devbox init my-python-app --template pythonDocker Access
Section titled “Docker Access”By default, all devbox environments have access to the host’s Docker daemon, allowing you to:
- Build and manage Docker boxes/containers from within your devbox environment
- Run Docker commands without additional configuration
- Execute Docker Compose for multi-box (multi-container) applications
This works by mounting the host’s Docker socket (/var/run/docker.sock) in your devbox box (container) and installing the Docker CLI tools automatically.
Next Steps
Section titled “Next Steps”Now that you understand the basics:
- Explore the commands: Command Reference
- Learn about configuration: Configuration Guide
- Explore templates: Try different project templates
- Customize: Create a custom
devbox.jsonconfig file - Maintenance: Cleanup and Maintenance