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.

Advanced CustomizationCustomBuild

~3 min read • Updated Mar 1, 2026

1. What Is CustomBuild?


CustomBuild is the core software management tool inside DirectAdmin. It handles installation, updates, configuration, and rebuilding of nearly all major services:

  • Web servers (Apache, Nginx, OpenLiteSpeed)
  • PHP versions and extensions
  • MariaDB/MySQL
  • Exim, Dovecot, SpamAssassin
  • FTP servers
  • Web applications (phpMyAdmin, RoundCube, etc.)

Because CustomBuild compiles from source, it provides:

  • Full customization
  • Immediate access to new versions
  • Lower memory usage (only required modules compiled)
---

2. Getting Started with CustomBuild


Graphical Interface:


Admin Level → CustomBuild → Updates

Command-Line Interface (CLI):

Main command:


da build

Or directly:


/usr/local/directadmin/custombuild/build

Main configuration Error! Hyperlink reference not valid.

/usr/local/directadmin/custombuild/options.conf
---

3. Essential CustomBuild Commands



# List installed versions
da build versions

# General help
da build help

# List all configurable options
da build opt_help

# Full detailed option list
da build opt_help full

# Rebuild webserver configs
da build rewrite_confs
---

4. Updating Software


Update individual services:


da build apache
da build php
da build exim
da build dovecot

Update all services:


da build update_versions

Full rebuild (use only for fresh installs or major repair):


da build all
---

5. Automatic Updates


Recommended auto-update setup:


da build set cron yes
da build set cron_frequency weekly
da build set email [email protected]
da build set notifications yes
da build set clean_old_webapps yes
da build cron

Fully automatic updates (use with caution):


da build set updates yes
da build cron
---

6. Deep Customization with CustomBuild


CustomBuild supports advanced customization through the custom/ directory.

Directory structure:

  • configure/ → default configs
  • custom/ → your overrides (higher priority)
---

Example: Add a custom flag to Nginx


cd /usr/local/directadmin/custombuild
mkdir -p custom/nginx
cp -fp configure/nginx/configure.nginx custom/nginx/configure.nginx

# Edit the file and add your flags
da build nginx
---

Example: Change Apache MPM


mkdir -p custom/ap2/conf/extra
cp -fp configure/ap2/conf/extra/httpd-mpm.conf custom/ap2/conf/extra/httpd-mpm.conf

# Edit the file
da build rewrite_confs
---

7. Pre/Post Build Hooks (CustomBuild 2.0+)


You can run custom scripts before or after any build action.

Example:


mkdir -p custom/hooks/nginx/post
vi custom/hooks/nginx/post/myscript.sh

Script content:


#!/bin/bash
echo "Nginx build completed! Running custom tasks..."
---

8. Choosing the Right Web Server


Web ServerProsConsShared Hosting?
Apache Industry standard, full .htaccess support Higher RAM usage, slower for static files Yes
Nginx Very fast, low memory usage No .htaccess support No
Nginx + Apache Speed + .htaccess support Higher RAM usage Yes (8GB+ RAM)
OpenLiteSpeed Excellent performance, HTTP/3, built in cache Limited .htaccess support Yes
LiteSpeed Best performance, HTTP/3, strong caching Commercial license required Yes
---

Switching web servers:


da build set webserver openlitespeed
da build openlitespeed
da build php
da build rewrite_confs
---

9. Troubleshooting & Advanced Tips


Debug CustomBuild:


da build apache --debug

This keeps temporary files in /tmp/ for inspection.

---

If you see g++ or libexpat errors:

CentOS/RHEL/CloudLinux:


yum -y install gcc-c++

Debian/Ubuntu:


apt-get -y install g++
---

Add a custom alias (e.g., /billing):


cd /usr/local/directadmin/custombuild
echo "billing=billing_system" >> custom/webapps.list
da build rewrite_confs
---

Change subdomain DocumentRoot:


User Level → Sub-Domains Setup → Document Root Override

Written & researched by Dr. Shahin Siami