DirectAdmin Scripts Explained – Complete Reference for All Scripts in /usr/local/directadmin/scripts

DirectAdmin ships with a large collection of built in scripts designed to automate system tasks, manage services, handle backups, configure DNS, manage IPs, repair accounts, and more. This guide provides a complete reference to all scripts located in /usr/local/directadmin/scripts, explaining their purpose and how they are typically used.

All ScriptsDirectAdmin

~3 min read · Updated Mar 1, 2026

1. Introduction


The directory /usr/local/directadmin/scripts contains dozens of utility scripts used by DirectAdmin for system management, automation, troubleshooting, and maintenance. This article serves as a complete reference describing the purpose of each script.

---

2. Full List of DirectAdmin Scripts and Their Purpose


ScriptPurpose
add_email.shAdd an email account via command line.
addipAssign an IP to eth0:# and register it in DirectAdmin and the OS.
awstats_process.shProcess Awstats for a domain. Usage: ./awstats_process.sh USER DOMAIN.COM
backup_roundcube.phpBackup per domain RoundCube settings into XML.
change_database_username.phpMove a database to a different user.
change_username.shRename a DirectAdmin user.
check_named_conf.shImprove named security and restrict zone transfers.
connection_info.shShow connected IPs, top connection counts, and ss output.
cron_deny.shPrevent apache/webapps from running crontab.
custom/Directory for custom scripts.
decrypt_file.shDecrypt AES 256 encrypted files (GDPR compliant).
directadminMain DirectAdmin daemon.
directadmin_cronDirectAdmin cron file.
directadmin.rotateLogrotate configuration for DirectAdmin logs.
directadmin.serviceSystemd service file for DirectAdmin.
dkim_create.shCreate DKIM keys and queue DNS updates.
dnssec.shManage DNSSEC keys and configuration.
doChecks.shVerify system readiness for DirectAdmin.
dovecot_compress.shCompress Maildir emails using gzip.
encrypt_file.shEncrypt files with AES 256 (GDPR backups).
extra_load_info.shShow memory usage, virtual memory, and MySQL queries.
fix_da_user.shRebuild user data files in data/users.
fstab.shEnsure quota settings exist in fstab.
ftp_download.phpDownload backups from FTP (PHP version).
ftp_download.php.curlDownload backups from FTP using curl.
ftp_list.phpList files on remote FTP.
ftp_upload.phpUpload backups to FTP.
getLicense.shStore a new license key into license.key.
get_main_ip.shReturn the server’s primary outbound IP.
get_main_ip6.shReturn the server’s primary IPv6 address.
hostname.shChange the server hostname.
ip_info.shRetrieve PTR and WHOIS info for an IP.
ipswap_reseller.shChange IP for all users under a reseller.
ipswap.shSwap IPs on the server.
is_systemd.shDetect whether the OS uses systemd.
move_domain.shMove a domain between users.
move_user_to_reseller.shMove a user to another reseller.
namedStart/stop script for named service.
ncftp.shInstall NcFTP for backup operations.
READMEInstallation notes for DirectAdmin.
redirect.phpCopy of redirect.php used in /var/www/html.
removeipRemove an active IP from eth0.
rename_database.shRename a database.
rename_database_with_user.shMove a database and its user to another reseller.
reseller_to_user.shConvert a reseller account to a user.
reset_da_admin_password.shReset the da_admin password.
restore_roundcube.phpRestore RoundCube settings from XML.
reverse_ip_lookup.shPerform rDNS lookup using dig -x.
rotate_email_usage.shReset daily email usage logs.
selinux.shDisable SELinux before installation.
set_permissions.shFix ownership and permissions for DirectAdmin files.
setup.shDirectAdmin installation script.
squirrelmail_to_roundcube.shMigrate SquirrelMail address book to RoundCube.
startipsLoad IPs into the network interface.
startips-installer.shInstall startips hook scripts.
startips.serviceSystemd service for startips.
sysbk.shInstall sysbk, ncftp, and SSH keys.
tlsa.shRebuild TLSA DNS records.
update.shDirectAdmin update script.
user_to_reseller.shConvert a user account to a reseller.
---

3. Conclusion


These scripts form the backbone of many DirectAdmin operations and provide administrators with powerful tools for automation, troubleshooting, and system management. Understanding their purpose helps streamline server administration and enables faster problem resolution.

Written & researched by Dr. Shahin Siami

Related Articles

Email Client Configuration & Dovecot Quota/Monitoring Guide for DirectAdmin Users

This guide explains how to configure popular email clients (iPhone Mail, Thunderbird, Gmail POP/SMTP), enable Dovecot LMTP quota warnings, and check the last login time for all email accounts on a DirectAdmin server. It includes step by step instructions, recommended IMAP/SMTP settings, and useful administrative scripts.

Continue

Troubleshooting Dovecot in DirectAdmin – Fixing IMAP Errors, Authentication Issues, and SSL Certificate Checks

Dovecot is the IMAP/POP3 server used by DirectAdmin. Sometimes users encounter errors such as “Connection dropped by IMAP server” or “unknown user” during authentication. This guide explains how to fix corrupted Dovecot indexes, understand authentication logs, hide unnecessary warnings, and manually inspect SSL certificates on IMAP ports 143 and 993.

Continue

DNS Troubleshooting in DirectAdmin – When named is Running but Domains Do Not Resolve

Sometimes the named (BIND) service runs normally, yet DNS queries fail or domains do not resolve from outside. This guide provides a complete troubleshooting workflow for checking named listeners, firewall rules, named.conf configuration, DNS propagation issues, subdomain problems, resolv.conf errors, and common Apache/Nginx misconfigurations.

Continue

Managing DNS Records in DirectAdmin – Complete Practical Guide for Administrators

DirectAdmin provides a powerful DNS management system that allows administrators to control TTL values, create SRV records, enable DNSSEC, manage subdomain delegation, automate TLSA records, and perform mass DNS updates. This guide explains all essential DNS operations in DirectAdmin with real-world examples and best practices.

Continue

DNS and Nameservers in DirectAdmin – Complete, Practical, and Professional Guide

DNS is the backbone of the internet, responsible for translating domain names into IP addresses. DirectAdmin allows you to create private nameservers (ns1/ns2), manage DNS zones, configure DNS clustering, use external DNS, and troubleshoot common issues. This guide provides a complete, clear, and practical explanation of DNS concepts and their implementation in DirectAdmin.

Continue

CustomBuild in DirectAdmin – Complete Guide to Installation, Updates, Configuration, and Advanced Customization

CustomBuild is DirectAdmin’s primary software management system. It installs, updates, configures, and rebuilds essential services such as Apache, Nginx, PHP, MariaDB/MySQL, Exim, Dovecot, FTP servers, and more. Because most components are compiled from source, CustomBuild offers exceptional flexibility, fast access to new versions, and optimized performance.

Continue