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 Allow only the ports your LochStudios KVM VPS needs with UFW. Open SSH first, and use the portal console if a rule locks you out. 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 Put an SSH key on your LochStudios VPS, confirm you can log in, then turn off password login. Use the portal console if you get locked out. 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 Install Nginx from apt on a LochStudios Ubuntu or Debian VPS, start the service, and confirm HTTP on the IPv4 in the portal. Updated Install MySQL or MariaDB and Secure It Install MariaDB or MySQL on your LochStudios KVM VPS, harden it, create an app user, and keep the engine on localhost unless you mean to publish it. 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) Install Apache, MariaDB or MySQL, and PHP on a LochStudios Ubuntu or Debian VPS, confirm they work together, and open HTTP on the IPv4 in the portal. Updated Install Docker and Docker Compose Install Docker Engine and the Compose plugin on your LochStudios KVM VPS (Ubuntu or Debian) so you can run containers. Updated Install Apache2 on Ubuntu/Debian Install Apache2 from apt on a LochStudios Ubuntu or Debian VPS, start the service, and confirm HTTP on the IPv4 in the portal. Updated Get a Free SSL Certificate with Certbot (Let's Encrypt) Install Certbot on your LochStudios KVM VPS, issue a Let's Encrypt certificate for the name that points at this server, and leave the renewal timer on. Updated First steps on a new VPS (update packages, create a sudo user) Patch your new LochStudios KVM VPS, create a dedicated sudo user, and stop using root for everyday work. 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 Add an Nginx server block on your LochStudios KVM VPS so a name on AtlasDNS serves files from this server. Updated Connect to your VPS via SSH from Windows (PuTTY / Windows Terminal) Open your LochStudios VPS in the portal, then SSH in from Windows Terminal or PuTTY. Use the console if you cannot reach the server. Updated Connect to your VPS via SSH from macOS or Linux Open your LochStudios VPS in the portal, then SSH in from Terminal on macOS or Linux. Use the console if you cannot reach the server. 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