create-domain

Create a virtual server

This program can be used to create a new top-level, child or alias virtual server. It is typically called with parameters something like:

   virtualmin create-domain --domain foo.com --pass 123 --desc "The server for foo" --unix --dir --webmin --web --dns --mail --limits-from-plan

In order to create a sub-domain --parent flag must be user, for example:

   virtualmin create-domain --domain sub1.foo.com --parent foo.com --pass 123 --dir --dns --web --ssl

This would create a server called foo.com , with the Unix login, home directory, Webmin login, website, DNS domain and email features enabled, and disk quotas based on those set in the default plan. If you run this program with the --help option, you can see all of the other command-line options that it supports. The most commonly used are those for enabling features for the new server, such as --mysql and --logrotate.

To create a virtual server with a private IP address, you can use the --ip option to specify it explicitly. If your Virtualmin is configured to automatically allocate IP addresses, use the --allocate-ip option instead, to have a free address chosen from the allocation ranges. If you want to use a virtual IP that is already active on the system, you must add the --ip-already command-line option.

If your system supports IPv6, Virtualmin can also add a v6 address for a new virtual server with the --ip6 flag followed by an address in the correct format. If you have IPv6 allocation enabled in the server templates, instead use the --allocate-ip6 flag to have Virtualmin select a free address automatically.

To create a server that is owned by an existing user, use the --parent option, followed by the name of the virtual server to create under. In this case, the --pass , --unix , --webmin and --quota options are not needed, as a user for the new server already exists.

To create an alias of an existing virtual server, use the --alias option, followed by the domain name of the target server. For alias servers, the --pass , --unix , --webmin , --dir and --quota options are not needed.

You can specify limits on the number of aliases, sub-servers, mailboxes and databases for the new domain owner using the --max-aliases, --max-doms, --max-mailboxes and --max-dbs options. Alternately, you can choose to have all limits (including quotas) set based on the plan using the --limits-from-plan command line flag.

If the virtual server has the MySQL or PostgreSQL features enabled, by default the password for the server's accounts will be the same as its administration login. However, you can specify a different password with the --mysql-pass or --postgres-pass flags, each of which are followed by the password to set for that database type. These options are only available for top-level virtual servers though.

Command Line Help

Adds a new Virtualmin virtual server, with the settings and features
specified on the command line.

virtualmin create-domain --domain domain.name
                         --pass password-for-unix-user |
                         --passfile password-file
                        [--parent domain.name | --alias domain.name |
                         --superdom domain.name]
                        [--desc description-for-domain]
                        [--email contact-email]
                        [--user new-unix-user]
                        [--group new-unix-group]
                        [--unix]
                        [--dir]
                        [--dns]
                        [--mail]
                        [--web]
                        [--webalizer]
                        [--ssl]
                        [--logrotate]
                        [--mysql]
                        [--ftp]
                        [--spam]
                        [--virus]
                        [--status]
                        [--webmin]
                        [--virtualmin-awstats]
                        [--virtualmin-dav]
                        [--virtualmin-svn]
                        [--default-features] | [--features-from-plan]
                        [--allocate-ip | --ip virtual.ip.address |
                         --shared-ip existing.ip.address]
                        [--ip-already]
                        [--allocate-ip6 |
                         --ip6 virtual.ip.address]
                        [--ip6-already]
                        [--dns-ip address | --no-dns-ip]
                        [--max-doms domains|*]
                        [--max-aliasdoms domains]
                        [--max-realdoms domains]
                        [--max-mailboxes boxes]
                        [--max-dbs databases]
                        [--max-aliases aliases]
                        [--quota quota-for-domain|UNLIMITED]
                        [--uquota quota-for-unix-user|UNLIMITED]
                        [--template "name"]
                        [--plan "name"]
                        [--limits-from-plan]
                        [--prefix username-prefix]
                        [--db database-name]
                        [--fwdto email-address]
                        [--reseller name]
                        [--style name]
                        [--content text|filename]
                        [--mysql-pass password]
                        [--skip-warnings]
                        [--field-name value]*