How to Install and Set Up V2Ray or ShadowsocksR (SSR) on Your VPS

V2Ray and ShadowsocksR (SSR) are popular tools for bypassing internet restrictions and enhancing online privacy. With Hosteons’ VPS, you can easily set up your own private proxy server using V2Ray or SSR. This tutorial will guide you through the installation and configuration process step by step.

Prerequisites

Before you begin, ensure you have:

  1. A VPS: Hosteons provides reliable VPS solutions with root access.
  2. Linux OS: Ubuntu 20.04 or Debian 11 are recommended.
  3. Root Access: Administrative privileges on your VPS.

Step 1: Update Your VPS

Start by updating your system to ensure all packages are up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install V2Ray

  1. Download the official V2Ray installation script:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  1. Start and enable V2Ray:
sudo systemctl start v2ray
sudo systemctl enable v2ray
  1. Confirm that V2Ray is running:
sudo systemctl status v2ray

Step 3: Configure V2Ray

  1. Open the V2Ray configuration file:
sudo nano /usr/local/etc/v2ray/config.json
  1. Add the following basic configuration:
{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "YOUR_UUID",
            "alterId": 64
          }
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}
  • Replace YOUR_UUID with a unique UUID. Generate one using:
uuidgen
  1. Save and exit the file.
  2. Restart V2Ray to apply the changes:
sudo systemctl restart v2ray

Step 4: Install ShadowsocksR (SSR)

If you prefer SSR over V2Ray, follow these steps:

  1. Clone the SSR repository:
git clone https://github.com/shadowsocksrr/shadowsocksr.git
  1. Navigate to the SSR directory:
cd shadowsocksr
  1. Run the setup script:
bash setup_cymysql.sh
  1. Configure SSR by editing the configuration file:
nano user-config.json

Add the following settings:

{
  "server": "0.0.0.0",
  "server_port": 8388,
  "password": "YOUR_PASSWORD",
  "method": "aes-256-cfb",
  "protocol": "auth_sha1_v4",
  "obfs": "tls1.2_ticket_auth",
  "timeout": 300
}
  • Replace YOUR_PASSWORD with a strong password.
  1. Start the SSR server:
bash run.sh

Step 5: Open Firewall Ports

Allow traffic on the necessary ports for your proxy server:

sudo ufw allow 1080/tcp
sudo ufw allow 8388/tcp
sudo ufw enable

Step 6: Test Your Proxy Server

  1. Download and install a V2Ray or SSR client on your device.
  2. Configure the client with the server details, including IP address, port, and UUID or password.
  3. Connect to the proxy server and verify your connection.

Conclusion

Setting up V2Ray or ShadowsocksR on a VPS from Hosteons enhances your online privacy and allows you to bypass internet restrictions. With this guide, you can deploy your own secure and private proxy server in minutes. If you encounter any issues, Hosteons’ support team is available to assist you.

How to Set Up Nginx, PHP, and MySQL on a VPS

If you’re looking to host a website or web application, setting up a reliable server stack is essential. Nginx, PHP, and MySQL provide a powerful combination for serving dynamic content efficiently. This guide will walk you through setting up Nginx, PHP, and MySQL on a Linux VPS from scratch.

Prerequisites

Before starting, ensure you have:

  1. A VPS: A reliable VPS provider like Hosteons.
  2. Linux OS: Ubuntu 20.04 or Debian 11 (other distributions may require slight adjustments).
  3. Root Access: Administrative privileges on your server.

Step 1: Update Your Server

To ensure you have the latest packages and security patches, update your system:

sudo apt update && sudo apt upgrade -y

Step 2: Install Nginx

Nginx is a lightweight, high-performance web server. Install it with the following command:

sudo apt install nginx -y

After installation, start and enable Nginx to run at boot:

sudo systemctl start nginx
sudo systemctl enable nginx

You can check if Nginx is running by visiting your server’s IP address in a web browser. You should see the default Nginx welcome page.

Step 3: Install MySQL

MySQL is a popular relational database management system used for storing application data. Install it using:

sudo apt install mysql-server -y

Once installed, secure the MySQL installation by running:

sudo mysql_secure_installation

Follow the prompts to set a root password, remove test databases, and disallow remote root logins for added security.

Step 4: Install PHP

PHP is a server-side scripting language used for dynamic web content. To install PHP along with necessary extensions, run:

sudo apt install php-fpm php-mysql -y

Step 5: Configure Nginx to Use PHP

By default, Nginx does not process PHP files. You need to configure Nginx to pass PHP requests to the PHP processor.

  1. Open the default Nginx server block configuration:
sudo nano /etc/nginx/sites-available/default
  1. Modify the file to include the following settings:
server {
    listen 80;
    server_name your_domain_or_IP;
    root /var/www/html;

    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}
  1. Save and exit the file, then test the Nginx configuration:
sudo nginx -t
  1. Reload Nginx to apply the changes:
sudo systemctl reload nginx

Step 6: Test PHP

Create a test PHP file to ensure everything is working:

sudo nano /var/www/html/info.php

Add the following content:

<?php
phpinfo();
?>

Save and exit the file. Visit http://your_server_ip/info.php in your web browser. If PHP is correctly configured, you will see a PHP information page.

Step 7: Secure Your Setup

  1. Remove the PHP Info File: Once you confirm PHP is working, delete the info.php file to prevent unauthorized access:
sudo rm /var/www/html/info.php
  1. Set Up a Firewall: Allow HTTP and HTTPS traffic while blocking unused ports:
sudo ufw allow 'Nginx Full'
sudo ufw enable
  1. Enable SSL: Secure your site with HTTPS using a tool like Let’s Encrypt:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your_domain

Follow the prompts to set up SSL certificates.

Conclusion

You now have a fully functional server running Nginx, PHP, and MySQL, ready to host your website or application. This stack provides a robust, secure, and efficient foundation for your web hosting needs. If you’re using Hosteons’ VPS, you can take advantage of their reliable performance and support to ensure your setup runs smoothly.

How to Install WordPress on a VPS in 5 Simple Steps

How to Install WordPress on a VPS

WordPress is one of the most popular platforms for building websites, known for its flexibility and user-friendly interface. If you’re using a VPS (Virtual Private Server) for hosting, installing WordPress gives you greater control and performance than shared hosting. This guide will walk you through installing WordPress on a VPS in just five simple steps.


Step 1: Set Up Your VPS Environment

Before installing WordPress, your VPS needs the appropriate software stack to support it. Most WordPress installations require:

  • Linux Operating System (e.g., Ubuntu or CentOS)
  • Web Server (Apache or NGINX)
  • Database Server (MySQL or MariaDB)
  • PHP

How to Set Up the Environment:

  1. Access Your VPS: Log in to your VPS using SSH. Open a terminal and type:
   ssh username@your_server_ip
  1. Update the Server: Keep your server software up-to-date.
   sudo apt update && sudo apt upgrade -y
  1. Install Required Packages:
    For Apache:
   sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php -y


For NGINX:

   sudo apt install nginx mysql-server php php-fpm -y


After installation, ensure the services are running:

   sudo systemctl start apache2
   sudo systemctl start mysql

Step 2: Create a MySQL Database for WordPress

WordPress requires a database to store its content and configuration.

  1. Access MySQL:
   sudo mysql
  1. Create a Database:
   CREATE DATABASE wordpress_db;
  1. Create a Database User:
   CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'strong_password';
  1. Grant Permissions:
   GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wordpress_user'@'localhost';
   FLUSH PRIVILEGES;
  1. Exit MySQL:
   EXIT;

Step 3: Download and Configure WordPress

  1. Navigate to Your Web Directory:
   cd /var/www/html
  1. Download WordPress: Use the official WordPress package.
   wget https://wordpress.org/latest.tar.gz
  1. Extract the Files:
   tar -xvzf latest.tar.gz
  1. Set Permissions: Ensure the web server can access the WordPress files.
   sudo chown -R www-data:www-data /var/www/html/wordpress
   sudo chmod -R 755 /var/www/html/wordpress

Step 4: Configure WordPress

  1. Rename the Configuration File:
   cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
  1. Edit the File:
    Open the configuration file to add database details.
   nano /var/www/html/wordpress/wp-config.php


Replace the placeholders with your database details:

   define('DB_NAME', 'wordpress_db');
   define('DB_USER', 'wordpress_user');
   define('DB_PASSWORD', 'strong_password');

Step 5: Complete the Installation via Browser

  1. Access WordPress in Your Browser:
    Open your browser and navigate to:
   http://your_server_ip/wordpress
  1. Follow the On-Screen Instructions:
  • Choose your language.
  • Enter your website name, admin username, and password.
  • Click Install WordPress.
  1. Log In to Your WordPress Dashboard:
    Once the installation is complete, log in using the admin credentials you set up.

Conclusion

Congratulations! You’ve successfully installed WordPress on your VPS. By following these five simple steps, you now have a powerful, flexible WordPress site running on a robust VPS environment.

At Hosteons, we offer high-performance VPS hosting solutions optimized for WordPress, ensuring fast load times and reliable uptime. Ready to take your website to the next level? Explore our VPS plans at Hosteons.com today!

Need help with your VPS? Our 24×7 support team is here to assist you.

Reset root password when stuck at FSCK

Stuck at FSCK but your root password is not working ?

Here is a short tutorial on how to reset root password on a  Linux VPS or Dedicated Server 

  1. First login to your VPS control panel and use VNC to access the VPS Console and if it’s a Dedicated server either use the IPMI or use a KVM to go to console of your server.
  2. Now let your system boot and press spare on grub menu to pause the system from booting and going at fsck prompt
  3. Now select the last working kernel and press ‘e’
  4. Now Go to the link similar to below and press ‘e’:    “kernel /vmlinuz-x.x.x.x root=UUID.x.x.x.x ro rhgb quiet”
  5. Delete ‘ro’ from the line and append ‘init= /bin/bash’ for CentOS or ‘init= /bin/sh’ for Debian
  6. Press ‘Enter’ or ‘Return” key to save and the press ‘b’ to boot into single user mode
  7. Now the system should directly take you to your single user mode shell. Now type below command to mount the / file system in read write: mount -o remount rw /
  8. Once / File system is mounted, you can then change the root password with “passwd” command
  9. Now you can again reboot your system and run fsck using the above root password