Installing DirectAdmin on Your VPS: Complete Guide
DirectAdmin is one of the most popular control panels for web hosting. It offers a user-friendly interface that allows you to manage websites, databases, email, and more without command line knowledge. At Theory7, we use DirectAdmin on our shared hosting, and many customers also choose it for their VPS. In this guide, we will explain step by step how to install DirectAdmin.
What is DirectAdmin?
DirectAdmin is a commercial web hosting control panel that runs on Linux servers. It offers:
- Web interface for server management on port 2222
- Domain management with DNS, subdomains, and aliases
- Email management with webmail, filters, and forwarding
- Database management for MySQL and MariaDB
- File management via built-in file manager
- Backup features for automatic backups
DirectAdmin is lighter than cPanel and consumes fewer resources, making it ideal for smaller VPS configurations. This means you can use more of your server capacity for your websites and applications, which is especially important for users with limited hardware.
Installation Requirements
Before you begin, make sure your VPS meets these requirements:
Minimum Hardware Requirements
- At least 1 GB RAM (2 GB recommended)
- 10 GB free disk space
- 1 CPU core (2+ recommended)
Software Requirements
- Clean OS installation (no existing web server)
- CentOS 7/8, AlmaLinux 8/9, Rocky Linux 8/9
- Ubuntu 20.04/22.04 or Debian 10/11/12
- Root access to the server
DirectAdmin License
You need a valid DirectAdmin license. You can purchase this through:- DirectAdmin.com directly
- Your hosting provider (Theory7 offers licenses)
Installation Steps
Step 1: Connect to Your Server
Log in as root via SSH:
ssh root@your-server-ip
If you are using a different SSH port:
ssh root@your-server-ip -p portnumber
Step 2: Prepare the System
First, update your system to the latest version:
# For CentOS/AlmaLinux/Rocky
dnf update -y
# For Ubuntu/Debian
apt update && apt upgrade -y
Install the necessary packages:
# CentOS/AlmaLinux
dnf install wget perl -y
# Ubuntu/Debian
apt install wget perl -y
Step 3: Download the DirectAdmin Installer
Download the official installation script:
wget -O setup.sh https://www.directadmin.com/setup.sh
chmod +x setup.sh
Step 4: Start the Automatic Installation
For the easiest installation, use the auto mode:
./setup.sh auto
The installer automatically detects your OS and configures everything. This process takes 15-30 minutes depending on your server speed. During this time, it is important to be patient and not interrupt, as this can lead to an incomplete installation.
Alternative: Manual Installation
For more control, you can run the installer interactively:
./setup.sh
You will be asked questions about:
- Hostname configuration
- Network interface selection
- Admin username and password
This gives you the opportunity to customize specific settings to your preferences.
After Installation
Accessing DirectAdmin
After successful installation, you can log in via:
https://your-ip:2222
The installer displays the admin credentials at the end. Make sure to note this information, as you will need it for future access.
Initial Configuration
- Log in with the admin credentials
- Go to Admin Settings
- Change the admin password to something strong
- Configure your hostname correctly
- Set up email settings
It is recommended to use a strong password that consists of a combination of letters, numbers, and special characters to secure your account.
Configuring DNS
If you want to use DirectAdmin as a nameserver:
- Go to DNS Administration
- Set your nameservers (ns1.yourdomain.nl, ns2.yourdomain.nl)
- Configure the correct glue records at your domain registrar
Correctly setting up your DNS is crucial for the accessibility of your websites. Make sure to enter the correct records and that they are properly configured with your registrar.
SSL for DirectAdmin
Secure the admin interface with an SSL certificate:
/usr/local/directadmin/scripts/letsencrypt.sh request hostname.yourdomain.nl
An SSL certificate is essential for securing your data and building trust with your users. It ensures that communication between the server and the client is encrypted.
Installing LiteSpeed (Optional)
DirectAdmin works with Apache by default, but LiteSpeed offers better performance:
- Go to Administrator > Custom Build
- Select Apache > choose LiteSpeed
- Click Build
The switchover takes a few minutes. LiteSpeed can significantly improve the loading times of your websites, which is especially useful for high-traffic sites.
Troubleshooting
Installation Failed
Check if your OS is supported and if you have a clean installation. Existing web servers can cause conflicts. If you encounter issues, try running the installation again on a clean server.Cannot Log In on Port 2222
Check your firewall settings:firewall-cmd --add-port=2222/tcp --permanent
firewall-cmd --reload
Make sure there are no other firewall rules blocking access to this port.
License Error Message
Verify that your license is valid and linked to the correct IP address. Contact your hosting provider if you have doubts about the license.Related Articles
- LiteSpeed web server configuration
- Enable SSH access in DirectAdmin
- Using Composer via SSH
- VPS first steps after purchase
Need Help?
We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are happy to help.
0 van 0 vonden dit nuttig