Configuring DirectAdmin: Managing directadmin.conf, Changing Hostname, Adjusting Return-Path, Disk Usage Suspension

This article provides a comprehensive overview of how to configure DirectAdmin at the system level. It covers managing the main configuration file (directadmin.conf), using da config-set for safe updates, changing the server hostname, customizing the Return Path for diradmin emails, enabling user suspension based on disk usage, and selecting the correct quota partition for accurate disk reporting.

Managing directadmin.confChanging Hostname

~3 min read • Updated Mar 1, 2026

1. DirectAdmin Configuration Overview


General DirectAdmin configuration is managed from:


Admin Level → Server Management → Admin Settings

All changes made in this interface are stored in the main configuration Error! Hyperlink reference not valid.

/usr/local/directadmin/conf/directadmin.conf

Any modification to this file requires restarting the DirectAdmin service.

---

2. Viewing and Managing directadmin.conf


DirectAdmin uses internal defaults in addition to values stored in directadmin.conf. To view all active configuration options:

/usr/local/directadmin/directadmin config

Short version:

da c

To search for a specific setting:

/usr/local/directadmin/directadmin config | grep letsencrypt

2.1 Using da config-set (Recommended)

Instead of editing directadmin.conf manually, use:


da config-set NAME VALUE

To apply the change and restart DirectAdmin automatically:


da config-set dns_ttl 1 --restart

If successful, the command exits with code 0.

---

3. Changing the Server Hostname


The hostname must be a valid FQDN and must resolve to your server’s IP. Correct format:

server.domain.com

Never use the root domain (e.g., domain.com) as the hostname, as it conflicts with system email routing.

3.1 Hostnames to Avoid

  • mail.domain.com
  • webmail.domain.com
  • ftp.domain.com
  • smtp.domain.com
  • pop.domain.com

3.2 Changing the Hostname

Go to:


Admin Level → Admin Settings → Server's Hostname

Save the new hostname and allow one minute for DirectAdmin to restart.

---

4. Changing the Return Path for diradmin Emails


By default, DirectAdmin uses:

diradmin@hostname

To override this value:


da config-set diradmin_envelope [email protected]
systemctl restart directadmin

This is useful when you want diradmin notifications to come from a specific email address.

---

5. Suspending Users Based on Disk Usage


DirectAdmin does not suspend users automatically for exceeding disk usage because:

  • System quotas already enforce hard limits
  • Suspended users cannot log in to delete files

However, DirectAdmin provides an optional feature to suspend users who exceed their disk limit.

Note: DirectAdmin counts more than just system quota usage. It includes:

  • MySQL databases
  • Webmail data
  • Email accounts

Therefore, usage may exceed 100% even when system quotas do not.

---

6. Selecting the Correct Quota Partition


DirectAdmin relies on system quotas to calculate disk usage. Choosing the correct quota_partition is essential for accurate reporting.

6.1 Common Scenarios

A) /home is a directory inside /

If there is no separate /home partition:

quota_partition=/

B) /home is a symlink to /usr/home

Check with:

ls -la /home

If you see:

/home -> /usr/home

Then:

quota_partition=/usr

C) /home is a dedicated partition

Use:

quota_partition=/home

6.2 Listing All Partitions

df -hT

If you need to track quotas across multiple partitions, refer to:

DirectAdmin Feature 611

Written & researched by Dr. Shahin Siami