-
-
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.
The tool automatically detects configuration files in this priority order:
-
Project Directory (Recommended for development):
./configs/.namecheap-dns.yaml- Automatically found when running from project directory
-
Home Directory (Fallback):
~/.namecheap-dns.yaml- Used when no project config is found
-
Custom Location:
./namecheap-dns --config /path/to/config.yaml
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"
current_account: "default"- 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.