Beginner’s Guide to VPS with Full Root Access

If you’ve just received a VPS with full root access, this guide will help you get started with essential setup, security, and software installation. This is ideal for hosting websites, applications, or systems.

1. Connecting to Your VPS via SSH

To log in to your VPS, use SSH (Secure Shell):

  • Windows: Use PuTTY, enter your VPS IP, and port 22.
  • Linux/macOS: Open Terminal and run:
ssh root@your-server-ip

2. Update & Secure Your Server

a. Change Root Password

passwd

b. Update the System

# Ubuntu/Debian
apt update && apt upgrade -y

# CentOS/AlmaLinux
yum update -y

c. Enable Firewall

apt install ufw -y
ufw allow OpenSSH
ufw enable
ufw status

3. Create a New Sudo User (Optional)

adduser myadmin
usermod -aG sudo myadmin

4. Install Web Server (LAMP Stack)

a. Apache

apt install apache2 -y

b. PHP

apt install php php-cli php-mysql php-curl php-xml -y

c. MariaDB

apt install mariadb-server -y
mysql_secure_installation

5. Hosting a Website

Upload files to the web root:

/var/www/html/

Use FileZilla (SFTP) or the command:

scp yourfile.zip root@your-server-ip:/var/www/html/

6. Set Up a Virtual Host (Apache)

nano /etc/apache2/sites-available/mydomain.com.conf

Add:

<VirtualHost *:80>
    ServerName mydomain.com
    DocumentRoot /var/www/mydomain
</VirtualHost>

Enable and restart:

a2ensite mydomain.com
systemctl reload apache2

7. Install SSL with Let’s Encrypt

apt install certbot python3-certbot-apache -y
certbot --apache

8. Useful Tools

apt install htop curl fail2ban unzip -y

9. Optional Control Panel (Free)

CyberPanel:

sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)

HestiaCP:

wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
bash hst-install.sh

10. Install WordPress (Example)

wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress/* /var/www/html/
chown -R www-data:www-data /var/www/html/
chmod -R 755 /var/www/html/

Then open your browser and complete the WordPress installation using your domain or server IP.

11. Need Assistance?

Your hosting provider Netpoa.com can assist you with setup, website transfers, server security, or panel installation.

Was this answer helpful? 0 Users Found This Useful (0 Votes)