CustomBuild is DirectAdmin's tool for installing and updating the server software stack: web server, PHP, database, mail server, FTP and more. It is available both in the panel and on the command line. Regular CustomBuild updates are essential for security on any DirectAdmin server.
Before you start
- Admin access to DirectAdmin and root SSH access to the server.
- A recent backup or VPS snapshot before major changes such as a web server switch or MariaDB upgrade.
Update DirectAdmin itself
DirectAdmin updates automatically on most installations through its update channel. To check or trigger it manually, go to Admin Level → Licence / Updates (or Server Manager → Licence) and click Update DirectAdmin, or run as root:
da updateUpdate software in the panel
- Go to Server Manager → Plugin Manager if CustomBuild is not visible, and make sure the CustomBuild plugin is installed (it is by default).
- Open Server Manager → CustomBuild.
- Click Update software (or Update data first to refresh version lists).
- The Software updates list shows each package with the installed and available version. Click Update next to an item, or Update all.
- Watch the output window until it finishes.
Update from the command line
cd /usr/local/directadmin/custombuild && ./build update && ./build versionsThen update everything that is outdated:
./build update_versionsAdd or change PHP versions
- In CustomBuild → Edit Options, set php1_release, php2_release, php3_release and so on to the versions you want (for example 8.3, 8.2, 8.1).
- Set php1_mode to
php-fpmfor the best isolation and performance (orlsphpwith LiteSpeed). - Save and click Build PHP, or run
./build php. - Rewrite web server configs with
./build rewrite_confs.
Users can then choose a version per domain; see switch PHP version per domain.
Change the web server
In Edit Options, the webserver option chooses between apache, nginx, nginx_apache (Nginx proxy in front of Apache) and litespeed or openlitespeed. After changing it, run ./build update, ./build all d and ./build rewrite_confs. Test thoroughly, because .htaccess behaviour differs under pure Nginx.
Useful CustomBuild commands
| Command | What it does |
|---|---|
./build versions | Show installed vs. available versions |
./build update_versions | Update all outdated software |
./build php n | Rebuild PHP versions |
./build rewrite_confs | Regenerate web server configuration |
./build letsencrypt | Update the Let's Encrypt client |
Troubleshooting
- Build fails with compiler errors: install OS updates first (
dnf updateorapt upgrade) and run./build updateagain. - Web server will not start after update: run
./build rewrite_confsand check the error log, for example/var/log/httpd/error_log. - Old PHP still selected for a site: the user's domain is set to that version; change it in the domain's PHP selector.
- Disk full during build: clean
/usr/local/directadmin/custombuildwith./build clean.
