Decoupled DNS Server #591
-
Hi @stefanpejcic, Thanks once again. I was looking at the opencli source code find the bind DNS and get to know how flexible it will be to swap to our in-house DNS server setup, instead of the native BIND implementations. One thing I have come to like about the OpenPanel setup is the decoupled nature of how you've done thing, and it's the way we've been trying to structure our entire infrastructure, leading to having our DNS server cluster on seperate servers, our current cPanel server are configured to use the DNS server. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I don’t recommend modifying the existing code to use your own DNS server instead of BIND, as you'd have to maintain and test all changes yourself on updates.. a better option:
PS, I would also remove the |
Beta Was this translation helpful? Give feedback.
-
Also, each For example, when a user adds a new domain, the command used is to run a script before the process, then use also, each attribute is passed back to your script, so for example: opencli domains-add <DOMAIN_NAME> <USERNAME> [--docroot DOCUMENT_ROOT] [--php_version N.N] [--skip_caddy --skip_vhost --skip_containers --skip_dns] --debug would pass all those flags back to your script: bash /etc/openpanel/openpanel/hooks/post_domains-add.sh <DOMAIN_NAME> <USERNAME> [--docroot DOCUMENT_ROOT] [--php_version N.N] [--skip_caddy --skip_vhost --skip_containers --skip_dns] --debug |
Beta Was this translation helpful? Give feedback.
Also, each
opencli
command supports pre and post hooks, so you can easily hook into domain-related actions like domain creation to run your own commands before or after. For example, you can on your in-house dns server create DNS zones, set up nameservers, PTR records, etc.For example, when a user adds a new domain, the command used is
opencli domains-add
, so to hook into that, just create a file:/etc/openpanel/openpanel/hooks/post_domains-add.sh
- this script will run automatically after a domain is added from the OpenPanel UI.to run a script before the process, then use
pre
instead ofpost
in file name:/etc/openpanel/openpanel/hooks/pre_domains-add.sh
also, each attribute is passed …