Environment Variables
Environment variables used by the Gibil CLI
CLI environment variables
| Variable | Required | Description |
|---|---|---|
HETZNER_API_TOKEN | One of these* | Hetzner Cloud API token |
VULTR_API_KEY | One of these* | Vultr personal access token |
GIBIL_API_KEY | No | Gibil API key for authenticated usage and metering |
GIBIL_API_URL | No | Override Supabase Edge Functions URL |
GIBIL_HOME | No | Override ~/.gibil (used in tests) |
GITHUB_TOKEN | No | GitHub token for private repo access on VMs |
* You need a token for at least one provider. Either env var or ~/.gibil/config.json works.
How tokens are resolved
Provider tokens (Hetzner, Vultr)
For each provider, gibil checks in order:
~/.gibil/config.jsonunderproviders.<name>.token(set viagibil initorgibil auth setup)- The provider-specific env var (
HETZNER_API_TOKEN,VULTR_API_KEY) .envfile in current directory (auto-loaded via dotenv)
Gibil API key
~/.gibil/config.json(set viagibil auth login --key)GIBIL_API_KEYenvironment variable
VM environment variables
Variables defined in .gibil.yml env: section are set on the VM:
env:
DATABASE_URL: postgres://localhost/myapp
NODE_ENV: developmentThese are:
- Exported in the cloud-init script
- Persisted in
/root/.bashrc - Available in all SSH sessions and
gibil runcommands