How to change Direct admin’s default port number?

You can simply modify the default port number 2222 via command line. by editing some configuration file. The port number is defined in the configuration file of Direct Admin (directadmin.conf).

You can change the port value from that conf file.

You may follow the steps below:

Step 1: SSH to your server as root user.

Step 2: Edit the configuration file and change the port number value to your own one. You can use your favorite text editor like vi, vim, nano etc to edit the configuration file.

nano /usr/local/directadmin/conf/directadmin.conf
port=2222

Step 3: Restart the Direct Admin daemon

service directadmin restart

That’s it!Now try to access with the new port number which you added into the directadmin’s configuration file. Give your opinion below if you experience any issues or to discuss your ideas and experiences.