XServer DNS provider for octoDNS
Project description
octodns-xserver
日本語のドキュメントは README.ja.md をご覧ください。
octoDNS provider for XServer DNS API.
Manage XServer DNS records as code using YAML files, with automatic sync via GitHub Actions.
Note: The XServer API was released in April 2026. This is the first octoDNS provider to support XServer DNS.
Supported record types
| Type | Supported |
|---|---|
| A | ✅ |
| AAAA | ✅ |
| CNAME | ✅ |
| MX | ✅ |
| TXT | ✅ |
| SRV | ✅ |
| CAA | ✅ |
Installation
pip install octodns-xserver
Development version (from GitHub):
pip install git+https://github.com/J-KEI/octodns-xserver.git
Requirements
- Python 3.10+
- octoDNS 1.9.0+
- An XServer account with API access enabled
Setup
1. Issue an XServer API key
Log in to the XServer account panel and navigate to API key management to issue a new API key.
Required permissions: DNS read + write
2. Identify your server name
The servername is the initial domain assigned at contract time, not a custom domain you added later.
Format:
- XServer レンタルサーバー:
xs123456.xsrv.jp - XServerビジネス:
xs123456.xbiz.jp
3. Configure octodns-config.yaml
providers:
config:
class: octodns.provider.yaml.YamlProvider
directory: ./zones
default_ttl: 3600
enforce_order: false
xserver:
class: octodns_xserver.XServerProvider
api_key: env/XSERVER_API_KEY
servername: env/XSERVER_SERVERNAME
zones:
example.com.:
sources:
- config
targets:
- xserver
4. Create a zone file
Create zones/example.com.yaml with your DNS records.
See zones/example.com.yaml for a complete example.
Key points:
- Use
''(empty string) for the zone apex (@) - Wildcard records must be quoted:
'*' - When multiple record types share the same name, use a list under the same key
- Semicolons in TXT values must be escaped as
\;
---
'':
- type: A
values:
- 203.0.113.1
- type: MX
values:
- preference: 10
exchange: mail.example.com.
- type: TXT
values:
- 'v=spf1 include:spf.example.com ~all'
www:
type: A
values:
- 203.0.113.1
'*':
type: A
values:
- 203.0.113.1
# Semicolons in TXT values must be escaped as '\;'
_dmarc:
type: TXT
values:
- 'v=DMARC1\; p=none\; rua=mailto:dmarc@example.com'
Usage
Preview changes (dry run)
XSERVER_API_KEY=xxx XSERVER_SERVERNAME=xs123456.xsrv.jp \
octodns-sync --config-file octodns-config.yaml
No changes are made. The planned changes are displayed only.
Apply changes
XSERVER_API_KEY=xxx XSERVER_SERVERNAME=xs123456.xsrv.jp \
octodns-sync --config-file octodns-config.yaml --doit
GitHub Actions
Sample workflow files are included in .github/workflows/.
dns-dry-run.yml
Triggered when zones/ YAML files are changed in a pull request.
Posts a preview of DNS changes as a PR comment — no actual changes are made.
dns-sync.yml
Triggered when changes are merged to the main branch.
Applies DNS changes to XServer.
Set the following secrets in your repository:
| Secret name | Value |
|---|---|
XSERVER_API_KEY |
API key issued from the XServer panel |
XSERVER_SERVERNAME |
Initial domain (e.g. xs123456.xsrv.jp) |
Important notes
Zone files contain sensitive information
Your zone files (zones/*.yaml) may contain IP addresses, SPF records, and DKIM public keys. Do not commit zone files to a public repository.
Recommended approach:
- Keep this library in a public repository
- Manage your zone files in a private repository
First-time import
octodns-xserver does not yet include an export script to generate YAML from existing XServer DNS records. For the initial setup:
- Open the DNS record settings in the XServer panel
- Manually create
zones/your-domain.yamlbased on the current records - Run a dry run and verify that
No changes were plannedis shown - Then run with
--doitto confirm the sync works correctly
TXT record semicolons
octoDNS requires semicolons in TXT values to be escaped as \; in YAML files.
This provider automatically handles the conversion when reading from and writing to the XServer API.
NS records
NS records managed by XServer are automatically skipped during sync.
Development
git clone https://github.com/J-KEI/octodns-xserver.git
cd octodns-xserver
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -e ".[dev]"
pytest tests/ -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octodns_xserver-0.0.2.tar.gz.
File metadata
- Download URL: octodns_xserver-0.0.2.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df033d28716458e61254a4d694d77af95e9d2ca819c90f39426b0ea9bb9fc532
|
|
| MD5 |
4a549059dcb30dafeda1efc8ed7d4127
|
|
| BLAKE2b-256 |
bd2b8e5ca62ef7a930b644f73829690b34583b4b47c22e2179bd44af5a7ceead
|
File details
Details for the file octodns_xserver-0.0.2-py3-none-any.whl.
File metadata
- Download URL: octodns_xserver-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86503f8e24c3d1e13991800a42b3d8b034e54fb1cab40f208b8c23977c6403d2
|
|
| MD5 |
52b58da16821c3d8b99e79b1ab26d685
|
|
| BLAKE2b-256 |
38295e65d84b7b2be180bf394d4385e7fac45a07db2847a53e5c4635e023c58a
|