Frequently Asked Questions
Common questions about using kiln for environment variable management.
Tool Comparison
Section titled “Tool Comparison”Why use kiln over tools like Infisical or Vault?
Section titled “Why use kiln over tools like Infisical or Vault?”kiln is designed for teams that prioritize simplicity and offline capabilities:
Infisical/Vault require infrastructure:
- Running servers and databases
- Network connectivity for deployments
- Account management and authentication
- Backup and maintenance procedures
kiln is infrastructure-free:
- Files travel with your code
- Works completely offline
- No servers to maintain or accounts to manage
- Deployments work even when external services are down
Choose kiln if you want secrets that live with your code and don’t require external dependencies. Choose hosted solutions if you need advanced features like secret rotation, audit logs, or integration with enterprise identity systems.
How does kiln compare to SOPS?
Section titled “How does kiln compare to SOPS?”Both kiln and SOPS encrypt files for version control, but kiln is specifically designed for environment variables:
SOPS is a general file encryption tool that works with YAML, JSON, and other formats
kiln provides environment variable workflows with commands like run, export, and team management
kiln is essentially “SOPS for .env files” with a focus on development team workflows.
Repository and Version Control
Section titled “Repository and Version Control”I have a public repository and don’t want to commit encrypted secrets. How do I use kiln?
Section titled “I have a public repository and don’t want to commit encrypted secrets. How do I use kiln?”You have several options for keeping encrypted files separate from your main codebase:
Option 1: Git Submodules
# Create a private repository for secrets
# Structure your projectyourapp/├── src/├── secrets/ # Private submodule│ ├── kiln.toml│ ├── dev.env│ └── prod.env└── README.md
# Use secrets from the submodulecd secrets && kiln run --file production -- ../deploy.shOption 2: Separate Secrets Repository Keep a completely separate private repository and clone it during deployment:
# In your deployment pipelinecd yourapp-secretskiln run --file production -- ../yourapp/deploy.shOption 3: Local Secrets Only Use kiln locally for development but rely on environment variables or other secret management in production:
# Development (local kiln)kiln run -- npm run dev
# Production (environment variables)DATABASE_URL=$PROD_DB npm startSecurity and Access
Section titled “Security and Access”How secure is age encryption?
Section titled “How secure is age encryption?”Age uses modern cryptographic primitives:
- X25519 for key exchange (same as Signal, WireGuard)
- ChaCha20-Poly1305 for authenticated encryption
- HKDF for key derivation
Age was designed by cryptography experts as a replacement for GPG with a focus on simplicity and correctness. It’s used by many security-conscious projects and has undergone security review.
What happens if someone leaves the team?
Section titled “What happens if someone leaves the team?”When someone leaves:
- Remove them from kiln.toml recipients and groups
- Re-encrypt all files they had access to:
Terminal window # They'll no longer be able to decrypt new versionskiln set --from-file backup.json --file production - Rotate actual secrets if necessary (API keys, database passwords, etc.)
Can I use kiln with CI/CD?
Section titled “Can I use kiln with CI/CD?”Yes, kiln works well in automated environments:
# Store kiln private key in CI secrets# Then in your pipeline:echo "$KILN_PRIVATE_KEY" > /tmp/ci.keykiln run --key /tmp/ci.key --file production -- ./deploy.shYou can also export variables for tools that expect environment variables:
eval "$(kiln export --file production)"docker run --env-file <(kiln export --file production --format shell) myappUsage Patterns
Section titled “Usage Patterns”Should I commit kiln.toml to version control?
Section titled “Should I commit kiln.toml to version control?”Yes, always commit kiln.toml. It contains only:
- Public keys (safe to share)
- Access control configuration
- File definitions
Never commit private keys (*.key files) - only public keys (*.key.pub files) go in the configuration.
How do I handle different environments?
Section titled “How do I handle different environments?”Use separate files for each environment with different access controls:
[files.development]filename = "dev.env"access = ["*"] # Everyone
[files.staging]filename = "staging.env"access = ["developers"]
[files.production]filename = "prod.env"access = ["admins"]This gives you environment separation with role-based access.
Can I use kiln for non-environment variables?
Section titled “Can I use kiln for non-environment variables?”While kiln is optimized for environment variables, you can store any key-value data:
# API configurationskiln set STRIPE_WEBHOOK_SECRETkiln set TWILIO_ACCOUNT_SID
# Feature flagskiln set ENABLE_NEW_FEATURE true
# Service URLskiln set PAYMENT_SERVICE_URL https://payments.internalThe KEY=value format works for most configuration data.
Troubleshooting
Section titled “Troubleshooting”Why can’t I decrypt a file?
Section titled “Why can’t I decrypt a file?”Common causes:
- Wrong private key - Make sure you’re using the key that corresponds to a recipient in the file
- Not in access list - Check that you’re listed in the file’s access configuration
- File corruption - Verify the encrypted file hasn’t been modified
Debug with:
kiln info --file yourfile --verify --verboseMy team member can’t access files after I added them
Section titled “My team member can’t access files after I added them”Check that:
- Their public key is correctly formatted in kiln.toml
- They’re included in the access list for the specific file
- You’ve re-encrypted the file after adding them:
Terminal window kiln rekey --file development --add-recipient "newperson=their-public-key"
How do I migrate from another secret management tool?
Section titled “How do I migrate from another secret management tool?”Most tools can export in JSON format:
# Export from your current tool to JSONyour-tool export --format json > secrets.json
# Import into kilnkiln set --from-file secrets.json --file productionYou may need to transform the JSON structure to match kiln’s {"KEY": "value"} format.