Ubuntu is essentially the most extensively deployed Linux distribution for VPS internet hosting. Ubuntu 22.04 LTS (Lengthy Time period Help) is the usual for manufacturing deployments, with help till April 2027. Ubuntu 24.04 LTS extends by way of 2029. This information covers what to know earlier than provisioning, the best way to configure Ubuntu VPS for manufacturing workloads, and which InMotion plans help…
Ubuntu Model Choice
A very powerful determination earlier than provisioning is which Ubuntu model to make use of.
Ubuntu 22.04 LTS (Jammy Jellyfish): The present manufacturing commonplace. Ships with PHP 8.1 (upgradeable to eight.3), MySQL 8.0, Python 3.10, and Node.js 12.x (newer variations through NodeSource). Normal help by way of April 2027.
Ubuntu 24.04 LTS (Noble Numbat): The newer LTS launch. Ships with PHP 8.3, MySQL 8.0, and Python 3.12. Normal help by way of April 2029. Sensible choice for brand spanking new deployments the place you don’t have to match an current manufacturing atmosphere.
Ubuntu 20.04 LTS reached finish of normal help in April 2025. Don’t use it for brand spanking new deployments, and plan migrations for any current servers operating 20.04.
InMotion’s Cloud VPS helps Ubuntu 22.04 LTS as a provisioning possibility. Managed VPS plans additionally help Ubuntu throughout plan tiers.
Out there plans: Cloud VPS (unmanaged, full root entry) | Managed VPS (with cPanel and WHM)
Preliminary Server Configuration
Replace the system
At all times run a full system replace instantly after provisioning.
sudo apt replace && sudo apt improve -y
On Ubuntu 22.04, the unattended-upgrades package deal is often pre-installed and configured for safety updates. Confirm it’s lively:
sudo systemctl standing unattended-upgrades
Create a non-root person
Operating as root is a safety threat. Create a normal person with sudo privileges:
adduser yourusernameusermod -aG sudo yourusername
Configure the firewall with UFW
Ubuntu ships with UFW (Uncomplicated Firewall). Allow it with a minimal ruleset:
sudo ufw permit OpenSSHsudo ufw enablesudo ufw standing
Add guidelines in your particular providers as you put in them. For an internet server:
sudo ufw permit 'Nginx Full' Â # or 'Apache Full'
Efficiency Configuration
Swap area
On a VPS with 1 to 4GB of RAM, a swap file acts as overflow reminiscence when bodily RAM is exhausted. With out it, processes are killed when reminiscence fills. Create a 2GB swap file:
sudo fallocate -l 2G /swapfilesudo chmod 600 /swapfilesudo mkswap /swapfilesudo swapon /swapfile
Make it everlasting by including to /and so on/fstab:
/swapfile none swap sw 0 0
Tune swappiness (how aggressively the kernel makes use of swap) to 10 for a server atmosphere, that means the kernel will use swap sparingly and like conserving information in RAM:
echo 'vm.swappiness=10' | sudo tee -a /and so on/sysctl.confsudo sysctl -p
TCP and community optimizations
For net servers dealing with vital site visitors, alter TCP settings in /and so on/sysctl.conf:
web.core.somaxconn = 65535net.ipv4.tcp_max_syn_backlog = 65535net.ipv4.tcp_tw_reuse = 1
Apply with out reboot:
sudo sysctl -p
File descriptor limits
Excessive-traffic net servers and database engines can exhaust the default file descriptor restrict. Improve it in /and so on/safety/limits.conf:
* mushy nofile 65536* onerous nofile 65536
PHP Configuration for Net Functions
Ubuntu 22.04 ships with PHP 8.1 from the default apt repository. Set up a selected model and PHP-FPM for net server integration:
sudo apt set up php8.2-fpm php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip
Key php.ini settings to overview for manufacturing:
memory_limit = 256Mupload_max_filesize = 64Mpost_max_size = 64Mmax_execution_time = 60opcache.allow = 1opcache.memory_consumption = 128opcache.max_accelerated_files = 10000
PHP-FPM pool configuration (sometimes in /and so on/php/8.2/fpm/pool.d/www.conf) must be tuned to your server’s RAM. For a 4GB VPS:
pm = dynamicpm.max_children = 20pm.start_servers = 5pm.min_spare_servers = 5pm.max_spare_servers = 10
MySQL Configuration
MySQL’s default configuration is conservative and never optimized for many net functions. After putting in MySQL Server, edit /and so on/mysql/mysql.conf.d/mysqld.cnf. Key settings for a 4GB VPS:
innodb_buffer_pool_size = 1Ginnodb_log_file_size = 256Mmax_connections = 200query_cache_type = 0innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size must be set to roughly 70% of obtainable RAM on a server devoted to MySQL. On a shared utility server, 25 to 30% is extra applicable.
Managed vs. Unmanaged Ubuntu VPS: Which Matches Your Wants
InMotion affords two distinct Ubuntu VPS environments. The selection between them comes all the way down to how a lot server administration you wish to deal with your self.
InMotion’s Cloud VPS is unmanaged. You get a provisioned Ubuntu server with root entry, and all configuration, safety patching, and software program set up is your accountability. That is the fitting mannequin for builders, sysadmins, and technical groups who need full management and have the experience to function a server manufacturing atmosphere.
InMotion’s Managed VPS contains cPanel and WHM pre-installed, server-level safety patch administration, and 24/7 human help for infrastructure points. The trade-off is a few configuration flexibility in change for operational overhead discount. For companies with out devoted sysadmin capability, that is the extra sustainable long-term alternative.
Premier Care, accessible as an add-on for managed VPS, provides Monarx malware protection, 300GB automated backup storage, and precedence APS help. For companies managing shopper websites on VPS infrastructure, Premier Care offers the safety and backup layer that care plan purchasers count on.
Associated: Find out how to Setup a VPS Server
| InMotion’s Cloud VPS contains Ubuntu 22.04 LTS with root SSH entry, high-availability structure replicating throughout three nodes, and versatile plan upgrades. Discover plans at inmotionhosting.com/cloud-vps. |
