How to install DirectAdmin

Do you want to host your websites on your own server? Then DirectAdmin might be the solution for you. In our opinion, DirectAdmin is one of the best control panels out there. It’s cheaper than cPanel and Plesk and easy to install.

We’ve created this knowledgebase article to help you to install DirectAdmin.

Step 1. Check if you meet the system requirements

For the DirectAdmin installation, you will need a clean operating system.

We recommend you to use AlmaLinux 8 & 9 or Debian 11. From our experience, these operating systems are the most stable to use.

You will need at least 1 Core, 1GB RAM, and 20GB of storage.

If you have a DirectAdmin license from your hosting provider, you can ask them if the correct Operating System is set.

If you have bought your own license directly from DirectAdmin. Make sure to save the License key, as you will need this to activate DirectAdmin. Below you will see a screenshot where you can find this information.

Step 2: Server preparation

Before you start the installation, you need to make sure that you have the correct operating system and that the server is up to date.

With the following command, you can verify our operating system:

cat /etc/os-release

Now that you know which operating system you have, you need to do a few more things in preparation.

When you have Almalinux follow the steps in the following article How to update AlmaLinux.

When you have Debian 10 or 11, follow the steps in the following article How to update Debian 11

We recommend you to use a hostname for your VPS so you can secure the DirectAdmin login with SSL. The hostname refers to the URL for your server. If you have your own domain, then you can create a DNS record for server01.mydomain.com: your server IP address.

If you don’t use a hostname you get a login URL with HTTPS/SSL from DirectAdmin.

Step 3: DirectAdmin installation

Now it’s time to start with the Directadmin installation.

With the following commands, you will download the installation file and start the installation:

wget https://www.directadmin.com/setup.sh
chmod 755 setup.sh ./setup.sh

Once you run these commands some information will be downloaded. After a minute, the installation asks for a License key. You get this key from your hosting provider or from directadmin.com directly.

Recommended DirectAdmin settings

Below you will find the settings that we recommend you to use:

Default config: no

Webserver: apache

We recommend using apache, which provides the best performance for web hosting on a normal server. 

Database Server: MariaDB

We recommend using MariaDB

Database Version: Default ( hit enter)

FTP server: pureftpd

Default PHP version: 8.0

If you are using a known CMS system like WordPress, or Joomla you can use PHP 8.0. If you’re running your own PHP code or CMS then you will need to check if it supports PHP 8.0. If not, then you can choose 7.4.

Default PHP version: php-fpm

We will be using PHP-fpm for the processing, php-fpm gives you the availability to tweak the server and add more PHP versions.

Second PHP installed: no

If you want to use another PHP version you can choose that version. 

ionCube: yes

opCache: yes

Zend Guard Loader: yes

Exim: yes

Dovecot: yes

phpMyAdmin: yes

This allows you to manage your database in an online portal

SquirrelMail: no

We recommend not using this webmail because it’s not up to date.

RoundCube: yes

Is for the webmail if you want to host your own email

Now you have to wait for 30 to 60 minutes before the installation is successful. How long this process takes depends on your server performance. 

In the terminal, you will see the login details for the DirectAdmin control panel.

If you want to check if the installation was successful, you can log in to the DirectAdmin control panel. On the bottom right-hand corner, you should see new messages. One of them looks as follows:

CustomBuild installation has finished

DirectAdmin Installation Finish

Step 4: Let’s Encrypt (SSL)

If you have created a DNS record for your hostname and you can log in with the URL, then you can create a free SSL certificate.

To ensure that all important services such as Directadmin, mail server, and FTP are provided with an SSL certificate, the following command must be used:

cd /usr/local/directadmin/scripts

./letsencrypt.sh request_single hostname 4096

Example: ./letsencrypt.sh request_single server.hostio.solutions 4096

Once the SSL is installed from Let’s Encrypt you can access your server with your own URL.

Summary

We hope that our knowledgebase article helped you with installing DirectAdmin on your server. If something does not work or has changed in the installation, please let us know so that we can update our article.

Do you want a managed VPS solution with Admin access?

Contact us and we’re happy to help! 

Contact us

How to update DirectAdmin

Updating DirectAdmin is necessary to ensure that your system has the most recent security updates. If you have an unmanaged VPS or dedicated server, you will probably have to perform all updates and upgrades yourself. We’ve created this knowledgebase article to help you out.

How to update DirectAdmin

There are a few easy steps to follow when updating DirectAdmin. Let’s get started!

Step 1. Create a backup

Before making any changes it is, as always, important that you have backups of your data. Moreover, it’s important that the backups are stored externally i.e. not on your server. This is important because if your server has any errors or crashes, it won’t be possible to access your backup.

To update DirectAdmin on your server, you need SSH access, for this, you can use Putty on Windows. Mac and Linux users can use the terminal.

Step 2: Update the Operating system

Once you are logged in, we will first check which Linux OS you are running to verify if the operating system is still supported and good to go to perform server updates.

Run the command below to see which Linux version you are using:

cat /etc/os-release

You should get a result with one of the following Linux versions:

Operating systemSupported untilRemark
AlmaLinux 8.52029No actions required
CentOS 5March 31, 2017 (End Of Life)Upgrade to AlmaLinux 8.5 or Debian 11
CentOS 6November 31, 2022 (End Of Life)Upgrade to AlmaLinux 8.5 or Debian 11
CentOS 7June 30, 2024 We recommend to upgrade to AlmaLinux 8.5 or Debian 11
CentOS 8December 31, 2021 (End Of Life)Upgrade to AlmaLinux 8.5 or Debian 11
CentOS 8 StreamMay 31, 2024We recommend to upgrade to AlmaLinux 8.5 or Debian 11
Debian 8June 30, 2020We recommend to upgrade to Debian 11
Debian 9June 30, 2022We recommend to upgrade to Debian 11
Debian 10June, 2024We recommend to upgrade to Debian 11
Debian 11June, 2026No actions required

Short explanation of the table above

If you have an OS that is End Of Life you need to upgrade or reinstall your server to a newer version. The reason for this is that with an End Of Life operartion system, you don’t receive any updates and your server will be vulnerable to malware and hacks. 

If you are running a CentOS operating system, we recommend upgrading/installing to the latest version of AlmaLinux or Debian. Read our other article about it for more information: Why to use AlmaLinux instead of CentOS.

If you’re running an Operating System that isn’t End Of Life, you will find an article about how to update your OS in our Knowledgebase. Once you have done the updates on the OS level, you can continue with the DirectAdmin update at Step 4

How to update AlmaLinux 

How to update CentOS 7 

How to update CentOS 8

How to update Debian 10

How to update Debian 11

Step 3: Pre-update CustomBuild

In the last step, we made sure that our OS update is up to date on the server level. If you are using an OS that is End Of Life, we advise you not to perform any updates within DirectAdmin, because a newer version might not be supported by your operating system.

DirectAdmin works with “CustomBuild” for all services. It’s a very simple update manager that allows you to install and upgrade services like Apache, PHP

First, we will go to the folder where we can update DirectAdmin. For this, you can use the CustomBuild script:

cd /usr/local/directadmin/custombuild

Now we will force DirectAdmin to update the CustomBuild to the latest version:

 /usr/local/directadmin/custombuild/build update_da
 ./build update

Step 4: Update DirectAdmin

Once this is done we will continue to check if there are updates available. To check if there are any updates, you can use the following command:

./build versions

After you’ve done this, you will get an overview of all services that are installed, including information about the version and to which version you can update in the future. 

Now, we will start to the update process. Make sure you have a stable connection to ensure that the process is not interrupted:

./build update_versions

The update may take some time. Once the update is done we recommend you reboot your server to load all new services properly. 

Summary

In this knowledgebase article, we went through the process of updating DirectAdmin. Overall, it is a great, affordable control panel that is the first choice of many hosting providers. With CustomBuild, you will easily perform any updates and upgrades you need. If you have any questions or need help, you can always contact our support team. 

For those who want to have all the benefits of a VPS, but don’t want to worry about it, we have Managed Services.
Contact us for more information.

How to update AlmaLinux

Like any other distribution, it’s important to update your AlmaLinux system. By keeping your AlmaLinux system up to date, you will be sure to have the latest features and security updates. Luckily, updating an AlmaLinux system is fairly straightforward. In this tutorial, we will show you how.

Step 1. Create a Backup of Your AlmaLinux Server

Always create a backup before updating your AlmaLinux system.

Step 2: Check if you’re using AlmaLinux

After having created a back-up, it’s time to check if you’re indeed running AlmaLinux. To know if you are, you can run the following command:

cat /etc/redhat-release

If you’re running AlmaLinux, you should get the following result:

AlmaLinux release 8.x

Now, we can continue with the next step.

Step 3: Clear the cache

Before updating your AlmaLinux server, it’s really important that you empty all the caches and have the most recent packages (software servers and lists). You can use the following command to do this:

yum clean all -y

Step 4: Update your AlmaLinux server

When updating AlmaLinux, you can choose to use the recommended settings or you can determine which settings are used yourself.

If you want to use the recommended settings, you can run the following command:

yum update -y

If you prefer to decide which settings are used in the update, you can omit -y. The command then looks as follows: 

yum update

Step 5: Server reboot

When the update is done successfully, the only thing left to do is a server reboot. After the server reboot you’ll be sure that everything went well and that the update has been completed properly. You can use the following command to perform a reboot:

reboot

Conclusion

In this knowledgebase article we have shown the steps you can follow to update your AlmaLinux system. Remember, that updating your system is important, as it will keep your server secure and stable.

Contact us if you have any questions about updating AlmaLinux. We’re more than happy to help you!

How to Update Debian 11

The most recent version of Debian is Debian 11 and in this knowledgebase article, we will show you how you can update it.

De codename for Debian 11 is “Bullseye”. Bullseye was released on August 14th 2021 and will be supported for the next five years. The Debian version contains numerous updated packages.

If you have a Debian 11 server, it’s good to make sure it’s updated at all times. This is important because it will make your devices less susceptible to hacks and/or vulnerabilities.

Step 1: Create a Back-Up

Before you start with the update, it’s important to create a backup. When creating a backup, it’s best to store these externally. The reason for this is that you won’t be able to access your backup in case your server has any errors or crashes.

In order to update Debian 11, you need to have SSH access. You can use Putty on Windows or the Terminal if you have a Mac or Linux device.

Step 2: Check If You’re Running Debian 11

After having created the backup, you will need to check if you’re running Debian 11.

To see which version of Debian you’re running, you can run the following command:

cat /etc/os-release

If you’re running Debian 11, you will get the following result:

Once you’re sure that you’re running the right version of Debian, you can continue with the next step.

Step 3: Update packages index

First, you need to ensure that all packages index are updated and that you have the most recent repository (software servers and lists). You can do this by running the following command:

apt-get update

Now that you have updated the packages index, the update can start

Step 3: Update Debian

When updating Debian, you can choose to use the recommended settings or control which settings are used. If you want to use the recommended settings for the updates, you can run the following command:

apt upgrade -y

If you want to control which settings are used in an update, you can omit -y. The command will then look as follows:

apt upgrade

Step 4: Server Reboot

If all updates have been performed successfully, all you have to do is to perform a server reboot so that everything is completed properly. You can reboot your server by running the following command:

reboot

Step 5. Remove old packages and kernels

Once the server is rebooted we can remove the old packages and kernels. This can be done with the following command:

apt autoremove -y

Debian 11 at Hostio Solutions

When renting a server at Hostio Solutions, you can choose to use Debian 11 as your operating system. If you have any questions or need help, you’re more than welcome to contact our support team. You can reach us via our customer portal, e-mail, live chat, Telegram or by phone.

How To Update Debian 10

Debian 10 is a popular version of the Linux operating system. The Debian version was released on the 6th of July 2019 and is codenamed “Buster”. The free operating system will be supported for 5 years in total.

Why Update Your Debian 10 Server?

If you manage a Debian server yourself, it is necessary to ensure that all software updates and security updates are up to date at all times. The reason for this is that by updating your server regularly, you will be less susceptible to a hack/vulnerability.

How to Update Debian Buster

By following the next steps, you’ll be able to update Debian 10.

Step 1: Back-Up Any Data On Your Server

Before you start, it is crucial that you have backups that are stored externally and not on your server itself. This is important because if your server has any errors or crashes, it won’t be possible to access your backup.

To update your Debian 10 server you need SSH access, for this, you can use putty on Windows. Mac and Linux users can use the terminal.

Step 2: Check if You’re Running Debian 10

Once you are logged in, you should check which Debian version you’re currently using. To check this, you can run the following command:

cat /etc/os-release

If you’re running Debian 10, you should get the following result:

Debian GNU/Linux 10 (buster)

Once you’ve confirmed that you’re running the right Debian version, it’s time for step 2.

Step 3: Update Packages Index

First, ensure that all packages index are updated and that you have the most recent repos (software servers and lists),

apt-get update

Now that you have updated the packages index, you can start with the update of Debian.

Step 4: Update Debian 10

If you want to use the recommended settings for any upgrades, you can run the following command:

apt upgrade -y

If you want to control which settings are used in an upgrade, you can omit -y

apt upgrade

If all updates have been performed successfully, all you have to do is to perform a server reboot so that everything is completed properly. A server reboot can be done with the following command:

reboot

Once the server is rebooted we can remove the old packages and kernels.

apt autoremove -y

Conclusion

By following the directions above, you should have successfully updated Debian 10. When renting a VPS from Hostio Solutions, you can choose to have Debian as your operating system. In case you need help, you can always contact our support team. You can reach us through our ticket system, live chat, Telegram or by phone.

If you have any questions or need help, you can always contact our support team.

Contact support

How to update CentOS 8

When you manage a CentOS 8 server, it is important that you always ensure that the security and software updates have been carried out. This is because servers with the most recent updates are less likely to be victims of cybercrime. For example, hacks and vulnerabilities are a lot less common with servers that have the most recent software.

Before updating your CentOS 8 server, it is important to make an externally stored backup. Having an external backup (not on your CentOS 8 server) comes in handy when your server has errors or crashes. In such cases it is no longer possible to access your backup. If you do not have an externally stored backup, it could mean that you have lost all of your data.

In addition to an externally stored backup, you need SSH access to update your CentOS 8 server. You can use putty on Windows for this. Do you have Mac or Linux? Then you can use the terminal.

Check if you’re using CentOS 8

After you’ve logged in, we have to check if you’re indeed running CentOS 8. To know which version of CentOS you are using, you can use the following command:

cat /etc/redhat-release

If you’re running CentOS 8, you should get the following result:

CentOS Linux release 8.X

If you got this result, we know that you’re running the correct CentOS version and we can continue with step 2.

Step 2: Clear cache

Before updating your CentOS server, it’s really important that you empty all the caches and have the most recent repos (software servers and lists). You can use the following command to do this:

yum clean all -y

After you’ve cleared the cache, it’s time to update CentOS.

Step 3: Update your CentOS 8 server

When updating CentOS, you can choose to use the recommended settings or you can determine which settings are used yourself.

If you want to use the recommended settings, you can run the following command:

yum update -y

Do you prefer deciding which settings are used in the update? Then you can omit -y. The command then looks as follows:

yum update

When the update is done successfully, the only thing left to do is a server reboot. After the server reboot you’ll be sure that everything went well and that the update has been completed properly. You can use the following command to perform a reboot:

reboot

Do you have questions about updating CentOS or need help? We are more than happy to help you! Do not hesitate to contact us click here

Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here

How to Install Pure-FTPd with Let’s Encrypt

If you manage multiple servers, it is super important to make backups yourself. Hosting providers often do offer backup services, however, it’s also important to have a back-up server elsewhere so that you always have access to your own data. This is especially useful when, for example, your hosting provider is completely offline.

In this “how to install” we’ll explain step by step how you can setup an FTP server with Pure-FTPd and how you can secure it with a certificate.

For this setup, we recommend that you use a dedicated server with Debian 10.

Step 1: Update server

Make sure that your Debian 10 server is up-to-date.

Step 2: Pure-FTPd installation

When your server is up-to-date, we can install the FTP server with Pure FTPd. For this, we use the following command:

apt-get install pure-ftpd

Step 3: Configuration and setup of Pure-FTPd

To ensure that everything runs properly, the following commands must be executed:

echo "yes" > /etc/pure-ftpd/conf/Daemonize
echo "yes" > /etc/pure-ftpd/conf/NoAnonymous
echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone
echo "2" > /etc/pure-ftpd/conf/TLS

We recommend setting your FTP to IPv4 only, as the performance of IPv6 is not the same for every provider. You can do this by using the following command:

echo "yes" > /etc/pure-ftpd/conf/IPV4Only

Now we are going to set the config. Out of experience we know that the following works best:

We start with deleting the existing config. To do this, you can use the following command:

rm -rf /etc/pure-ftpd/pure-ftpd.conf

Now that we’ve deleted the existing config, we can complete the config file with our settings. Open the pure-ftpd.conf.

nano /etc/pure-ftpd/pure-ftpd.conf

Now that we have the text editor open, you can copy & paste the following:

ChrootEveryone               		yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
LimitRecursion 10000
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
MaxDiskUsage 99
CustomerProof yes
CertFile /etc/ssl/private/pure-ftpd.pem

Everything is now set up and configured.

Step 4: Secure the FTP server with Let’s Encrypt.

It’s important to make sure that you’re using a secure connection for your FTP traffic.

If you want to use an SSL/TLS, we first need to create the folder for it. The certificate will be placed in this folder. To do this, you can use the following command:

mkdir -p /etc/ssl/pure-ftpd

Secure your FTP server with the SSL of Let’s Encrypt

In order to use Let’s Encrypt we first have to install Certbot.

apt-get install certbot

Now that we have done the installation, it is time to request an SSL. Make sure you have a hostname and A record for your server and go through all the steps of certbot.

certbot certonly --standalone

Now we are going to merge the created Let’s Encrypt certificate files. We do this with the following command:

cat /etc/letsencrypt/live/*/privkey.pem /etc/letsencrypt/live/*/fullchain.pem > /etc/ssl/private/pure-ftpd.pem

After we’ve merged the certificates, we have to make sure that the renewed SSL is automatically merged via cronob:

nano /etc/cron.d/certbot

If all goes well, the last line should say:

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew

Now we have to add the following to the last line:

&& cat /etc/letsencrypt/live/*/privkey.pem /etc/letsencrypt/live/*/fullchain.pem > /etc/ssl/private/pure-ftpd.pem

It should then look as follows:

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew && cat /etc/letsencrypt/live/*/privkey.pem /etc/letsencrypt/live/*/fullchain.pem > /etc/ssl/private/pure-ftpd.pem

If all went well, we can restart Pure-FTPd with the following command:

service pure-ftpd restart

Step 5: create user(s)

There are two ways: create a user with SSH access or create a user without SSH access and set a storage limit.

For every account that is created, a home profile is created at /home.

Easy way to create user(s)

Use the following command to easily create an user:

adduser USERNAME

After entering this command, you can set your password. After having set the password, everything will be ready for this user and a profile will be created on /home/username.

Create user with extra options

If you want to create a user with extra options, we first have to create a user group for FTP users without SSH access.

groupadd ftpgroup

Now we can create the user:

useradd -g ftpgroup -d /dev/null -s /etc USERNAME 

pure-pw useradd USERNAME -u USERNAME -g ftpgroup -d /home/USERNAME

If you want to give the user a storage limit you can add: -N 1000.
This gives the user a storage limit of 1000MB.

Example of the command with a storage limit of 1000 MB:

pure-pw useradd USERNAME -u ftpuser -g ftpgroup -d /home/USERNAME -N 1000

Now we have to create the directory for the FTP user with the following command:

mkdir /home/USERNAME

chown -R USERNAME:ftpgroup /home/USERNAME

The next step is to update the Pure-FTPd database. You can do this with the following command:

pure-pw mkdb

ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd

ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb

ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB

Finally, we have to restart the Pure-FTPd:

service pure-ftpd restart

Every time you make changes to a user, the database must be updated:

pure-pw mkdb

Do you want to change the password for an FTP user? Then you can use the following command:

pure-pw passwd USERNAME

In case you have any questions or need help, you can contact our support team: click here

Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here

How to update CentOS 6

If you manage a CentOS 6 server yourself, it is necessary to ensure that all software and security updates are up to date at all times. This ensures that you are not susceptible to a hack/vulnerability.

Before you start, it is always extremely important that you have backups that are stored externally – so not on your server itself. This is important because if your server has any errors or has crashed, it won’t be possible to access your backup.

To update your CentOS 6 server you need SSH access. On Windows, you can use putty to do this. Mac and Linux users can use the terminal.

Step 1: Check CentOS version

Once you are logged in, we will first check whether you are indeed running CentOS 7.

Run the command below to see which CentOS version you are using:

cat /etc/redhat-release

You should get the following result:

CentOS release 6.10 (Final)

Now that we are sure that the correct CentOS version is running, we can get started.

Step 2: Clear cache

We will first ensure that all caches are emptied and that we have the most recent repos (software servers and lists),

yum clean all -y

Now that all caches have been cleared, we can start with the updates.

Step 3: Update CentOS

If you want to use the recommended settings for any upgrades, you can run the following command:

yum update -y

If you want to control which settings are used in an upgrade, you can omit -y

yum update

If all updates have been performed successfully, all you have to do is to perform a server reboot so that everything is completed properly.

reboot

If you have any questions or need help, you can always contact our support team click here

Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here

Update: CentOS 6 is currently no longer supported and is End Of Life we recommend that you upgrade your server to AlmaLinux. Read our knowledgebase article on ‘Why to use AlmaLinux instead of CentOS’.

How to update CentOS 7

Do you manage a CentOS 7 server yourself? Then it’s important to ensure that all software and security updates are performed at all times. Having your software and security up-to-date ensures that you’re not susceptible to a hack/vulnerability.

When performing updates on your server, it’s always important to have a backup that’s stored externally (so not on your server itself). This is important in case your server has any error or crashes. When this happens, it won’t be possible to access your backup. By saving your backup externally, you can prevent a lot of problems.

To update CentOS 7 on your server you need to have SSH access. To get this, you can use Putty on Windows or the terminal on Mac and Linux.

Step 1: Check if you’re using CentOS 7 

Before we start with updating CentOS 7, we have to check if you’re indeed running CentOS on your server. To see if this is the case, we have to run the following command:

cat /etc/redhat-release

If you’re indeed running CentOS 7, you should get the following result:

CentOS Linux release 7.8.2003 (Core)

If you got this result, we know that you’re running the correct CentOS version and we can continue with step 2.

Step 2: Clear cache

Before we start with the actual update of CentOS 7, we have to ensure that all caches are emptied and that it has the most recent repos (software servers and lists). We can do this with the following command:

yum clean all -y

When this has been done successfully, we can continue with the update.

Step 3: Update CentOS 7

Do you want to use the recommended settings for the update? Then you can run the following command: 

yum update -y

If you want to decide which settings are used in the update yourself, you can omit -y. This command will look as follows:

yum update

After you’ve updated CentOS 7, it’s important to perform a server reboot. By performing a server reboot you can confirm that everything is done successfully. 

reboot

If you have any questions or need help, you can always contact our support team click here

Also check out our other posts on topics such as “the best ways to secure your server”, “how to create an external backup server” and a lot more! Click here