Secret Management
Secure storage and distribution of API keys, tokens, and credentials.
Overview
ArgentOS handles sensitive credentials -- API keys, auth tokens, and service passwords. Proper secret management ensures these never leak to logs, version control, or unauthorized parties.
Where Secrets Live
| Secret | Location | Permissions |
|---|---|---|
| Auth profiles | ~/.argentos/agents/main/agent/auth-profiles.json | 600 (user-only) |
| Gateway token | ~/.argentos/argent.json | 600 (user-only) |
| Channel tokens | ~/.argentos/argent.json | 600 (user-only) |
| ElevenLabs key | Dashboard settings | Stored in dashboard.db |
Local Storage
All secrets are stored locally on disk. ArgentOS never transmits your credentials to any service other than the intended API provider.
File Permissions
Sensitive files should be readable only by the owning user:
chmod 600 ~/.argentos/argent.json
chmod 600 ~/.argentos/agents/main/agent/auth-profiles.jsonThe installer sets these permissions by default, but verify them if you edit files manually.
Environment Variables
Secrets can also be provided via environment variables as a fallback:
export ANTHROPIC_API_KEY="sk-ant-api03-..."
export ELEVENLABS_API_KEY="..."Environment variables are checked after auth profiles. They are useful for CI/CD environments or Docker deployments.
Enterprise Secret Sync
Enterprise features require an ArgentOS Enterprise license. See Enterprise.
For organizations managing multiple ArgentOS instances, the secret sync system distributes API keys from a central authority:
- Organization admin configures keys in the licensing portal
- Each ArgentOS instance fetches its assigned keys on activation
- Key rotation is handled centrally
How It Works
Licensing Server
│
├── Organization API Keys
│
└── Instance requests keys (authenticated by license)
│
└── Keys written to local auth-profiles.jsonSecrets in Logs
ArgentOS redacts sensitive values from logs:
- API keys are shown as
sk-ant-***...*** - Auth tokens are never logged
- Gateway auth tokens are never included in error messages
Secret Rotation
Manual Rotation
- Generate new credentials from the provider
- Update
auth-profiles.jsonorargent.json - Restart the gateway:
argent gateway restart
Automated Rotation
Enterprise customers can configure automatic key rotation through the licensing portal.
Best Practices
- Never commit secrets to Git (add config files to
.gitignore) - Use auth profiles instead of environment variables when possible
- Set strict file permissions (
chmod 600) - Rotate keys on a regular schedule
- Use separate keys for development and production
- Monitor provider dashboards for unusual usage