How to host your own nameservers with GLUE records
If you run your own DNS server on a static public IP address, it is possible for your domain to be assigned nameservers in the same zone, giving your assigned nameservers the appearance of ns1.mycustomdomain.com, ns2.mycustomdomain.com, etc.
Porkbun's DNS service cannot be used to DNS-host your domain with custom nameservers. You must operate your own DNS server(s) to assign custom nameservers of the same domain while remaining in compliance with the DNS specification.
You will first need to install records at the registry specifying the IP address of your nameservers, known as glue records. You'll also need to add matching A and NS records at your DNS server.
How to create glue records
Additional configuration steps
That's it on the Porkbun side. Now, in your DNS server, in the zone configuration for this domain, you'll need to add matching A records for ns1, ns2, etc. that answer with the same IP address as the glue records you created above. You'll also want to make the NS records served from your DNS server match your assigned custom nameserver names. These last two steps are necessary for compliance with the DNS specification, which you'll want to do to make sure your domain resolves smoothly worldwide.
Your domain should now be able to resolve using nameservers in its own zone.