1Gbps Dedicated Servers
Unmetered Dedicated Servers
AMD Dedicated Servers
Gaming Dedicated Servers
10Gbps Dedicated Servers
GPU Servers
Intel Dedicated Servers
DDOS Dedicated Servers
About Us
Contact Us
Blogs
Tutorials
Welcome to eServers! You've just provisioned a new dedicated server, giving you a powerful, single-tenant environment with full control over all resources.
Setting up a new server can seem complex, but this guide breaks it down into 7 essential steps. We'll cover everything from the initial secure login and firewall configuration to installing your software and setting up monitoring.
Let's get your server ready for production.
Your first action is to connect to your server as the root user. You will have received your server’s public IP address and root password in your eServers welcome email.
From your local computer's terminal (macOS/Linux) or an SSH client like PuTTY (Windows), use the following command. Replace your_server_ip with your server's actual IP address.
your_server_ip
ssh root@your_server_ip
The first time you connect, you will likely see a warning about the host's authenticity. This is normal.
The authenticity of host 'your_server_ip' can't be established.
Type yes and press ENTER to continue. You will then be prompted for the root password.
yes
The root user has complete and unrestricted privileges, which is dangerous for regular use. A single typo can be destructive. Our next step is to create a limited user account for daily operations.
root
We will now create a new, non-root user and grant it administrative privileges using sudo. This allows you to run commands as root when needed without logging in as root.
sudo
While logged in as root, run this command (replace sammy with your desired username):
sammy
# adduser sammy
You will be prompted to create a strong password and fill in some optional user information (you can press ENTER to skip these).
Next, add your new user to the group that grants sudo permissions. This group's name differs depending on your server's operating system.
For Ubuntu or Debian:
# usermod -aG sudo sammy
For AlmaLinux, Rocky Linux, or CentOS:
# usermod -aG wheel sammy
For enhanced security, you should use SSH keys instead of passwords and disable root login entirely.
sudo nano /etc/ssh/sshd_config
PermitRootLogin yes
PermitRootLogin no
PasswordAuthentication yes
PasswordAuthentication no
sudo systemctl restart sshd
From this point on, log out of your root session and log back in as your new user: ssh sammy@your_server_ip
ssh sammy@your_server_ip
Now logged in as your new sudo user, your first tasks are to update all system packages and enable a firewall.
This ensures all your software is up-to-date with the latest security patches.
$ sudo apt update && sudo apt upgrade -y
$ sudo dnf update -y
A firewall is critical for blocking unauthorized access. We will only allow SSH (so you don't get locked out) and enable the firewall.
For Ubuntu/Debian (using UFW - Uncomplicated Firewall):
$ sudo ufw allow OpenSSH $ sudo ufw enable
Type y to confirm. You can check the status with sudo ufw status.
y
sudo ufw status
For AlmaLinux/Rocky/CentOS (using firewalld):
$ sudo firewall-cmd --permanent --add-service=ssh $ sudo firewall-cmd --reload
You can check the active rules with sudo firewall-cmd --list-all.
sudo firewall-cmd --list-all
Your server is now secure. It's time to install the software that fulfills its purpose (e.g., web server, database server, game server).
A common setup is a LAMP (Linux, Apache, MySQL, PHP) stack for hosting websites. Here’s how to install it.
$ sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql -y
$ sudo dnf install httpd mariadb-server php php-mysqlnd -y $ sudo systemctl enable --now httpd $ sudo systemctl enable --now mariadb
Now you must allow HTTP (port 80) and HTTPS (port 443) traffic through your firewall.
For UFW (Ubuntu/Debian)
$ sudo ufw allow 'Apache Full
For firewalld (AlmaLinux/Rocky):
$ sudo firewall-cmd --permanent --add-service=https $ sudo firewall-cmd --reload
To connect a domain name (e.g., example.com) to your server, you must update your DNS records. This is done at your domain registrar (the company where you bought your domain).
example.com
Log in to your domain registrar's control panel.
Navigate to the DNS Management or DNS Editor for your domain.
Create or edit the 'A' record for your root domain (often represented by @) to point to your server's IP address.
@
Example 'A' Record:
A
3600
You may also want to create a CNAME record for www pointing to @, or a separate 'A' record for www.
CNAME
www
Note: DNS changes can take several hours to propagate globally.
Note:
A server is only reliable if it's monitored and backed up.
It's crucial to watch your server's resource usage (CPU, RAM, Disk). While eServers provides basic monitoring in your client panel, you can use real-time in-terminal tools.
A popular, easy-to-read tool is htop.
htop
For Ubuntu/Debian
$ sudo apt install htop
For AlmaLinux/Rocky
$ sudo dnf install htop
Simply type htop to run it. For more comprehensive, long-term monitoring, consider setting up a tool like Netdata or Prometheus.
Data loss is not a question of *if*, but *when*. A server without a backup strategy is a liability. Hardware can fail, and mistakes can happen.
eServers offers robust, automated server backup solutions that can be easily added to your account. We strongly recommend this to protect your data. Alternatively, you can configure your own solution using tools like rsync to an off-site storage location.
rsync
Your server is now fully configured and ready for your application. The final step is to deploy your website files or application code.
For a LAMP stack, your website files should be placed in the web root directory, which is typically /var/www/html.
/var/www/html
You can securely transfer files from your local machine to the server using scp (Secure Copy) or by using git to pull your code from a repository.
scp
git
Example using scp to upload a website:
$ scp -r /local/path/to/my-website/* sammy@your_server_ip:/var/www/html/
After uploading your files, be sure to set the correct permissions so the web server can read them
$ sudo chown -R www-data:www-data /var/www/html $ sudo find /var/www/html -type d -exec chmod 755 {} \; $ sudo find /var/www/html -type f -exec chmod 644 {} \;
Once deployed, test your website thoroughly in your browser to ensure all functionality is working as expected.
Congratulations! You have successfully completed the 7 essential steps to set up your new dedicated server.
You've gone from a fresh OS install to a fully secured, updated, and configured server ready for production traffic. You've secured access with a sudo user, locked down ports with a firewall, installed your core software stack, pointed your domain, and considered monitoring and backups.
At eServers, we provide the high-performance infrastructure and expert support to help you succeed. If you have any questions, need help with advanced configurations, or want to add managed backup services, get in touch with our team today. We're here for you 24/7.
eServers provides reliable dedicated servers across multiple global regions. Whether you need low latency, regional compliance, or proximity to your audience, our wide geographic coverage ensures the perfect hosting environment for your project.
At eServers , we proudly partner with 15+ leading global tech providers to deliver secure, high-performance hosting solutions. These trusted alliances with top hardware, software, and network innovators ensure our clients benefit from modern technology and enterprise-grade reliability.