Guides tagged “linux”
Step-by-step MdmHost guides about linux, sorted A-Z.
280 guides · page 1 of 14
Add a new user on Linux (adduser vs useradd)
Create a new user account on your Linux VPS with adduser on Ubuntu and Debian or useradd on AlmaLinux and Rocky Linux, with a password, home folder and the right shell.
Add a swap file on a Linux VPS
Create a swap file, make it survive reboots, tune swappiness, and learn when swap helps and when you really need more RAM.
Add a user to a group in Linux
Add an existing Linux user to a group with usermod -aG or gpasswd, check the result with id, understand why a new login is needed, and remove a user from a group.
Add health checks to Docker containers
Write Docker health checks in a Dockerfile or Compose file, read a container's health status, start services in order with service_healthy, and understand how health relates to restarts.
Add security headers in Nginx (HSTS, CSP, X-Frame-Options)
Add the HTTP security headers browsers use to protect your visitors, including HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and a starter Content Security Policy.
Advanced Nginx load balancing with upstream directives
Use Nginx upstream blocks to spread traffic across several backends: pick a balancing method, set weights and backups, tune passive health checks and keep connections alive.
Alert when a Docker container restarts or exits
Watch Docker restart counts and exit codes with a small script and a systemd timer, then send a Telegram, email or webhook notification when a container restarts or dies.
Allow or block IP addresses in Nginx
Use Nginx allow and deny rules to keep admin areas to your own IP, block abusive addresses and whole ranges, manage long lists in include files, and choose between 403 and 444.
Allow sudo without a password (NOPASSWD) for one user or command
Let a deploy script or one trusted user run sudo without typing a password, using a NOPASSWD rule in /etc/sudoers.d, ideally limited to the exact commands needed.
AlmaLinux vs Rocky Linux: which RHEL alternative to pick
AlmaLinux and Rocky Linux are both free, RHEL-compatible distributions with long support windows. Compare their origins, compatibility approach, release timing, migration tools and panel support to pick one for your VPS.
Apache redirects with.htaccess: HTTPS, www and 301s
Write Apache redirects that work the first time. Force HTTPS, pick www or non-www, move single pages and whole domains with Redirect and RewriteRule, and avoid redirect loops.
Automating MySQL backups with mysqldump and cron
Write a mysqldump backup script, store compressed dumps with rotation, and schedule it with cron so your MySQL or MariaDB data is recoverable.
Automating server maintenance with cron jobs and shell scripting
Build a small set of shell scripts and cron jobs that handle cleanup, backups and log rotation on your Linux VPS, with locking and logging so each run is predictable.
Automating server restarts and health checks with systemd services
Combine systemd restart policies, a timer-driven health check script and a watchdog to restart Linux services automatically when they crash or hang.
Back Up and Restore Redis Data on a Linux VPS
Take a safe Redis backup with BGSAVE or redis-cli --rdb, copy the RDB or AOF files off the server, and restore them without losing a key.
Back up Docker volumes with restic and restore them
Docker named volumes live under /var/lib/docker/volumes. This guide shows how to snapshot them with restic, verify the snapshot and restore it into a new volume.
Back up MySQL and PostgreSQL databases in Docker containers
Dump MySQL, MariaDB and PostgreSQL databases that run inside Docker containers, compress the files, and ship them off the server with restic.
Back up your Linux VPS with rsync, restic and cron
Decide what to back up, dump your databases, copy files off the server with rsync or encrypted restic snapshots, schedule it with cron and prove restores work.
Build and push Docker images with GitHub Actions
Set up a GitHub Actions workflow that builds your Docker image on every push and pushes it to GitHub Container Registry or Docker Hub, with tags and layer caching.
Centralise Docker logs with Loki and Promtail on a Linux VPS
Run Loki and Promtail in Docker Compose to collect container logs from every service on one server, then search and filter them in Grafana with LogQL.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 guides
Still stuck?
Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.
