DirectAdmin
Hosting accounts on DirectAdmin: the Login Key, shared or assigned IP, every module command, one-time sign-in, usage and troubleshooting.
The DirectAdmin module builds hosting accounts on a DirectAdmin server through the DirectAdmin API. When an order is paid it creates the user, and later it suspends, unsuspends, changes the package and the password and removes it, reads disk and bandwidth use, and gives a one-click sign-in to DirectAdmin. It is a free provisioning module for hosting companies whose servers run DirectAdmin. How services, servers and the service page work in general is in Services and servers.
Switching it on
- Setup → Addon Modules: DirectAdmin is built in. If it is off, press Activate.
- Setup → Servers → Add: make the server (below) and press Test Connection.
- Setup → Products / Services: open the product, tab Module Settings, choose DirectAdmin, pick the server group and fill in the product settings.
The server
| Field | What to enter for DirectAdmin |
|---|---|
| Name, Hostname, IP Address | The hostname is used first. The IP Address matters here: it is the address new accounts are given when the product uses the shared IP. |
| Module | DirectAdmin. Save once to load the module's own fields. |
| Username | The reseller or admin user that owns the accounts. Empty means admin. |
| Access Hash / API Token | A DirectAdmin Login Key for that user. If it is filled it is used instead of the password. |
| Password | The user's password, used when no Login Key is given. |
| Assigned IP Addresses | One per line. Used for accounts that need their own IP (see below). |
| Secure and Port | Secure on. The port is empty or 2222, DirectAdmin's port. |
The key and the password are stored encrypted, and the module does not check the server's certificate. The calls are sent with basic authentication (the user name and the key or password). If you restrict the Login Key to certain commands or addresses, allow the commands used here (account creation, user selection, password, modify user, usage, login keys, services) and your billing server's IP address.
Product settings
On the product's Module Settings tab:
| Setting | Meaning |
|---|---|
| Package | The DirectAdmin user package name, exactly as it is in DirectAdmin. |
| IP address | Shared (the server IP): accounts use the server's main IP address. Assigned (a dedicated IP): use the service's Dedicated IP; if it has none, the first address in the server's Assigned IP Addresses; if that is empty too, the main address. |
When an address from the assigned list is used, it is saved on the service as its Dedicated IP.
What each command does
| Command | Effect on the server |
|---|---|
| Create | Creates the user with the service's username, password, domain and IP, the client's e-mail and the package. DirectAdmin's own welcome e-mail is switched off, so the client only receives yours. |
| Suspend / Unsuspend | Suspends or unsuspends the user. DirectAdmin has no field for the reason; yours stays in AIOBilling. |
| Terminate | Deletes the user, confirmed. |
| Change Password | Sets a new password, acting as that user. |
| Change Package | Switches the user to the product's package. A product with none gives The product has no DirectAdmin package set. |
| Login to Control Panel | A one-time sign-in URL (valid for 5 minutes, one use) made with the account's own password. If AIOBilling does not hold the password, or DirectAdmin refuses, the link opens the DirectAdmin sign-in page. |
| Usage | Once a day the cron asks for each active or suspended account in turn (the first 300 on a server), because DirectAdmin has no bulk answer. A very large server therefore takes a while. |
Typical workflow
- A client orders and pays. With Automatic Setup on payment the module runs Create.
- The user exists, the service is Active and your welcome e-mail goes out.
- An unpaid renewal suspends; payment unsuspends. See Automation.
- Terminate deletes the user when you end the service.
Testing
Press Test Connection on the server form. A good answer reads Connected to DirectAdmin (N services listed). Then make a small test package, a product that uses it, order it as a test client, pay with Add Payment, and check the user in DirectAdmin. Try Suspend, Unsuspend, Change Password and Terminate.
Troubleshooting
Every call is written to Utilities → Module Log (module directadmin); press View. A failed create, suspend or unsuspend also e-mails the administrators.
| Message | Cure |
|---|---|
| The server has no password or login key. | Fill Password or Access Hash / API Token. |
| DirectAdmin could not be reached: ... | Wrong host or port, a firewall that blocks 2222, or no curl. |
| DirectAdmin: ... with a text | DirectAdmin refused: a package that does not exist, a user name or domain that is taken, or an IP that is not free. |
| DirectAdmin answered HTTP 4xx. | Wrong user or key, or the server's IP address is not allowed by DirectAdmin. |
| DirectAdmin gave an empty answer. | Test Connection reached something that is not DirectAdmin's API. |
More in Troubleshooting.
Was this helpful?
Updated 2026-11-03