-
-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Damir Mukimov edited this page Nov 22, 2025
·
9 revisions
Namecheap DNS Manager supports multiple accounts, allowing you to manage domains across different Namecheap accounts from a single tool.
💡 Tip: You can switch between accounts easily or use a specific account for individual commands.
The tool automatically detects configuration files in this priority order:
| Priority | Location | Use Case |
|---|---|---|
| 1 | ./configs/.namecheap-dns.yaml |
🛠️ Development (project directory) |
| 2 | ~/.namecheap-dns.yaml |
🏠 Production (home directory) |
| 3 | --config /path/to/config.yaml |
🎯 Custom location (via flag) |
Note: The first found config file is used. Project directory config takes precedence.
View complete configuration example
accounts:
default:
username: "your-namecheap-username"
api_user: "your-api-username"
api_key: "your-api-key-here"
client_ip: "your.public.ip.address"
use_sandbox: false
description: "My main account"
work:
username: "work-username"
api_user: "work-api-username"
api_key: "work-api-key"
client_ip: "your.public.ip.address"
use_sandbox: false
description: "Work account"
sandbox:
username: "sandbox-username"
api_user: "sandbox-api-user"
api_key: "sandbox-api-key"
client_ip: "your.public.ip.address"
use_sandbox: true
description: "Testing environment"
current_account: "default"| Field | Required | Description | Example |
|---|---|---|---|
username |
✅ Yes | Namecheap account username | "myusername" |
api_user |
✅ Yes | API username (may differ from username) | "myapiuser" |
api_key |
✅ Yes | API key from Namecheap | "abc123..." |
client_ip |
✅ Yes | Your public IP address | "203.0.113.1" |
use_sandbox |
❌ No | Use sandbox environment (default: false) |
true or false
|
description |
❌ No | Account description | "My main account" |
- Log in to your Namecheap account
- Go to Profile → Tools → API Access
- Enable API access
- Note your:
- API User: Your API username
- API Key: Your API key
- Whitelisted IP: Your public IP address
# Add an account interactively
namecheap-dns account add
# Or add with a specific name
namecheap-dns account add personal-
Create the config file:
namecheap-dns config init
-
Edit the config file:
# Edit ~/.namecheap-dns.yaml or ./configs/.namecheap-dns.yaml vim ~/.namecheap-dns.yaml
-
Validate your configuration:
namecheap-dns config validate
namecheap-dns account listnamecheap-dns account switch worknamecheap-dns --account work domain listnamecheap-dns account edit worknamecheap-dns account remove work-
File Permissions: Configuration files use
600permissions (owner read/write only) - API Keys: Are masked in output (shows only first 4 and last 4 characters)
- Git Ignore: Configuration files are excluded from git by default
-
Sandbox Mode: Use
use_sandbox: truefor testing
For testing, you can use Namecheap's sandbox environment:
accounts:
test:
username: "sandbox-username"
api_user: "sandbox-api-user"
api_key: "sandbox-api-key"
client_ip: "your.public.ip.address"
use_sandbox: true
description: "Sandbox for testing"Run:
namecheap-dns config initCheck available accounts:
namecheap-dns account list- Verify your API key is correct
- Check that your client IP is whitelisted in Namecheap
- Ensure you're not using sandbox credentials in production
- Verify your IP hasn't changed (update if needed)
If you have an existing single-account configuration, the tool will automatically migrate it to the new multi-account format. Your existing configuration will be preserved as the default account.