{"id":42,"date":"2020-05-16T18:43:46","date_gmt":"2020-05-16T18:43:46","guid":{"rendered":"http:\/\/lookouthost.com\/?p=42"},"modified":"2026-04-04T06:36:56","modified_gmt":"2026-04-04T01:06:56","slug":"directadmin-setup","status":"publish","type":"post","link":"https:\/\/lookouthost.com\/blog\/directadmin-setup\/","title":{"rendered":"How To Install &amp; Setup DirectAdmin"},"content":{"rendered":"<p>Before installing DirectAdmin let us see which operating system does it supports.<\/p><h2 class=\"wp-block-heading\"><strong>System Requirements<\/strong><\/h2><ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.redhat.com\/en\/technologies\/linux-platforms\/enterprise-linux\" target=\"_blank\" rel=\"noreferrer noopener\">Red Hat Enterprise <\/a><\/li>\n\n<li>Red Hat Enterprise Linux derivatives &#8211;&nbsp;<a href=\"https:\/\/centos.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">CentOS Stream<\/a>,&nbsp;<a href=\"https:\/\/rockylinux.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Rocky Linux<\/a>,&nbsp;<a href=\"https:\/\/almalinux.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">AlmaLinux<\/a>.<\/li>\n\n<li><a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian<\/a>.<\/li>\n\n<li><a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu<\/a>.<\/li><\/ul><h2 class=\"wp-block-heading\">Partition scheme<\/h2><p>We suggest a simple partition structure of:<\/p><figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Partition<\/th><th>Size<\/th><\/tr><\/thead><tbody><tr><td>\/boot<\/td><td>500 MB<\/td><\/tr><tr><td>swap<\/td><td>2 x RAM but no more than 16 GB<\/td><\/tr><tr><td>\/<\/td><td>Rest of drive<\/td><\/tr><\/tbody><\/table><\/figure><h3 class=\"wp-block-heading\">Begin the installation!<\/h3><pre class=\"wp-block-code\"><code>bash &lt;(curl -fsSL https:\/\/download.directadmin.com\/setup.sh) 'Provided license key should go here'\n\nOR<\/code><\/pre><pre class=\"wp-block-code\"><code>bash &lt;(curl -Ss https:\/\/www.directadmin.com\/setup.sh) auto<\/code><\/pre><p>After the setup is completed you can access your DirectAdmin control panel using port 2222 <\/p><pre class=\"wp-block-preformatted\">http:\/\/server.ip.address:2222<\/pre><h2 class=\"wp-block-heading\"><strong>Steps to Follow Post DA Installation:<\/strong><\/h2><ul class=\"wp-block-list\"><li>Remove DA limited notice on login page if you are using Legacy License. https:\/\/forum.directadmin.com\/threads\/directadmin-1-664.70784\/page-2#post-376159<\/li>\n\n<li><a href=\"https:\/\/download.configserver.com\/csf\/install.txt\">Install CSF<\/a><\/li>\n\n<li>Install CloudLinux and enable Cagefs<\/li>\n\n<li>Install Imunify 360<\/li>\n\n<li>Install Softaculous: <a href=\"https:\/\/www.softaculous.com\/docs\/admin\/installing-softaculous-in-directadmin\/\">https:\/\/www.softaculous.com\/docs\/admin\/installing-softaculous-in-directadmin\/<\/a><\/li><\/ul><ol class=\"wp-block-list\"><li><\/li><\/ol><h3 class=\"wp-block-heading\">1. Install SSL for your Hostname <\/h3><pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\/scripts\n.\/letsencrypt.sh request_single `hostname` 4096\n<\/code><\/pre><h3 class=\"wp-block-heading\">2. Install Ion Cube<\/h3><pre class=\"wp-block-preformatted\">cd \/usr\/local\/directadmin\/custombuild<br>.\/build update<br>.\/build set ioncube yes<br>.\/build ioncube<\/pre><h3 class=\"wp-block-heading\">3. Run Scripts \/ Harden PHP<\/h3><pre class=\"wp-block-preformatted\">Go to DA custom build scripts. Run PHP Hardening and Install Spamassassin.<\/pre><h3 class=\"wp-block-heading\">4a. CSF Settings<\/h3><pre class=\"wp-block-code\"><code>You don't need to install CSF with imunify, however, if you do you can open these common ports and also allow some scripts to run by editing process ignore list inside CSF\nTCP_IN = 35000:35999,20,21,22,25,53,853,80,110,143,443,465,587,993,995,2222,4085,4083, 2087, 2086\nTCP_OUT =20,21,22,25,53,80,110,113,143,443,465,587,853,993,995,2222,8443,44445,55556,7770:7800,4085,4083, 2087, 2086\n\n###############################################################################\n# Copyright 2006-2019, Way to the Web Limited\n# URL: http:\/\/www.configserver.com\n# Email: sales@waytotheweb.com\n###############################################################################\n# The following is a list of executables (exe) command lines (cmd) and\n# usernames (user) that lfd process tracking will ignore.\n#\n# You must use the following format:\n#\n# exe:\/full\/path\/to\/file\n# user:username\n# cmd:command line\n#\n# Or, perl regular expression matching (regex):\n#\n# pexe:\/full\/path\/to\/file as a perl regex&#91;*]\n# puser:username as a perl regex&#91;*]\n# pcmd:command line as a perl regex&#91;*]\n#\n# &#91;*]You must remember to escape characters correctly when using regex's, e.g.:\n# pexe:\/home\/.*\/public_html\/cgi-bin\/script\\.cgi\n# puser:bob\\d.*\n# pcmd:\/home\/.*\/command\\s\\to\\smatch\\s\\.pl\\s.*\n#\n# It is strongly recommended that you use command line ignores very carefully\n# as any process can change what is reported to the OS.\n#\n# For more information see readme.txt\n\nexe:\/bin\/dbus-daemon\nexe:\/sbin\/ntpd\nexe:\/usr\/bin\/dbus-daemon\nexe:\/usr\/bin\/dbus-daemon\nexe:\/usr\/bin\/dbus-daemon-1\nexe:\/usr\/bin\/lsmd\nexe:\/usr\/lib\/polkit-1\/polkitd\nexe:\/usr\/libexec\/dovecot\/anvil\nexe:\/usr\/libexec\/dovecot\/imap\nexe:\/usr\/libexec\/dovecot\/imap-login\nexe:\/usr\/libexec\/dovecot\/pop3\nexe:\/usr\/libexec\/dovecot\/pop3-login\nexe:\/usr\/libexec\/dovecot\/stats\nexe:\/usr\/libexec\/gam_server\nexe:\/usr\/libexec\/hald-addon-acpi\nexe:\/usr\/libexec\/hald-addon-keyboard\nexe:\/usr\/local\/directadmin\/dataskq\nexe:\/usr\/local\/directadmin\/directadmin\nexe:\/usr\/local\/libexec\/dovecot\/imap\nexe:\/usr\/local\/libexec\/dovecot\/imap-login\nexe:\/usr\/local\/libexec\/dovecot\/pop3\nexe:\/usr\/local\/libexec\/dovecot\/pop3-login\nexe:\/usr\/local\/mysql-5.1.54-linux-x86_64\/bin\/mysqld\nexe:\/usr\/sbin\/chronyd\nexe:\/usr\/sbin\/exim\nexe:\/usr\/sbin\/exim\nexe:\/usr\/sbin\/hald\nexe:\/usr\/sbin\/httpd\nexe:\/usr\/sbin\/mysqld\nexe:\/usr\/sbin\/mysqld_safe\nexe:\/usr\/sbin\/named\nexe:\/usr\/sbin\/nscd\nexe:\/usr\/sbin\/ntpd\nexe:\/usr\/sbin\/proftpd\nexe:\/usr\/sbin\/sshd\nexe:\/usr\/sbin\/apache2\nexe:\/usr\/sbin\/mysqld\nexe:\/lib\/systemd\/systemd-timesyncd\nexe:\/usr\/local\/bin\/freshclam\nexe:\/sbin\/rngd\nexe:\/usr\/sbin\/mariadbd\nexe:\/usr\/bin\/dbus-broker-launch\nexe:\/usr\/bin\/dbus-broker\n\n# Some additional entries that you might want to ignore on DirectAdmin\n# servers.\n# However, be aware of the security implications under \"Process Tracking\" in\n# the csf readme.txt when using these:\n#\n#cmd:\/bin\/sh \/usr\/bin\/mysqld_safe\n#cmd:\/bin\/sh \/usr\/bin\/mysqld_safe --basedir=\/usr\n#pcmd:MailScanner:.*\nexe:\/bin\/gzip\nexe:\/bin\/tar\nexe:\/opt\/netdata\/bin\/bash\nexe:\/opt\/netdata\/bin\/srv\/netdata\nexe:\/opt\/netdata\/usr\/libexec\/netdata\/plugins.d\/apps.plugin\nexe:\/opt\/netdata\/usr\/libexec\/netdata\/plugins.d\/go.d.plugin\nexe:\/usr\/bin\/clamd\nexe:\/usr\/bin\/curl\nexe:\/usr\/bin\/freshclam\nexe:\/usr\/bin\/rspamd\nexe:\/usr\/bin\/wget\nexe:\/usr\/lib\/systemd\/systemd-timesyncd\nexe:\/usr\/libexec\/dovecot\/indexer\nexe:\/usr\/libexec\/dovecot\/indexer-worker\nexe:\/usr\/libexec\/dovecot\/lmtp\nexe:\/usr\/libexec\/dovecot\/managesieve-login\nexe:\/usr\/local\/bin\/lsphp\nexe:\/usr\/local\/bin\/pureftpd_uploadscan.sh\nexe:\/usr\/local\/bin\/redis-server\nexe:\/usr\/local\/mysql\/bin\/mysqld\nexe:\/usr\/sbin\/atd\nexe:\/usr\/sbin\/nginx\nexe:\/usr\/sbin\/proxyexec\nexe:\/usr\/sbin\/pure-ftpd\nexe:\/usr\/sbin\/rsyslogd\nexe:\/usr\/sbin\/unitd\nexe:\/usr\/selector\/lsphp\nexe:\/usr\/selector\/php\nexe:\/usr\/selector\/php-cli\nexe:\/usr\/share\/cagefs-skeleton\/usr\/selector\/lsphp\npexe:\/opt\/alt\/php..\/usr\/bin\/lsphp\npexe:\/opt\/alt\/php..\/usr\/bin\/php\npexe:\/opt\/alt\/php..\/usr\/bin\/php-cgi\npexe:\/usr\/local\/lsws\/bin\/lshttpd.*\npexe:\/usr\/local\/php..\/bin\/lsphp..\npexe:\/usr\/local\/php..\/bin\/php-cgi..\npexe:\/usr\/local\/php..\/bin\/php..\npexe:\/usr\/local\/php..\/bin\/php_uploadscan.sh\npexe:\/usr\/local\/php..\/sbin\/php-fpm..\npexe:\/usr\/local\/safe-bin\/fcgid...sh\nuser:mysql\nuser:netdata\n\npexe:\/opt\/alt\/php.*\/usr\/bin\/lsphp\n\nexe:\/var\/ossec\/bin\/ossec-monitord\nexe:\/var\/ossec\/bin\/ossec-analysisd\nexe:\/var\/ossec\/bin\/ossec-remoted\n\n\nRemove CSF and LFD in DirectAdmin (Setup Imunify360)<\/code><\/pre><h3 class=\"wp-block-heading\">4b. Remove CSF and LFD in DirectAdmin (Setup Imunify360)<\/h3><p>If you install Imunify360 then it is safe to remove CSF and LFD from directadmin. <a href=\"https:\/\/lookouthost.com\/blog\/remove-csf-and-lfd-in-directadmin-setup-imunify360\/\" title=\"\">Follow the steps here to remove LFD<\/a> once you uinstall CSF usign Plugins Manager option in directadmin. <\/p><h2 class=\"wp-block-heading\">Import Reseller Plans <\/h2><div class=\"wp-block-media-text is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"499\" src=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4-1024x499.png\" alt=\"\" class=\"wp-image-1455 size-full\" srcset=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4-1024x499.png 1024w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4-300x146.png 300w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4-768x374.png 768w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4-600x292.png 600w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-4.png 1368w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><div class=\"wp-block-media-text__content\"><p><\/p><\/div><\/div><p>Here is the text to be imported for above-mentioned reseller plans.<\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-b7a92ed1-da2b-40f0-94ac-ecaae9354e4d\" href=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/DA-Reseller-Plans.txt\">DA Reseller Plans<\/a><a href=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/DA-Reseller-Plans.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-b7a92ed1-da2b-40f0-94ac-ecaae9354e4d\">Download<\/a><\/div><p>Here are some regular shared hosting plans which you can import in DA account.<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5-1024x651.png\" alt=\"Install DirectAdmin\" class=\"wp-image-1458\" srcset=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5-1024x651.png 1024w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5-300x191.png 300w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5-768x488.png 768w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5-600x381.png 600w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/image-5.png 1351w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><p>Here is the text to be imported for the above-mentioned user plans.<\/p><div class=\"wp-block-file\"><a id=\"wp-block-file--media-9eb20f2d-d134-408e-a5e5-ec50d7cdbe77\" href=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/DA-User-Packages.txt\">DA User Packages<\/a><a href=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2020\/05\/DA-User-Packages.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9eb20f2d-d134-408e-a5e5-ec50d7cdbe77\">Download<\/a><\/div><h3 class=\"wp-block-heading\">Tweaks Under Admin Section<\/h3><ul class=\"wp-block-list\"><li>Timeout (seconds) &amp; Session Timeout (minutes)<br>change to 300<br>Max Request \/ Upload Size to 2 GB<\/li>\n\n<li><strong>Max Username Length 25 <\/strong><\/li>\n\n<li>Blacklist IPs for excessive DA login attempt to change to 5 from 20<\/li>\n\n<li>Prevent 127.0.0.1 from being Blacklisted check it<\/li>\n\n<li>Remove an IP from the blacklist after &amp; Remove an IP from the BF blacklist after to 0<\/li>\n\n<li>Scan for WordPress attacks on all<\/li><\/ul><h2 class=\"wp-block-heading\">Allow PHP Disabled Functions Using Cloudlinux&#8217;s PHP Selector<\/h2><p><a href=\"https:\/\/lookouthost.com\/blog\/enable-users-to-change-disable-functions-settings-in-directadmin\/\" title=\"Enable users to change disable_functions settings in DirectAdmin\">Read how to enable users to change disable-functions settings in DirectAdmin<\/a><\/p><p><\/p><h2 class=\"wp-block-heading\">SNI for per-domain Dovecot SSL certificates (BETA)<\/h2><p><a href=\"https:\/\/lookouthost.com\/blog\/sni-for-per-domain-dovecot-ssl-certificates-beta-new\/\" title=\"SNI for per-domain Dovecot SSL certificates (BETA)&nbsp;new\">Read how to enable SNI for per domain SSL in order for outlook to verify ssl for your domain mail server. <\/a><\/p><pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\necho mail_sni=1 >> conf\/directadmin.conf\nservice directadmin restart\ncd custombuild\n.\/build update\n.\/build set eximconf yes\n.\/build set dovecot_conf yes\n.\/build exim_conf\n.\/build dovecot_conf\n\nOR nano \/usr\/local\/directadmin\/conf\/directadmin.conf\n\nTASK QUEUE\nTo generate snidomains file:\n\necho \"action=rewrite&amp;value=snidomains\" >> \/usr\/local\/directadmin\/data\/task.queue\nIf you want to tell all live SSL domains to have their dovecot configs written, type;\n\necho \"action=rewrite&amp;value=mail_sni\" >> \/usr\/local\/directadmin\/data\/task.queue\n\necho \"action=rewrite&amp;value=mail_sni&amp;domain=domain.com\" >> \/usr\/local\/directadmin\/data\/task.queue\n\nthis will recreate the sni\/domain.com.conf for each SSL domain, plus one for the system hostname.\n\nIt will use the \/etc\/virtual\/domainowners, to go through each domain, each cert, and remove any existing *:user:domain.com entries from snidomains, and re-add whatever is present\n\n<\/code><\/pre><h2 class=\"wp-block-heading\">B<code>lock Sender Spoofing in Emails<\/code><\/h2><pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\/custombuild\n.\/build set easy_spam_fighter yes\n.\/build set spamassassin yes\n.\/build exim_conf\nOr enable both in CustomBuild<\/code><\/pre><p><strong>Update Logs<\/strong><\/p><ul class=\"wp-block-list\"><li>12.02.2024 &#8211; Added diable_functions guide<\/li>\n\n<li>11.08.2025 &#8211; Enable SNI<\/li>\n\n<li>04.04.2026 &#8211; Block Sender Spoofing<\/li><\/ul><p><\/p>","protected":false},"excerpt":{"rendered":"<p>Before installing DirectAdmin let us see which operating system does it supports. System Requirements Partition scheme We suggest a simple partition structure of: Partition Size \/boot 500 MB swap 2 x RAM but no more than 16 GB \/ Rest of drive Begin the installation! After the setup is completed you can access your DirectAdmin control panel using port 2222 http:\/\/server.ip.address:2222 Steps to Follow Post DA Installation: 1. Install SSL for your Hostname 2. Install Ion Cube cd \/usr\/local\/directadmin\/custombuild.\/build update.\/build set ioncube yes.\/build ioncube 3. Run Scripts \/ Harden PHP Go to DA custom build scripts. Run PHP Hardening and&hellip; <\/p>\n","protected":false},"author":1,"featured_media":48,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-directadmin","category-featured"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":18,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":1557,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/42\/revisions\/1557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/media\/48"}],"wp:attachment":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}