LochStudios  /  Help Centre  /  VPS & Linux
Help centre

VPS & Linux

Guides for running your own VPS — Linux setup, web servers, SSL, and server operations.

Set up a UFW firewall on Ubuntu Enable and configure UFW (Uncomplicated Firewall) to control network access to your VPS. Updated Set up Apache virtual hosts Configure Apache virtual hosts to serve multiple websites from a single server using name-based hosting. Updated Secure SSH with key-based authentication and disable password login Replace SSH passwords with key-based authentication and disable password login for stronger security. Updated Monitor Server Resources (htop, df, free, top) Use built-in Linux tools to monitor CPU, memory, disk, and process usage on your VPS. Updated Install PHP and Common Extensions Install PHP 8.x with essential extensions (MySQL, cURL, JSON, GD) on Ubuntu/Debian or RHEL/CentOS. Updated Install Node.js (via NodeSource or NVM) Install Node.js and npm on your VPS using NodeSource repositories or NVM (Node Version Manager) for easy version switching. Updated Install Nginx on Ubuntu/Debian Set up Nginx web server on Ubuntu or Debian with apt and verify it's running. Updated Install MySQL or MariaDB and Secure It Install MySQL 8 or MariaDB, run the security hardening script, create databases and users, and restrict remote access. Updated Install a LEMP Stack (Nginx, MariaDB, PHP-FPM) Set up the complete LEMP stack (Linux, Nginx, MariaDB, PHP) to run dynamic web applications. Updated Install a LAMP stack (Apache, MySQL/MariaDB, PHP) Set up a complete LAMP stack—Apache, MySQL/MariaDB, and PHP—on Ubuntu/Debian for web application hosting. Updated Install Docker and Docker Compose Install Docker Engine and Docker Compose on your Ubuntu/Debian VPS to containerize applications. Updated Install Apache2 on Ubuntu/Debian Install and enable Apache2 web server on Ubuntu/Debian with systemd commands and basic configuration. Updated Get a Free SSL Certificate with Certbot (Let's Encrypt) Install Certbot and automatically issue, install, and renew free SSL certificates from Let's Encrypt on your VPS. Updated First steps on a new VPS (update packages, create a sudo user) Secure your new VPS by updating packages and creating a dedicated sudo user. Updated Enable Automatic Security Updates (unattended-upgrades) Configure unattended-upgrades on Ubuntu/Debian to install security patches automatically without manual intervention. Updated Create an Nginx Server Block (Virtual Host) for Your Site Configure a virtual host in Nginx to serve your domain from your web files. Updated Connect to your VPS via SSH from Windows (PuTTY / Windows Terminal) Connect to your VPS securely using SSH on Windows with PuTTY or Windows Terminal. Updated Connect to your VPS via SSH from macOS or Linux Connect to your VPS securely using SSH on macOS or Linux from the terminal. Updated Add Swap Space to Your VPS Configure swap space on your Ubuntu/Debian VPS to prevent out-of-memory crashes when RAM is exhausted. Updated