Need help with pointing domains to Virtualmin server

OS type and version Ubuntu 22.04
Webmin version 2.021
Virtualmin version Latest
Related packages Bind, Virtualmin

Ubuntu VM hosted on Oracle CLoud with static public IP and no domain.

The installation of virtualmin was easy but I am not having any luck with setting up domains in Webmin/Virtualmin.

1.) Set default domain of Virtualmin interface
I have added a cloudflare subdomain to point to Virtualmin server IP. It errors out with site cannot be reached. The A record points to the Virtualmin IP.
I am trying to make the cloudflare subdomain open up the VIrtualmin portal that is currently set as IP x.x.x.x.x:10000
Is it doable?

2.) Pointing domains registered elsewhere to new virtual servers in Virtualmin.

I cannot locate clear instructions on this even though it is a common scenario.
I wan to to point domains like and to Virtualmin server, which will in turn forward each to their corresponding virtual servers with same names.
Can anyone share the method of doing that?

I have come across a lot of DNS related questions about Virtualmin but DNS is not my strong point specially with Linux.

see if this helps

Thanks Stefan, the file /etc/dhclient.conf does not exist.
Does it mean the issue is due to DHCP? It does seem like IP is being assigned by oracle cloud.
Under Hostname and DNS Client settings, Search Domains field has value

I will clean wipe the vm and start from scratch to use cloudflare domain ( while installing Virtualmin, hopefully that will make it work better.
I am trying to NOT use a registered domain just to point to Virtualmin server.
If Virtualmin can work with just a public IP and point individual domains to their virtual servers, that will solve my problem.

Thanks Stefan, the file /etc/dhclient.conf does not exist.
Does it mean the issue is due to DHCP? It does seem like IP is being assigned by oracle cloud.

That section of the article only applies if you are using DHCP not if you have a static IP.

I am trying to NOT use a registered domain just to point to Virtualmin server.
If Virtualmin can work with just a public IP and point individual domains to their virtual servers, that will solve my problem.

I’m pretty sure VM needs a registered domain or subdomain to install. That can be any subdomain you can create from your domain you have control over. ( or or just create dns records for it also pointing to your server IP. once installed you can access the control panel with IP or domain

1 Like

Thanks pop, I did make it work initially without a domain. The only thing I had to skip was domain verification on initial setup.
I am going to clean wipe and start fresh with cloudflare subdomain as the domain for the new VIrtualmin instance.
Any ideas on what Nameserver to use in new installation? Can I use a public nameserver like cloudflare or does the virtualmin itself has to be the nameserver?

I use DNS and the name servers at my registrar. If you do that turn off DNS for domains in Features and Plugins.

second part of the faq.

How do I setup nameservers for my server?

Absolutely not!
It requires a fully qualified domain name something like my.madeupdomain.tld is good enough and works perfectly well. In fact using a real is a waste of a domain registration.

You do need a registered domain name to set up a working Virtual Server (so it can be seen on the net.

My bad. I meant fully qualified domain not registered domain. Thanks for pointing that out.

So my understanding with a virtualmin install is that the FQDN has to resolve so my. [ madeupdomain ] .tld the madeupdomain part needs to be a domain you register so you can point my.domainiown.tld to the IP of your server.

I believe I have read that @Joe states that it creates problems to install with an IP rather than a FDQN but I can’t find the reference.

Once the FDQN that resolves to the server is used to install VM the OP can choose whether or not he uses DNS externally through his registrar or handled by VM.

The process for using external DNS for VM is not step by step spelled out by VM but it is very simple after you figure it out. If you don’t want VM to handle DNS you have to tell VM not to by unclicking DNS domain > Features and Plugins. It will then stop trying to.

You then have to create all the needed records yourself. (VM tells you what you need to create under Server Configuration > Suggested DNS Records)

I prefer to not have my nameservers handled by VM because of the limitation of my own server with only one IP and one server. My registrar is easy to control DNS through and propagates almost as fast as changes are made is a plus. They also allow me to use there nameservers.

There are many good ways to setup DNS to take care of your needs.
If you do want VM to handle DNS follow the guide linked by @stefan1959

I always create all needed records and check where they resolve before creating a virtual server. My template That way there are no problems with VM auto generating letsencrypt cert

Then how do all of mine work?
I do not own a domain called east-coast-usa.tld in fact no one does because the .tld is not (yet) available as a recognised Top Level Domain
There are no A/AAAA records that point to it (and there cannot be any). That FQDN is pure fiction. Yet it IS part of the hostname of my working box. host.east-coast-usa.tld. I have others eg host.usa.tld

I had no idea you could do that. Good to know. BTW why do you want to do that and not have your host resolve?

I really must look up that reason @Joe keeps posting and have it in my pocket as a link to repost.

For me the overriding reason is that I host multiple domains on each box (ie each install of Virtualmin) each of those domains has to resolve (obviously to be a VS) I do not want to waste a domain simply to point to a box. As far as I am concerned that is what an IP is for.

Install your Operating System
Start with a freshly installed, Grade A supported Operating System on your server or VPS. Rocky and Ubuntu LTS are very popular options for hosting, and are a safe choice, but any Grade A supported system should work fine. Be sure to configure your system with a fully qualified domain name, as it will save you a lot of time and documentation spelunking later.

The install script may ask you some questions. If your system does not have a fully qualified hostname, the script will ask you to provide one. The name of the system can be anything you want, but it must be fully qualified and should not match a name you’ll be hosting mail for. For example, if you have domain you might name the server or What name you choose is unimportant, but it must be fully qualified, it must not match a domain you’ll be managing in Virtualmin, and it must resolve, for several mail operations to work correctly.

Must have to do with mail that VM sets up for the host that not everyone needs. I have more subdomains pointing to virtual servers than domains and don’t see a problem making one for my host from a domain I can make records.

(but do not use a name you’ll be hosting in Virtualmin). We recommend you choose a name that is not one for which you will be receiving mail, in order to simplify later configuration. A good choice is to use a name server designator, such as “”. Some customers also choose something like “” or “”. Any of these would be valid and would satisfy the install script and the services that rely on this option.

which is why I chose host.usa.tld, host.japan.tld etc

You don’t need to “waste” a domain for the hostname of the server. Use a fully qualified domain name within some zone you already own!

I use stuff like,, etc. That costs me nothing. I’m not wasting anything, I can have as many names in my zone as I want, it’s my (our) zone!

If you make up a tld, you can’t reliably send mail out of your server, unless you also manually configure Postfix to send from one of your names that resolves. Receiving mail will also be potentially weird (depending on how your system resolves names).

I continue to recommend you use a FQDN for the hostname of your system, and that it (eventually) resolves (it does not have to resolve at Virtualmin installation time, but should resolve by the time you start sending/receiving mail). That FQDN should not be a name you will be hosting within Virtualmin. It should be for the server itself, not used for mail or websites.

1 Like

A subdomain that resolves serv.mydomain.mytdl allows me have ssl cert on my host and it doesn’t keep me from using mydomain.mytdl for a virtual server

That doesn’t follow from the paragraph you posted!

You can (should) use a name within a real zone that you can make resolve. Making up a name just means you have problems to solve immediately before mail works.

Thank you all for your input.

I was able to make it work.

I clean wiped the VM and installed Virtualmin as fresh.
This time I used domain as domain name. The A record of this domain in DNS control panel is pointing to the IP address of the Virtualmin server.
I also had to change add hostname entry on /etc/hosts file:

This part is only documented in digital ocean tutorial.

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