When Create a New Account fails, WHM almost always tells you why — but the message scrolls past in a wall of green “Done” lines with one red failure buried in it, and operators retry blindly instead of reading it. createacct runs as a sequence of stages (validate, add user, create domain, build DNS, set quota, run hooks), and the error names the stage that broke. Finding that one line is faster than any guess, and the fix is usually specific: a domain already in use, no free IP, a quota/filesystem problem, or a hook that refused the account.
What’s happening
createacct is the single operation behind both the WHM form and the API, and it is transactional-ish: it validates inputs first, then provisions the Linux user, the home directory and quota, the primary domain and DNS zone, the vhost, the mail domain, and the database grant prefix — and it fires prewwwacct and postwwwacct hooks around the work. A failure at any stage aborts and reports back. The common failures cluster into a few buckets.
Validation failures: the username is taken, too long (cPanel caps usernames), or reserved; the domain is already hosted on this server or is a known public suffix; the contact email is malformed. Resource failures: no free IP when a dedicated IP was requested, or the home filesystem is full or out of inodes so the quota/home cannot be created. DNS failures: the zone already exists, or a DNS cluster peer is unreachable so the zone cannot be pushed. Hook failures: a prewwwacct hook returned non-zero and refused the creation by design (a naming-policy or quota-policy guard). Each writes a distinct line, and the WHM error log keeps the full trace even when the UI truncates it.
How to verify
Read the full creation log rather than the truncated UI message:
# The authoritative log for account creation failures
tail -100 /usr/local/cpanel/logs/error_log
grep -i 'createacct\|create account' /usr/local/cpanel/logs/error_log | tail -40
Re-run the creation from the command line to see the error directly and unbuffered:
# Same operation, full output, no UI truncation
whmapi1 createacct username=newuser domain=newsite.com plan=starter contactemail=owner@newsite.com
Check the most common preconditions before retrying:
# Domain already hosted here? (must be empty)
grep -w newsite.com /etc/userdomains /etc/localdomains /etc/trueuserdomains
# Username already taken, too long, or reserved?
grep -w newuser /etc/passwd
id newuser 2>/dev/null
# Free IPs available if a dedicated IP was requested?
whmapi1 listips
# Home filesystem space and inodes
df -h /home
df -i /home
List any account-creation hooks that might be refusing the account:
# Standardized hooks bound to Accounts::Create
whmapi1 list_hooks | grep -i -A3 'Accounts::Create'
The fix / steps
- Read the real error first. Open
/usr/local/cpanel/logs/error_logand find the line with the failure, or re-runwhmapi1 createacctto get it unbuffered. Every fix below depends on knowing which stage failed; reading it takes ten seconds and saves a dozen blind retries. - “Domain already exists / in use” — find who owns it.
grep -w <domain> /etc/userdomains /etc/trueuserdomainsshows the owning account. If it is a leftover from a failed prior attempt, the account may be half-created — terminate the partial account cleanly (whmapi1 removeacct) before recreating. If a real account legitimately owns it, you cannot create a second; use a different domain or add it as an addon. - “Username … in use / invalid” — pick a valid, free name. Usernames must be unique, within cPanel’s length limit, lowercase alphanumeric, and not a reserved system name.
id <user>confirms whether it exists. Choose a shorter or different username; remember cPanel cannot rename later, so do not just append a digit you will regret. - “No available IP” — free or add one, or use the shared IP. A dedicated-IP request fails when none are free.
whmapi1 listipsshows availability. Either reclaim an unused dedicated IP, add IPs to the server (and route them), or create the account on the shared IP — most accounts do not need a dedicated IP at all. - Quota or home-directory failure — check disk and inodes. If the error is about quota setup or writing the home directory,
df -h /homeanddf -i /homewill show a full filesystem or exhausted inodes. Free space or inodes (old backups, runaway logs) before retrying; you cannot create an account on a filesystem that cannot hold its home. - DNS-stage failure — check the zone and the cluster. “Zone already exists” means a stale zone from a prior attempt — remove it in DNS Zone Manager then recreate. If the box is in a DNS cluster, an unreachable peer can fail the push; confirm cluster trust (WHM » DNS Cluster) is healthy, or temporarily create without cluster sync and reconcile after.
- Hook refusal — read which hook said no. If a
prewwwaccthook returned non-zero, the creation was refused on purpose (a naming or policy guard).whmapi1 list_hooks | grep Accounts::Createshows what is bound. Fix the input so it satisfies the policy, or correct the hook if it is over-rejecting — do not bypass a guard that exists for a reason. - Retry once, cleanly, after fixing the named cause. With the specific stage resolved, re-run creation and watch the log. If it now succeeds, verify the account (quota, DNS zone,
/etc/localdomains) as you would any new account. If it fails at a different stage, repeat from step 1 — you have uncovered a second precondition, not the same one.
A failed createacct is a labeled error, not a mystery — read the stage, fix that one thing, retry. Stack Harbor diagnoses account-provisioning failures and the hooks behind them under cPanel server management — start a conversation when account creation keeps failing on your servers.