porkbun

Manage Porkbun DNS records and domains via API v3. Use when Codex needs to create, read, update, or delete DNS records on Porkbun; list domains; configure API access; work with common record types (A, AAAA, CNAME, MX, TXT, etc.). The skill includes a CLI tool `scripts/porkbun-dns.js` for executing DNS operations reliably.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "porkbun" with this command: npx skills add wmantly/porkbun-skill

Porkbun DNS Management

Manage DNS records and domains on Porkbun via their REST API v3.

Quick Start

Set up API credentials

  1. Generate API keys: https://porkbun.com/account/api
  2. Save credentials to config file: ~/.config/porkbun/config.json
{
  "apiKey": "your-api-key",
  "secretApiKey": "your-secret-api-key"
}

Or set environment variables:

export PORKBUN_API_KEY="your-api-key"
export PORKBUN_SECRET_API_KEY="your-secret-api-key"
  1. Enable API access for each domain: Domain Management → Details → API Access → Enable

Test connection

node ~/.openclaw/workspace/skills/public/porkbun/scripts/porkbun-dns.js ping

Using the CLI Tool

The scripts/porkbun-dns.js script provides a reliable, deterministic way to execute DNS operations. Use it directly for common tasks instead of writing custom code.

Common Operations

List domains

node scripts/porkbun-dns.js list

List DNS records

node scripts/porkbun-dns.js records example.com

Create records

# A record
node scripts/porkbun-dns.js create example.com type=A name=www content=1.1.1.1 ttl=600

# CNAME
node scripts/porkbun-dns.js create example.com type=CNAME name=docs content=example.com

# MX record
node scripts/porkbun-dns.js create example.com type=MX name= content="mail.example.com" prio=10

# TXT record ( SPF for email)
node scripts/porkbun-dns.js create example.com type=TXT name= content="v=spf1 include:_spf.google.com ~all"

Edit records

# By ID (get ID from records command)
node scripts/porkbun-dns.js edit example.com 123456 content=2.2.2.2

# By type and subdomain (updates all matching records)
node scripts/porkbun-dns.js edit-by example.com A www content=2.2.2.2

Delete records

# By ID
node scripts/porkbun-dns.js delete example.com 123456

# By type and subdomain
node scripts/porkbun-dns.js delete-by example.com A www

Get specific records

# All records
node scripts/porkbun-dns.js get example.com

# Filter by type
node scripts/porkbun-dns.js get example.com A

# Filter by type and subdomain
node scripts/porkbun-dns.js get example.com A www

Record Types

Supported record types: A, AAAA, CNAME, ALIAS, TXT, NS, MX, SRV, TLSA, CAA, HTTPS, SVCB, SSHFP

For detailed field requirements and examples, see references/dns-record-types.md.

Common Patterns

Website Setup

Create root A record and www CNAME:

node scripts/porkbun-dns.js create example.com type=A name= content=192.0.2.1
node scripts/porkbun-dns.js create example.com type=CNAME name=www content=example.com

Email Configuration

Set up MX records for Google Workspace:

node scripts/porkbun-dns.js create example.com type=MX name= content="aspmx.l.google.com" prio=1
node scripts/porkbun-dns.js create example.com type=MX name= content="alt1.aspmx.l.google.com" prio=5
node scripts/porkbun-dns.js create example.com type=MX name= content="alt2.aspmx.l.google.com" prio=5
node scripts/porkbun-dns.js create example.com type=MX name= content="alt3.aspmx.l.google.com" prio=10
node scripts/porkbun-dns.js create example.com type=MX name= content="alt4.aspmx.l.google.com" prio=10

Add SPF record:

node scripts/porkbun-dns.js create example.com type=TXT name= content="v=spf1 include:_spf.google.com ~all"

Dynamic DNS

Update home IP address (can be scripted/automated):

HOME_IP=$(curl -s ifconfig.me)
node scripts/porkbun-dns.js edit-by example.com A home content=$HOME_IP

Wildcard DNS

Create a wildcard record pointing to root:

node scripts/porkbun-dns.js create example.com type=A name=* content=192.0.2.1

Reference Documentation

Troubleshooting

"API key not found"

  • Verify config file exists at ~/.config/porkbun/config.json
  • Check environment variables: echo $PORKBUN_API_KEY
  • Ensure API access is enabled for the specific domain

"Invalid type passed"

  • Record types must be uppercase (e.g., A, not a)
  • See supported types list above

HTTP errors

TTL errors

  • Minimum TTL is 600 seconds (10 minutes)
  • Default TTL is 600 seconds
  • Common values: 300 (dynamic), 3600 (standard), 86400 (stable)

Notes

  • TTL minimum is 600 seconds
  • Use "@" for root domain records
  • Use "*" for wildcard records
  • TXT records with spaces need quotes
  • Multiple MX records allowed with different priorities
  • API v3 current hostname: api.porkbun.com

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Miaoji Asin Clinic Pro

亚马逊ASIN诊所Pro版,90天行动计划+竞品对标+季节性优化日历。 从合规度、广告度、评论度、视觉度、内容度五维升级为可执行的长期作战方案。 基础功能可使用 miaoji-asin-clinic 免费版。

Registry SourceRecently Updated
Coding

wechat-publish-pro

Pure Python tool to convert Markdown to styled HTML and publish articles to WeChat official account drafts with AI-based content refinement and theme support.

Registry SourceRecently Updated
Coding

Miaoji Asin Clinic

基于ASIN和品类,快速诊断亚马逊Listing五维健康指数并智能排序修复优先级,提供详细分析与个性化修复方案。

Registry SourceRecently Updated
Coding

Toonany

A Claude Code skill for creating AI-generated short dramas (漫剧) from novels and stories. Use when user mentions "漫剧创作", "小说转剧本", "分镜生成", "短剧制作", "故事线生成", "大纲...

Registry SourceRecently Updated