Is it possible to create or have our own DNS of our virtual server in Virtualmin to configure our domain name with our registrar Namecheap?

OS type and version: Ubuntu 18.04 LTS
Webmin version: Last version installed by “wget
Virtualmin version: Last version installed by “wget
Related products version: DigitalOcean Droplet (Ubuntu 18.04 LTS)

Hi all.

We are using an Ubuntu 18.04 LTS DigitalOcean Droplet on which we have installed “Webmin/Virtualmin”. I also have a Domain Name whose registrar is “Namecheap”. The problem is that I would like to configure in the management space of my Domain name in “Namecheap”, personalized DNS specific to my virtual server instead of DigitalOcean’s Domain Names (,, Clearly, we want to know if it is possible to have thanks to the Virtual Server created on “Webmin/Virtualmin”, my own DNS that I will link to my domain name based at “Namecheap”, without using those of DigitalOcean ???

If so, how to proceed so as to create in “Webmin/Virtualmin”, our own personalized DNS that we can configure with (or link to) our Domain Name at “Namecheap” ???

Otherwise, what does NS - Name Server mean when we click on “Server configuration” => “DNS records” => in “Virtualmin” ???

Thank you for enlightening us please.

Of course it’s possible.

You need to read up on glue records. Your registrar needs to be configured to know that the Virtualmin server is the authoritative name server for your zone. Be aware that you’ll need two IPs (or two actual servers) to make most registrars happy.

Also, if you’re currently using Digital Ocean DNS servers for your name registered at NameCheap, you have already setup glue records (you just pointed them to Digital Ocean instead of your Virtualmin server)!

Note that many registrars require names that already resolve for your name servers, so you may need to make the zone you’ll put your name servers in first on name servers that already exist. Bootstrapping a zone up from non-existent to self-hosting in a little tricky at some registrars (though some allow entry of name and IP for name servers).

Thanks for your reply but as I said in my post I don’t want to use DigitalOcean’s DNS under any circumstances but rather personal DNS.
The problem from what I see in your answers, is that I will have to rent two different linux servers. We specify that we do not have enough budget to rent more droplet or linux server on which we have to create the DNS server. Then:

1 - Is this necessarily the only solution to have our own DNS servers which will then be used to link our domain names whose registrar is “Namecheap” ???

2 - Can you direct us to a web or video tutorial that can show us how to create our own custom DNS and link it to our Domain Name ???

Thank you for coming back to me please.

I wonder why he doesn’t want to use NameCheap’s DNS… does anyone know of a problem with their DNS.

On another note… I use eNom… and I love their DNS… the servers are spread around the planet and propagation takes 10 seconds to 2 minutes…

But… after 1&1 (ionus) did their network upgrade last month… my “speedtest score of A+” makes me consider going back to self-hosted DNS using Virtualmin.

Thank you for your reply. Do you think that I can directly use the NameCheap’s DNS with a Linux Ubuntu Server (Droplet) from DigitalOcean ???
Is this really possible ???

Thank you for answering me please.

Of course. Those things have nothing to do with each other. Where you host DNS is wholly unrelated to anything else in your question.

1 Like

I remind you that I am not trying to use DigitalOcean’s DNS in any way. So, is it possible to use Namecheap’s DNS on (and link to) a DigitalOcean Linux Ubuntu (Droplet) Server without using DigitalOcean’s (DNS) itself ???

You keep asking the same question and I keep telling you the answer. If you won’t believe me, I don’t know what else to say.

Namecheap provides DNS services for domains registered with them, if you want to use them. It doesn’t matter where your websites are hosted.

I really didn’t know. Thanks for the information. Really thank you for letting me know.

1 Like

Joe: I have been reading the question over and over and have even sketched it out on a peace of paper to help this lad out, but the problem is quite simple…

The general basic understanding and knowledge of DNS & routing.

Best solution for you: use domain provider DNS for external routing,
use webmin/virtualmin DNS for internal routing (if you have any)

I don’t see any reason to make it complicated. Just use Namecheap. Don’t try to host DNS locally at all, if you have no idea how DNS even works.

Thank you to everyone for your different advice. I retain the best which is that I should use the DNS of Namecheap which is the provider of my domain name.

Thank you again for your interventions.

Virtualmin is configured out of the box to enable you to use dns1.yourdomain.tld as your vanity nameserver for all domains that you host on the Virtualmin server. You do not need to make any additional configuration to Virtualmin for this to work, @chegmarco .

Here is what I did to get and configured to work as nameservers on

  1. I got my domain registrar to set up glue records for my domain to work with and

  2. at the time of initial setup of the Virtualmin server (or later, by invoking the Post-install Wizard) I specified as the primary nameserver and as the secondary (optional) nameserver. This is the most important step to get right to use your vanity nameservers with Virtualmin.

  3. I then created a virtual server in Virtualmin called Virtualmin automatically configured the appropriate DNS records for this domain to work with and

  4. I then created a virtual server for a client’s domain, say xyz.tld, and pointed the nameservers of xyz.tld to and

It just works out of the box if you get step 1 right.


Thank you mery much

TIP if your are setting up prof services.

Then do it in a Prof way

So take care of your DNS , maybe better to use proffesional external DNS service with GEOIP DNS and/ or DDOS DNS , Not only for FAST resolving time.

ONLY TIP advice don’t blame me… :wink:

So you can, but should you is the question to consider. Yes you can, there is a DNS server section in virtualmin, just point NS record to your server. But you need to have two servers at minimum, else you will have DNS issues each time your host has issues. Including mail and anything else using DNS. That’s why a lot of people are saying leave it to the experts that have many NS servers running. But seriously if you want to do this, run two servers at least to keep customers mail, etc working. You’ll also need to read up on all the pitfalls of doing it, like setting it up securely.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.