Skip to main content
🖥

VDS / VPS

48 articles in this section

A VDS gives you a bare system and root access instead of a control panel — everything past that point is on you to configure. This section walks the path from the first SSH connection to a working production box: installing an LEMP stack, setting up Nginx virtual hosts, issuing Let's Encrypt certificates with Certbot, configuring the UFW firewall, and locking things down right after purchase.

It also covers what keeps a server alive long-term: automated database backups, log rotation, monitoring with htop, Netdata, and a Grafana-plus-Prometheus stack, and troubleshooting common failures such as a full disk or a process killed by the OOM killer. A networking block covers IPv4 versus IPv6, subnet masks, routing with ip route and netplan, and diagnostics with ping and tcpdump.

Separate guides exist for specific services: Docker and Docker Compose, PostgreSQL and Redis alongside MySQL/MariaDB, Postfix for sending mail from your own server, and HAProxy or Nginx as a load balancer.

  • SSH hardening and Fail2Ban against brute-force attempts
  • Backups and recovery after a failure
  • Resource and performance monitoring
  • Networking: IPv4/IPv6, nftables, systemd, and cron
First SSH Connection to Your VDS How to connect to your ZevsHost VDS via SSH from Windows, macOS, and Linux. Initial security setup. Installing a LEMP Stack on VDS (Ubuntu) Installing Nginx, MySQL, and PHP on an Ubuntu VDS from ZevsHost for web application hosting. Configuring Nginx for a Website on VDS Nginx configuration for hosting a website on ZevsHost VDS: virtual hosts, gzip, caching. Installing SSL on Nginx with Certbot Free Let's Encrypt SSL on VDS with Nginx using Certbot. Automatic certificate renewal. Monitoring VDS Server Resources Utilities for monitoring CPU, RAM, and disk on VDS: htop, df, free, netstat. How to Update the OS on Your VDS Safely updating Ubuntu/Debian on a ZevsHost VDS. Updating system packages. Docker on a VPS: Installing and Running Containers Step-by-step Docker installation on an Ubuntu/Debian VPS. Running your first container, docker-compose, and managing images and volumes. MySQL/MariaDB on VPS: installation, configuration, security Install MariaDB on an Ubuntu VPS, create databases and users, configure remote access, and set up automated backups. Node.js + PM2 on a VPS: Deploying Applications Installing Node.js on a VPS, deploying Express/Next.js apps, managing processes with PM2, autostart, and monitoring. Configuring SWAP on a Linux VPS: Extending RAM How to add a SWAP file on an Ubuntu VPS. Improving server stability under peak load. Configuring swappiness and checking usage. Redis on a VPS: Installation and Cache Configuration Install Redis on an Ubuntu VPS, configure caching for WordPress and Laravel, protect it with a password, and monitor memory usage. VPS Uptime Monitoring: Tools and Alert Setup How to set up VPS and website uptime monitoring: free UptimeRobot and Hetrix Tools, Telegram, email, and SMS alerts when a server goes down. MySQL Backup on VPS: Automation Automatic MySQL/MariaDB backups on VPS. Scripts for daily backups, S3 storage, encryption, and recovery. PostgreSQL on a VPS: Installation and Optimization Installing PostgreSQL on an Ubuntu VPS, creating databases and roles, configuring pg_hba.conf, remote access, and basic optimization. Postfix on a VPS: Sending Email From Your Own Server Installing Postfix on an Ubuntu VPS, configuring an SMTP relay, sending via Gmail/SendGrid, and SPF/DKIM for email deliverability. Logrotate: automatic log rotation on Linux Configuring logrotate for Nginx, Apache, MySQL, and applications. Preventing disk overflow from logs, archive compression and retention. Site monitoring: UptimeRobot, Zabbix, and system alerts Setting up uptime monitoring for a website and VPS: UptimeRobot (free), Telegram alerts, resource monitoring with htop and netdata. Wildcard SSL with Certbot for All Subdomains Obtain a wildcard Let's Encrypt SSL certificate via Certbot with DNS validation. Covers *.domain.com — all subdomains with a single certificate. What Is IPv4: Addressing, Subnet Masks, and Network Classes IPv4 is the backbone of the modern internet. Learn IP address structure, CIDR subnet masks, private address ranges, and why IPv4 addresses are running out. IPv6 on VPS: Configuration, Benefits, and Address Management Setting up IPv6 on VPS running Ubuntu/Debian: static address via netplan, connectivity check, dual-stack IPv4+IPv6 configuration. How to Change Hostname on Linux: Ubuntu, Debian, CentOS Change hostname on Linux using hostnamectl, /etc/hostname and /etc/hosts. Why correct hostname matters for mail and SSL, and how to verify the change. Docker Compose: launching an application stack Docker Compose: file structure, environment variables, networks, volumes, healthcheck. Example LEMP stack (Nginx+PHP+MySQL+Redis) in one file. Updating Ubuntu Server: apt upgrade and do-release-upgrade How to update Ubuntu Server — packages via apt and the OS version via do-release-upgrade. Safe update order, rollback, and what to do if upgrade hangs. Upgrading Debian to a New Version: Bullseye to Bookworm Step-by-step upgrade from Debian 11 (Bullseye) to Debian 12 (Bookworm) via apt. Pre-upgrade checks, resolving package conflicts, and rollback strategy. Migrating from CentOS 8 to Rocky Linux or AlmaLinux CentOS 8 reached EOL in December 2021. How to migrate to Rocky Linux 8/9 or AlmaLinux 8/9 using official migration scripts without reinstalling the server. Linux Network Diagnostics: ping, traceroute, ss, tcpdump A complete toolkit for Linux network diagnostics. Learn to use ping, traceroute, mtr, netstat, ss, nmap, and tcpdump to troubleshoot VPS issues. Netdata: real-time server monitoring Netdata: 1-minute install, web dashboard, CPU/RAM/disk/network monitoring, alerts, Telegram and Slack integration, threshold configuration. CIDR Subnet Masks: /24, /16 and Calculating Ranges CIDR notation /24, /16, /8 — how to calculate host count, address range, and subnet mask. Practical examples for VPS, firewall, and VPN configuration. Grafana + Prometheus: metrics and dashboards Monitoring with Grafana and Prometheus: installation via Docker Compose, Node Exporter, dashboard import, alerts, PromQL queries for the server. Updating the Linux Kernel: Why and How to Do It Safely How to update the Linux kernel on Ubuntu and Debian via apt, check the version, and roll back to a previous kernel via GRUB if the new one causes issues. Nginx as a Load Balancer: Configuration Nginx load balancer: round-robin, least_conn, ip_hash algorithms, healthcheck, sticky sessions, upstream configuration with examples. systemd: Creating a Unit File for Service Autostart on Linux How to create a systemd unit file to autostart an application on Linux. Unit types, ExecStart/Restart directives, dependencies, and systemctl management. SSH Hardening: Secure sshd_config Configuration on a VPS Complete guide to secure SSH configuration: disabling root login, changing the port, keys instead of passwords, Fail2Ban, and two-factor authentication. NAT: What Network Address Translation Is and How It Works NAT (Network Address Translation) conserves IPv4 addresses. How SNAT, DNAT, Masquerade work, iptables NAT setup, and when VPS NAT causes problems. First steps after buying a VDS: basic protection First steps on a new VDS: changing the root password, creating a sudo user, SSH keys, UFW, automatic security updates, fail2ban. Linux Routing Configuration: ip route Commands and netplan Linux network routing management via ip route, ip addr, and netplan. Adding static routes, configuring two interfaces, and setting the default gateway. Linux: server performance profiling Linux performance diagnostics: top, htop, iostat, vmstat, sar, perf, strace. How to find the process eating CPU and RAM. Monitoring tools. Cron on Linux: Setting Up the Task Scheduler on VPS How to configure cron on Linux for task automation: crontab syntax, environment variables, logging, cron record anatomy, and examples for backups and scripts. tmux and screen: keeping sessions alive over SSH tmux and screen keep a session running on the server when SSH drops: install steps, commands, and how the tools differ. systemd logs: journalctl, rsyslog, and size limits journalctl and rsyslog read systemd logs and limit their size: commands, journald.conf parameters, and setting up rotation. nftables: the modern replacement for iptables nftables replaces iptables on modern Linux distributions: tables, chains, basic firewall setup, and troubleshooting commands. LVM on a server: resizing a disk with no downtime Resizing a disk with LVM on a VDS with no downtime: pvresize, lvextend, resize2fs and xfs_growfs, checking the volume group, and common mistakes. Accurate server time: chrony and NTP synchronization Accurate time on a VDS with chrony: installation, NTP sources, the chronyc tracking and sources commands, and common clock sync problems. Disk Full on a VDS: How to Find What Ate the Space Disk full on a VDS: use df, du, lsof, and journalctl to find the files and logs eating up space, then safely clean the server. OOM Killer on Linux: Why It Kills a Process, How to Stop It OOM Killer on Linux kills processes when memory runs out — learn how to find the cause in journalctl, tune oom_score_adj, and add swap. HAProxy on a VDS: Load Balancing and Health Checks HAProxy on a VDS distributes traffic across servers — see how to install it, set up health checks, and choose roundrobin or leastconn balancing. SFTP and vsftpd: Secure File Transfer to a VDS SFTP and vsftpd on a VDS: how to transfer files over an encrypted channel, set up chroot for an SFTP user, and enable TLS in vsftpd.conf. cloud-init: Automatic VPS Configuration on Creation cloud-init automatically configures a VPS on creation — users, SSH keys, packages, and commands via user-data with no manual server login.