Domain Attachment
DevOps & Securitydomain-attachmentDomain Attachment is an Agent Skill for devops & security published in the nixopus/nixopus repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Domain setup for applications. Preferred path is passing domains at creation time via createProject. Falls back to add_application_domain for post-creation attachment or custom domains.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/nixopus/nixopus/blob/HEAD/api/skills/domain-attachment/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/domain-attachment, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Domain Attachment
Preferred: Pass Domain at Creation Time
The fastest path — zero extra tool calls after project creation:
- Call
generate_random_subdomainto get a subdomain. - Pass
domains: ["<subdomain>"]in thecreateProjectcall. - Done — the domain is attached at creation, wildcard DNS and TLS are automatic.
Use this path for all standard deploys. Only fall back to the post-creation flow below when adding domains to an existing app or when the user wants a custom domain.
Post-Creation: Auto-Generated Subdomain
If the app already exists and has no domain:
- Call
generate_random_subdomain. - Call
add_application_domainwith id (app UUID) and the subdomain. - Done — wildcard DNS and TLS are handled automatically.
Step 4: Custom Domain Setup
If the user wants a custom domain (e.g. app.example.com):
- Call
create_domainwith the domain name. - The response includes DNS setup instructions. Relay them clearly to the user:
- CNAME record: point the domain to their assigned
subdomain.nixopus.ai - TXT record:
_nixopus-verify.{domain}with the verification value from the response
- CNAME record: point the domain to their assigned
- Tell the user to add both records at their DNS provider (Cloudflare, Namecheap, Route53, GoDaddy, etc.).
- After the user confirms DNS is configured, call
update_domainwith the domain ID to verify. - If verification succeeds, call
add_application_domainto attach the domain. - If verification fails:
- DNS propagation can take minutes to 48 hours depending on the provider.
- Suggest the user wait and retry, or check their DNS records are correct.
- For deeper troubleshooting:
read_skill("domain-tls-routing").
Common DNS Provider Notes
| Provider | Propagation | Notes |
|---|---|---|
| Cloudflare | Near-instant | Disable orange cloud (proxy) for the CNAME initially so verification passes |
| Namecheap | 5-30 minutes | Use "CNAME Record" type, host = subdomain part only |
| Route53 | 60 seconds | Standard CNAME + TXT |
| GoDaddy | Up to 48 hours | Slowest propagation |
Important
- Never skip domain attachment — a deployed app without a domain is not reachable.
- For Compose apps,
add_application_domainaccepts an optionalservice_nameandportto route to a specific service.