This guide covers LXD-specific configuration for deploying locally.
LXD provides lightweight virtual machines that run on your local system. Ideal for development, testing, and CI/CD pipelines.
Why LXD?
- Zero cloud costs
- Fast iteration
- CI/CD friendly (works in GitHub Actions)
- LXD installed and initialized (see LXD tech guide)
- SSH key pair (see SSH keys guide)
{
"provider": {
"provider": "lxd",
"profile_name": "torrust-profile-local"
}
}| Field | Description | Example |
|---|---|---|
provider |
Must be "lxd" |
lxd |
profile_name |
LXD profile name (auto-created) | torrust-profile-local |
lxc listlxc exec torrust-tracker-vm-<environment-name> -- bashIf you need to manually clean up:
# Delete an instance
lxc delete <instance-name> --force
# Delete a profile
lxc profile delete <profile-name># Check LXD status
sudo systemctl status snap.lxd.daemon
# Restart LXD
sudo systemctl restart snap.lxd.daemonSee the LXD Group Setup section in the LXD tech guide.
# Check network bridge
lxc network list
# Recreate default bridge if needed
lxc network delete lxdbr0
lxc network create lxdbr0| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 4 GB | 8+ GB |
| CPU | 2 cores | 4+ cores |
| Storage | 20 GB | 50+ GB |
| OS | Linux | Ubuntu 22.04+ |
Unlike the Hetzner provider, LXD does not create a provider-level SSH key resource. This is because:
- Direct console access:
lxc execprovides shell access without SSH - No account-level keys: LXD doesn't have an SSH key registry concept
- Local environment: No need for remote debugging fallback
SSH access is configured solely through cloud-init for the torrust user.
Debugging without SSH: If cloud-init fails, use direct console access:
lxc exec torrust-tracker-vm-<environment> -- bash- LXD Tech Guide - Installation and detailed LXD operations
- Quick Start: Native - LXD deployment workflow
- Hetzner Provider - Cloud deployment alternative