This guide explains how to run GraphDone in a Multipass VM for isolated development and testing.
-
Multipass - Install from multipass.run
- macOS:
brew install --cask multipass - Ubuntu:
sudo snap install multipass - Windows: Download from website
- macOS:
-
yq - YAML processor (automatically installed if missing)
- macOS:
brew install yq - Ubuntu: Auto-installed by the script
- macOS:
# Launch a VM with auto-generated random name
./start vm launch
# Example: graphdone-vm-happy-turtle-1234
# List VMs to see your generated name
./start vm list
# Connect to the VM (use your generated name)
./start vm shell --name graphdone-vm-happy-turtle-1234
# Or if you only have one VM
multipass shell <your-vm-name>
# Inside the VM, GraphDone is automatically set up at ~/graphdone
cd ~/graphdone
./start statusBy default, VMs get fun random names like:
graphdone-vm-happy-turtle-1234graphdone-vm-cosmic-dragon-5678graphdone-vm-mighty-phoenix-9012
You can specify a custom name with --name:
./start vm launch --name my-dev-vmEdit vm.config.yml to customize your VM:
resources:
cpus: 4 # Number of CPU cores
memory: 8G # RAM (4G, 8G, 16G, etc.)
disk: 30G # Disk size (20G, 50G, etc.)graphdone:
repo_url: "https://github.com/GraphDone/GraphDone-Core.git"
branch: "main" # Change to develop, feature/xxx, etc.
clone_path: "/home/ubuntu/graphdone"
auto_setup: true # Run ./start setup automatically
auto_seed: true # Seed database with test datatailscale:
enabled: true
auth_key: "tskey-auth-xxxxx" # Get from https://login.tailscale.com/admin/settings/keys
flags: "--advertise-tags=tag:dev"To use Tailscale:
- Go to https://login.tailscale.com/admin/settings/keys
- Generate an ephemeral auth key
- Set it in
vm.config.ymlor via environment variable:export TAILSCALE_AUTH_KEY="tskey-auth-xxxxx" ./start vm launch
nodejs:
version: "20" # 18, 20, or latest
use_nvm: true # Recommended for version managementstartup:
auto_start: false # Start VM on host boot
run_on_boot: true # Start GraphDone services on VM boot# Default configuration
./start vm launch
# Custom branch
./start vm launch --branch develop
# Custom resources
./start vm launch --cpus 8 --memory 16G --disk 50G
# Custom name and branch
./start vm launch --name my-dev-vm --branch feature/new-ui# List all GraphDone VMs
./start vm list
# Connect to VM shell
./start vm shell
./start vm shell --name my-vm
# Show VM info
./start vm info
# Stop VM
./start vm stop
# Start a stopped VM
./start vm start
# Delete VM
./start vm deleteAfter launching a VM, services are available at:
Via VM IP:
- Web UI:
http://<vm-ip>:3127 - GraphQL API:
http://<vm-ip>:4127/graphql - Neo4j Browser:
http://<vm-ip>:7474
Get the VM IP:
multipass info graphdone-dev | grep IPv4Via localhost (requires port forwarding):
- Web UI:
http://localhost:3127 - GraphQL API:
http://localhost:4127/graphql - Neo4j Browser:
http://localhost:7474
All VM commands support these options:
| Option | Description | Example |
|---|---|---|
--name NAME |
VM name | --name my-dev |
--branch BRANCH |
Git branch | --branch develop |
--cpus N |
Number of CPUs | --cpus 8 |
--memory SIZE |
Memory size | --memory 16G |
--disk SIZE |
Disk size | --disk 50G |
When you shell into the VM, helpful aliases are available:
# GraphDone shortcuts
gd # cd to GraphDone directory
gd-start # Start GraphDone
gd-stop # Stop GraphDone
gd-status # Check status
# Or use directly
cd ~/graphdone
./start dev
./start status
./start testmounts:
enabled: true
paths:
- "~/graphdone-data:/home/ubuntu/data"
- "~/projects:/home/ubuntu/projects"development:
dev_tools:
- git
- vim
- htop
- tmux
- jqnetwork:
bridged: true # Use bridged network (external IP)
bridge_interface: "eth0" # Bridge interface name# Check Multipass status
multipass list
# View VM logs
multipass exec graphdone-dev -- journalctl -xe
# Delete and recreate
./start vm delete
./start vm launch# Shell into VM
./start vm shell
# Check GraphDone status
cd ~/graphdone
./start status
# Check logs
docker logs graphdone-neo4j
journalctl -u graphdone -fOn macOS/Windows, Multipass uses NAT. Access services via VM IP:
# Get VM IP
multipass info graphdone-dev | grep IPv4
# Access directly
curl http://<vm-ip>:3127Or set up SSH tunnel:
# Forward port 3127
multipass exec graphdone-dev -- sudo iptables -t nat -A PREROUTING -p tcp --dport 3127 -j REDIRECT --to-port 3127# Check Tailscale status in VM
./start vm shell
sudo tailscale status
# Reconnect
sudo tailscale up --authkey=<your-key>- Allocate enough resources: Development needs at least 4 CPUs and 8GB RAM
- Use SSD: Multipass performs better on SSDs
- Enable Docker caching: Speeds up container operations
- Use bridged networking: Better performance than NAT on Linux
- Use ephemeral Tailscale keys: They expire and are safer
- Don't commit auth keys: Use environment variables
- Limit VM resources: Prevent host resource exhaustion
- Regular updates: Keep Multipass and Ubuntu updated
Use VMs for consistent testing:
# In CI pipeline
./start vm launch --name ci-test-$CI_BUILD_ID --branch $CI_BRANCH
./start vm shell --name ci-test-$CI_BUILD_ID -- "cd ~/graphdone && ./start test"
./start vm delete --name ci-test-$CI_BUILD_ID# Main branch VM
./start vm launch --name main-dev --branch main
# Feature branch VM
./start vm launch --name feature-dev --branch feature/new-api
# Work on both simultaneously
./start vm shell --name main-dev
./start vm shell --name feature-dev# Minimum viable setup
./start vm launch --name min-test --cpus 2 --memory 4G
# Production-like setup
./start vm launch --name prod-test --cpus 8 --memory 16G --disk 100G# Launch VMs that can communicate via Tailscale
export TAILSCALE_AUTH_KEY="tskey-auth-xxxxx"
./start vm launch --name dev1 --branch main
./start vm launch --name dev2 --branch develop
# VMs can now reach each other via Tailscale IPs# Delete a specific VM
./start vm delete --name my-vm
# Delete all GraphDone VMs
multipass list | grep graphdone | awk '{print $1}' | xargs -I {} multipass delete {}
multipass purge
# Clean up cloud-init artifacts
rm -f /tmp/graphdone-cloud-init.yml