Updated: 15 November 2026 · Applies to: DirectAdmin with CustomBuild 2

AWStats on a DirectAdmin server is installed by the server administrator with CustomBuild: run da build set awstats yes and then da build awstats as root. After that, DirectAdmin builds AWStats reports for every domain, and users see them with their other website statistics.

Enable AWStats (server administrator)

Log in to the server over SSH as root and run:

da build set awstats yes
da build awstats

According to DirectAdmin, this installs AWStats and adds awstats=1 and webalizer=0 to directadmin.conf. Webalizer is DirectAdmin's default statistics tool, so this switch turns Webalizer off and uses AWStats in its place. DirectAdmin notes that you can override the webalizer=0 value if you want to keep both.

Older guides, including the earlier version of this article, use the CustomBuild script directly from its folder (cd /usr/local/directadmin/custombuild, then ./build set awstats yes and ./build awstats). The da build form above is the one DirectAdmin's current documentation uses.

These are root commands on a DirectAdmin server, which could not be installed in our test environment, so they are taken from DirectAdmin's documentation.

When the statistics appear

AWStats does not show anything the moment it is installed. DirectAdmin fills it in during its regular statistics run (the "tally"), which reads each domain's web server logs. Expect the first reports after the next tally. According to DirectAdmin, the logs are processed in place during the tally, and the web server is restarted afterwards.

To build the statistics of one account straight away instead of waiting, DirectAdmin's documentation adds a task to its queue (replace USERNAME with the account name):

echo "action=tally&value=USERNAME&type=user" >> /usr/local/directadmin/data/task.queue

Where the reports are kept

  • Static report pages: /home/USERNAME/domains/example.com/awstats
  • AWStats configuration and data: /home/USERNAME/domains/example.com/awstats/.data
  • Each subdomain gets its own AWStats pages.

According to DirectAdmin, the reports show up in the panel where Webalizer statistics appeared before, including on the subdomains page, and the domain's stats link points to the AWStats folder instead of the Webalizer one.

Turning AWStats off for one account

The server setting is on or off for everyone, not per domain. According to DirectAdmin, a user can switch AWStats off for their own account in the account settings, and an administrator can do the same by setting awstats=0 in that user's user.conf, which overrides the server setting.

Country statistics

The quickest way DirectAdmin documents is to set DNSLookup=1 in the domain's AWStats configuration file in the .data folder. DirectAdmin warns that this is likely to make the statistics run much slower. The older GeoIP plugin method relies on MaxMind's GeoIP version 1, which MaxMind no longer supports, so DirectAdmin marks that guide as out of date. See also I would like to have Country stats in awstats on my DirectAdmin.

Related articles

Official documentation: DirectAdmin, website statistics.

Related services

Server management

on-demand administration, hardening, migrations and monitoring.

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Was this answer helpful?

Still stuck? Open a ticket