NewCode CLOUD — 20% off your first month on all cloud VPSClaim
Docs / Guides

Guides

60 setup, networking, security and troubleshooting guides for dedicated servers and cloud VPS, organised by topic.

Getting Started

First steps on a new Linux server: SSH keys, users, swap, updates, services and scheduled tasks.

8 guides
50 Essential Linux Commands for Server AdministratorsThe Linux commands you actually need to run a VPS or dedicated server — files, processes, disks, networking, logs, packages and services — with practical examples and safe habits.Cron Jobs on Linux: Schedule Backups, Scripts and Maintenance TasksLearn crontab syntax with real examples, avoid the classic cron pitfalls (PATH, time zones, overlapping runs, silent failures), log output properly and know when to use systemd timers instead.How to Add a Swap File on Linux (and How Much Swap You Need)Create, size and tune a swap file on Ubuntu, Debian, AlmaLinux and Rocky Linux to prevent out-of-memory crashes on small VPS plans — plus swappiness, zram and how to tell when you really need more RAM.How to Create a Sudo User on Linux and Stop Using RootCreate a non-root administrator on Ubuntu, Debian, AlmaLinux or Rocky Linux, grant sudo rights, copy SSH keys, configure sudoers safely and understand Linux file permissions.How to Enable Automatic Security Updates on Ubuntu, Debian, AlmaLinux and Rocky LinuxConfigure unattended-upgrades and dnf-automatic so your server installs security patches on its own, control reboots, get email reports and avoid surprises with major upgrades.How to Set Up SSH Key Authentication and Disable Password LoginGenerate an SSH key pair on Windows, macOS or Linux, install it on your server, disable password logins safely and manage keys for a team — with fixes for the most common errors.Systemd Explained: Run Any App as a Linux Service That Starts on BootManage services with systemctl, read logs with journalctl and write your own systemd unit files for Node.js, Python, Go or Java apps — with automatic restarts, resource limits and security hardening.Initial Linux Server Setup Checklist (Ubuntu, Debian, AlmaLinux)The first things to do on a new dedicated server or VPS — update packages, create a sudo user, switch to SSH keys, set the time zone and enable automatic security updates.

Network & China Access

Latency to mainland China, carrier routes, BBR, bandwidth tests, IP configuration and ICP.

10 guides
China Telecom, Unicom and Mobile Routes Explained: CN2 GIA, 163, 9929 and CMIA plain-English guide to how traffic enters mainland China — the three carriers, their standard and premium international networks, why evening peaks hurt, and how to choose and verify a route for your server.Configure Static IP, Gateway and DNS on Linux: Netplan, NetworkManager and Debian ifupdownSet a static IPv4 address, gateway and DNS servers on Ubuntu (Netplan), AlmaLinux and Rocky (NetworkManager) and Debian (ifupdown) — safely, with rollback, and with fixes for the mistakes that cut off remote servers.Connect Your Servers with WireGuard: A Private Network Between LocationsBuild an encrypted private network between servers in Hong Kong, Japan and the US (or your office) with WireGuard — install, keys, configuration, firewall rules, routing and troubleshooting.How to Read MTR and Traceroute Reports: Find Real Packet Loss and LatencyRun MTR and traceroute on Linux, Windows and macOS, read every column correctly, tell real packet loss from ICMP rate limiting, spot congested hops on China routes and send a useful report to support.How to Speed Up a Website for Visitors in Mainland China (Without an ICP Licence)Why sites hosted outside China load slowly for Chinese users and what fixes it — server location and routes, removing blocked Google resources, fonts, images, caching, HTTP/2 and CDN choices — with a testing checklist.How to Test Server Bandwidth with iperf3 (and Why Speed Tests Disagree)Measure real throughput between your server and other locations with iperf3 — TCP and UDP tests, parallel streams, reverse mode, reading the results, and why one connection to China can be slower than your port speed.How to Add Additional IP Addresses on Linux (Netplan, ifupdown, NetworkManager)Configure extra IPv4 addresses on Ubuntu, Debian and AlmaLinux servers — single IPs or whole /24 blocks for SEO servers — make them persistent, verify them and bind websites to individual IPs.How to Enable TCP BBR on Linux to Speed Up Cross-Border TransfersWhat BBR congestion control is, why it helps long-distance and lossy links such as China ↔ US, and how to enable and verify it on Ubuntu, Debian, AlmaLinux and CentOS.How to Test Server Latency and Routing to Mainland ChinaA practical guide to testing a Hong Kong, Japan or US server before you buy — ping, mtr and traceroute from China, reading CN2 vs 163 hops, and why you must test at peak hours.ICP Filing Explained: When You Need It and When You Don'tWhat China's ICP filing (备案) and ICP licence are, who must have one, how long the process takes, and why websites hosted in Hong Kong, Japan, Singapore or the US do not need it.

Security & Hardening

Firewalls, SSH hardening, Fail2ban, rate limiting and what to do if a server is compromised.

7 guides
Fail2ban: Stop SSH Brute-Force Attacks and Protect Nginx, WordPress and MailInstall and configure Fail2ban on Ubuntu, Debian, AlmaLinux and Rocky Linux — jails for SSH, Nginx and WordPress logins, ban times, whitelists, recidive bans, and how to check and unban IPs.Firewalld Tutorial for AlmaLinux and Rocky Linux: Zones, Services, Ports and Rich RulesConfigure firewalld on AlmaLinux, Rocky Linux and CentOS Stream — open and close ports, use zones and services, allow by source IP, forward ports, block countries of attackers and avoid locking yourself out.Has My Linux Server Been Hacked? Signs of Compromise and What to Do NextRecognise the warning signs of a compromised Linux server — unknown processes, crypto miners, new users, changed files, outbound spam — check them step by step, contain the incident and rebuild safely.How to Scan a Linux Server for Malware: ClamAV, Linux Malware Detect and rkhunterInstall and run ClamAV, Linux Malware Detect (maldet) and rkhunter to find web shells, infected PHP files, miners and rootkits — schedule scans, read results, avoid false alarms and know what to do with infections.Nginx Rate Limiting: Protect Logins, APIs and Sites from Floods and ScrapersUse limit_req and limit_conn in Nginx to slow brute-force logins, protect APIs and absorb small HTTP floods — with burst and nodelay explained, real IPs behind Cloudflare, whitelists and testing.SSH Hardening Guide: 12 Settings to Secure Remote Access on LinuxHarden OpenSSH step by step — keys only, no root login, allowed users, changing the port, two-factor authentication, modern ciphers, idle timeouts and jump hosts — without locking yourself out.How to Set Up a UFW Firewall on Ubuntu and DebianConfigure UFW on an Ubuntu or Debian server step by step — default policies, allowing SSH and web traffic, limiting by source IP, rate limiting, logging and the Docker caveat.

Websites & Web Servers

Nginx, Apache, LEMP, WordPress, databases, reverse proxies, Cloudflare and caching.

11 guides
Apache Virtual Hosts on Ubuntu and Debian: Host Multiple Sites with PHP-FPM and HTTPSSet up Apache name-based virtual hosts for several domains, run PHP through PHP-FPM with the event MPM, enable .htaccess where needed, add free SSL, and tune Apache for a VPS.Deploy a Node.js App with Nginx Reverse Proxy, PM2 and HTTPSRun a Node.js application in production — install Node.js LTS, keep it alive with PM2 or systemd, put Nginx in front as a reverse proxy with WebSockets and HTTPS, and deploy updates with zero downtime.Deploy a Python Web App (Django, Flask or FastAPI) with Gunicorn, Nginx and systemdProduction deployment of Python web apps on Ubuntu or Debian — virtual environments, Gunicorn and Uvicorn workers, a systemd service, Nginx reverse proxy with static files, HTTPS, environment variables and troubleshooting.How to Host Multiple Websites on One Server with NginxRun many domains on one VPS or dedicated server with Nginx server blocks — directory layout, per-site PHP pools and users, a catch-all default server, SSL for every domain, separate IPs per site, and resource planning.How to Install a LEMP Stack (Nginx, MariaDB, PHP-FPM) on Ubuntu 24.04 and Debian 12Step-by-step LEMP installation on Ubuntu or Debian — Nginx, MariaDB and PHP 8 with FPM — plus a working server block, PHP tuning, security settings, multiple PHP versions and troubleshooting 502 errors.How to Install WordPress on Nginx with HTTPS (Ubuntu and Debian)Install WordPress on a LEMP server step by step — database, files, wp-config with salts, a WordPress-specific Nginx configuration, HTTPS, WP-CLI, permissions, security hardening and the first settings to change.Install, Secure and Tune MariaDB (MySQL) on a Linux ServerInstall MariaDB on Ubuntu, Debian, AlmaLinux or Rocky, lock it down, create users with least privilege, allow remote access safely, tune the InnoDB buffer pool and other key settings, and monitor slow queries.Nginx Performance: Enable gzip, Brotli, HTTP/2 and Browser CachingMake websites load faster from Nginx — gzip and Brotli compression settings, HTTP/2 and HTTP/3, Cache-Control headers for static assets, open file cache, and how to verify each change.Using Cloudflare with Your Own Server: SSL Modes, Real Visitor IPs and Origin ProtectionPut Cloudflare in front of a VPS or dedicated server correctly — DNS and proxy settings, Full (strict) SSL with an origin certificate, restoring real visitor IPs in Nginx, locking the origin to Cloudflare, caching rules and what to expect for visitors in China.WordPress Speed Optimization on Your Own Server: Caching, Redis, PHP and ImagesMake WordPress fast on a VPS or dedicated server — measure first, then add full-page caching, Redis object cache, OPcache and PHP-FPM tuning, database clean-up, image optimisation and front-end fixes.Install Nginx with a Free Let's Encrypt SSL Certificate on UbuntuPoint a domain at your server, install Nginx, create a server block, get a free HTTPS certificate with Certbot and set up automatic renewal on Ubuntu 22.04 or 24.04.

Docker & Self-Hosted Apps

Docker, Compose and popular self-hosted apps: n8n, Ollama and Nextcloud.

5 guides

Windows Server

Remote Desktop, first-day setup, RDP security, IIS websites and extra IP addresses.

5 guides

Email & DNS

DNS records, SPF, DKIM and DMARC, reverse DNS, blacklists and running your own mail server.

5 guides

Performance & Monitoring

Benchmarks, monitoring tools, high CPU load, full disks and uptime alerts.

5 guides