GoAdmio

create

Create a GoAdmio account from the command line

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/create provisions a new GoAdmio hosting account in one command. It:

It can also restore an account from the configuration file left in a previous account's logs, without passing any settings individually (see Restore mode).


Quick start

# New account with all defaults
/go/create --domain example.com

Syntax

# Create a new account
/go/create --domain <domain> [options]

# Restore an account from its saved site.conf
/go/create <domain>
Form Behavior
/go/create --domain <domain> [options] Every setting is passed as an --option value pair.
/go/create <domain> Used when no -- options are given. The single argument is restored as a domain.

--domain is the only required option. Everything else has a default.

An unrecognized option stops the command with CREATE: Unknown parameter: <option>. Nothing is created.

Domain normalization is silent. The value is lowercased, invalid characters are removed, a leading www. is stripped, and .com is appended if there is no dot. A typo such as --domain shop becomes shop.com, so always pass the full domain.


Options

A "—" in the Default column means the option is empty or unset unless you pass it.

Main options

Group Option Required Default Notes
Account --domain Yes — See domain rules.
Account --username No The domain name See username rules.
Account --password No Random 16-character alphanumeric See Security.
Account --email No info@<domain> Login details are emailed here.
Account --owner No — A value containing a dot must be an existing domain. The new account is then treated as its addon/subdomain.
Account --userid No 1 —
Account --packageid No 0 —
Account --fullname No — —
Account --mobile No — —
Account --description No — —
Account --timezone No — —
Limits --diskspace No 0 Megabytes; stored internally in bytes.
Limits --bandwidth No 0 Megabytes; stored internally in bytes.
Limits --inode No 0 —
Limits --ftpno No 100 Number of FTP accounts.
Limits --emailno No 100 Number of email accounts.
Limits --databaseno No 100 Number of databases.
Limits --subdomainno No 100 Number of subdomains.
Limits --aliasno No -1 Unlimited.
Limits --addonno No -1 Unlimited.
Web --phpversion No 8.3 Falls back to the latest installed PHP version if 8.3 isn't installed.
Web --documentroot No — —
Web --sslcertificate No 1 —
Web --sslredirect No — —
Web --permission No 755 —
Web --skeleton No 0 Pass y to copy /var/skeleton/ into the new site.
Web --bot No — —
Web --proxy No — —
Web --browsercachettl No — —

Advanced options

Group Option Default Notes
Shell --shell — —
Shell --jailedshell — —
FTP --ftpstatus — —
FTP --ftpupload — —
FTP --ftpdownload — —
FTP --ftpdelete — —
SMTP --smtphost — —
SMTP --smtpuser — —
SMTP --smtppass — —
SMTP --smtpport — —
Mail --mailttl 0 —
Dates --expireson One year from today Hosting expiry date.
Dates --domainexpireson — —
Internal --backup — —
Internal --backupstamp — —
Internal --apiignore — —
Internal --timestamp — —

Output

The command prints a single line of JSON. On success it also emails the same details to the account's email address.

Outcome What you get
Account created JSON with "success": true.
Created, but DNS doesn't point to this server Same, with a message in warning. The account is created.
Validation failure JSON with "success": false and an error reason.
Unknown option CREATE: Unknown parameter: <option>. Nothing is created.
Restore with no site.conf Exits without creating anything.

Success

The real output is a single line; it is formatted here for readability.

{
  "success": true,
  "title": "creating_goadmio_account",
  "warning": "",
  "result": {
    "goadmio_url": "http://<ip>:2020",
    "goadmio_urls": "https://go.example.com",
    "shared_ip_address": "<ip>",
    "domain": "example.com",
    "username": "example.com",
    "password": "<password>",
    "ftp_hostname": "<ip-or-domain>",
    "ftp_username": "example.com",
    "ftp_password": "<password>",
    "webmail_url": "http://<ip>:2024",
    "webmail_urls": "https://webmail.example.com"
  }
}

If the domain's DNS doesn't yet point to this server, warning is set to:

Warning: Domain <domain> Not Resolving To <ip>. Please correct DNS settings.

Validation failure

{"success":false,"title":"creating_goadmio_account","error":"<reason>"}

Security

[!WARNING] The generated or chosen password appears in plain text in the JSON output and the welcome email. If you pass --password on the command line, it can also be visible in the process list and saved in your shell history. Prefer the random default, then change it with password.

The database stores a salted hash, not the password itself.


Examples

# Full account with chosen username, password, and limits
/go/create --domain example.com --username example --password 'S3cureP@ss' \
  --email admin@example.com --diskspace 5000 --bandwidth 50000 \
  --ftpno 10 --emailno 50 --databaseno 20 --phpversion 8.2
# Addon domain under an existing primary domain
/go/create --domain shop.example.com --owner example.com
# Populate the new site with the server's skeleton files
/go/create --domain example.com --skeleton y
# Restore a deleted account from its saved configuration
/go/create example.com

Troubleshooting

An account is created even when the domain doesn't resolve to the server yet, so a DNS warning is not a failure.

Symptom Likely cause Fix
CREATE: Unknown parameter: <option> Misspelled or unsupported option. Check the name in Options, then run again.
Account created as shop.com, not shop No dot in the domain, so .com was appended. Pass the full domain.
Domain <domain> Not Resolving To <ip> DNS doesn't point here yet. Point the A record to the IP shown.
Domain or username already exists Already in the Site table. Choose another value, or remove the account with delete.
Recycle bin error The account is pending permanent deletion. Remove it from the recycle bin, then run again.
Error naming another primary domain The domain is already an alias. Remove the alias, or use a different domain.
Owner domain error /home/<owner> doesn't exist. Create the owner account first.
Username rejected It breaks a username rule. Pass a valid --username.
/go/create <domain> did nothing site.conf doesn't exist. Pass --domain with settings, or use recover.
No SSL certificate right after creation The certificate is requested about a minute later. Wait, then run ssl if it is still missing.

Details

Restore mode

/go/create <domain>

If /home/<domain>/log/include/site.conf exists, create loads every setting from it and calls itself again with the full option list and a new random password. The file is typically written when an account is deleted.

Situation Result
site.conf exists Account recreated with its saved settings and a new password.
PHPVersion is no longer installed The latest installed PHP version is used.
site.conf doesn't exist Exits without creating anything.

To restore from a snapshot instead, use recover.

Validation

Any failure prints a JSON error object (see Output) and exits.

Domain rules

Check Rule
Characters Only letters, numbers, dots, and hyphens are kept.
Case Lowercased.
www. prefix Removed.
Missing TLD .com is appended.
First character Must be a letter or number.
Double dots Not allowed (..).

Username rules

Check Rule
Length 32 characters or fewer.
First character Must be a letter.
Allowed characters Letters, numbers, dots, and hyphens.
All digits Rejected.
Double dots Not allowed (..).
Reserved names root, go, goadmio, admin, vmail, nobody, apache, nginx.

Availability checks

Check Rule
Domain not already hosted Checked against the Site table.
Username not already used Checked against the Site table.
Domain not in the recycle bin Remove a pending-deletion account from the recycle bin first.
Domain not already an alias Checked against the Alias table; the error names the primary domain.
Owner domain exists If --owner is a domain, /home/<owner> must exist.

What it creates

In short: validate input, create the database row, user, and directories, write the web server config, print and email the result, then finish background tasks.

flowchart TD
    A["create ..."] --> B{"Any -- options?"}
    B -- "No: create domain" --> R{"site.conf exists?"}
    R -- "No" --> X1["Exit, nothing created"]
    R -- "Yes" --> C["Load settings, new random password"]
    C --> D
    B -- "Yes" --> D["Validate and normalize input"]
    D -- "Fails" --> E["JSON error, exit"]
    D -- "Passes" --> F["Database row, FTP/system user, directories"]
    F --> G["Web server config and DNS check"]
    G --> H["Print JSON and email details"]
    H --> I["Background tasks: SSL request, permissions, PHP-FPM pool, zone, DKIM, File Manager"]
    I --> J["Scheduled in 1 minute: fpm and ssl"]
  1. Inserts the new row into the Site table. The password is stored as md5("<password>|<random-salt>"), with the salt alongside it.
  2. Creates the FTP/system user with adduser.
  3. Generates a CSR and private key for a paid SSL certificate, in the background, with openssl.
  4. Creates etc, log, www, sqlite, .trash, and mail under /home/<domain>.
  5. Fixes file and folder permissions, in the background, with fix.
  6. Restarts vsftpd.
  7. Creates the Apache and Nginx virtual host configuration with apache and nginx.
  8. Checks whether the domain's DNS points to this server, to include a warning if it doesn't.
  9. Prints the result as JSON and emails the details to the account's email address.
  10. Clears /etc/host.key.
  11. If --skeleton y was passed, copies /var/skeleton/ into www, in the background.
  12. Sets ownership of www to the new username.
  13. Creates the PHP-FPM pool configuration, in the background, with php-fpm.
  14. If /etc/nameservers exists, resets the DNS zone file, in the background, with zone.
  15. Generates the DKIM key and TXT record, in the background, with installdkim.
  16. Enables the File Manager, in the background, with fm.
  17. If /s3 exists, creates a matching folder for the domain.
  18. If no fpm restart is already scheduled, schedules /go/fpm and /go/ssl <domain> one minute later via at.

Background steps may still be running when the result prints. The site's www folder is owned by the new username, and log/include/site.conf is what Restore mode reads.


See also

Command Description
password Change a GoAdmio account password from the command line
username Change the GoAdmio account username
domain Change the primary domain of a hosting account
suspend Suspend a GoAdmio account via command line
alias Create an alias domain (parked domain) in GoAdmio
delete Delete a GoAdmio account from the command line
backup Create a backup for all GoAdmio accounts (local and remote)
recover Restore a deleted account from its latest snapshot
adduser Create the system/FTP user for the account (used internally)