General DirectAdmin configuration is performed from Admin > Server Management > Admin settingsopen in new window.
Changes from there are saved into the main configuration file used in DirectAdmin:
Every change to it requires a restart of the directadmin service.
Main DirectAdmin configuration file
Besides of options listed in the
directadmin.conf, the panel itself uses some pre-defined defaults. To list all current configuration options:
If you are looking for a specific option, just grep it, like so (using 'letsencrypt' as an example):
/usr/local/directadmin/directadmin c | grep letsencrypt
Adding a value to the
directadmin.conf would override the internal default.
Instead of editing the
directadmin.conf directly, you may use the
./directadmin set functionality to change the options:
cd /usr/local/directadmin ./directadmin set name value
Add restart key to have directadmin restarted with dataskq.
For example, to set dns_ttl to 1, execute the commands:
cd /usr/local/directadmin ./directadmin set dns_ttl 1 restart
If the setting has been changed successfully, directadmin will exit with code 0 and the following output:
How to change a hostname
The hostname is the name you give your server. It needs to be a fully qualified domain name, meaning it needs to resolve and should resolve to your server IP.
The value of your hostname should be in the form similar to:
where you run/manage domain.com (usually something like your webhost domain). The value "server" or something like that needs to be in front of it (
host. are all valid).
NOTE: Never use just "domain.com" as the hostname as this will conflict with the email in your actual domain.com hosting account (with regards to how system accounts get their emails).
To change your hostname:
Go to Admin Level -> Admin Settings -> Server's Hostnameopen in new window, set it, and allow 1 minute for DA to restart.
How to change the Return Path for diradmin emails
Use the new
diradmin_envelope option, which allows you to override the default "email@example.com" in the Return-Path as desired:
/usr/local/directadmin/directadmin set diradmin_envelope firstname.lastname@example.org service directadmin restart
By default, this is disabled and relies on your hostname being set up/resolving correctly.
Suspend user based on disk usage
By default, disk usage is not a candidate to trigger account suspensions. This is for a few reasons, one being the fact that the system quota will enforce the upper limit anyway (for user-created files) and also because they won't be able to log in to delete files if they're suspended.
If you still want to suspend users who go over their usage limit, you can do so by using this feature.
If you're wondering why the system quotas would allow more than 100% usage, the answer is that they don't. DirectAdmin counts more than just system quotas in its usage total. Things like mysql, webmail data, etc., are all included in the totals, hence the number can exceed 100%.
Which partition to use in the config?
Many systems have many different variations on the partition setup. Knowing which partition DirectAdmin is supposed to use is important.
The reason this is important is because DA uses the system quotas to see how much space a user is using. With an incorrect
quota_partition setting, the User's disk usage report can be inaccurate.
DirectAdmin will make a few guesses as to which partition you should be using, but can't predict all scenarios.
The User's data will be stored in
/home/username, by default. So we need to make sure that the
/home directory is being counted. This means that if you have a
/ partition and no
/home partition, then the
/home is simply a directory on the
/ partition. You'd set your
Some systems (FreeBSD mainly) will come with a very large
/usr partition. The
/home directory is actually a symbolic link to
/usr/home so the quota partition should be set as
quota_partition=/usr. You can see if you have this setup by typing:
ls -la /home
If it shows an arrow pointing to
/usr/home, then you want to have
/usr for your partition. (e.g.,
/home -> /usr/home).
And of course, if
/home is actually a partition, then
/home would be the partition you'd want.
To see a list of all partitions on your system, type:
Once you're sure you've got the correct partition, then you can move on to make sure that quotas are correctly running by clicking on the related link below.
Note that if you're trying to set up two separate partitions, but you want DA to report system quotas for both, use this guide:
http://www.directadmin.com/features.php?id=611open in new window
How to disable "License File has been updated" success notifications
If you no longer want to get the notices with subject "License File has been updated", this can now be disabled:
/usr/local/directadmin/directadmin set notify_on_license_update 0 service directadmin restart
Any failures will still be sent.