
Managing a new VPS can be overwhelming, especially when starting with a fresh Linux installation. That’s why we at Hosteons created a smart, interactive script to help new VPS users quickly set up their server with best practices in place—regardless of whether you’re using Ubuntu, Debian, AlmaLinux, CentOS, or Rocky Linux.
🎯 What This Script Does
Our open-source script, initial_vps_setup.sh, automates essential initial tasks, including:
- 🔐 Creating a new sudo user
- 📛 Checking if the user already exists and giving the option to update sudo access
- 🧰 Installing basic tools (curl, wget, git, htop, unzip, etc.)
- 🧱 Enabling firewall with UFW or firewalld based on your distro
- 🔐 Optionally generating a secure SSH key pair (displays private + public key for user)
- 🚫 Option to disable root SSH login
- ✅ Sets correct permissions and groups
🛠️ Compatible with All Major Linux Distributions
Tested and supported on:
- Ubuntu
- Debian
- AlmaLinux
- CentOS
- Rocky Linux
The script auto-detects your OS and executes distro-specific commands where needed.
📜 Easy to Use
Just log in as root on your new VPS and run:
curl -sL https://raw.githubusercontent.com/hosteons/Initial-VPS-Setup-Script-for-Linux/main/initial_vps_setup.sh | bash
You’ll be guided through a few interactive prompts—no manual file editing required.
💻 Example Output and Access Instructions
After setup, you’ll get:
- Username and SSH access instructions
- SSH key (if generated)
- Sample sudo usage instructions like:
sudo apt update
sudo systemctl restart nginx
🔐 Why It Matters
- Security First: Disabling root login and using SSH keys makes brute-force attacks significantly harder.
- Consistency: Every VPS is provisioned the same way—ideal for sysadmins managing multiple servers.
- Time-Saving: No need to copy-paste multiple commands or look up tutorials.
❤️ Built and Maintained by Hosteons
This script is built and maintained by the team at Hosteons as part of our effort to make VPS hosting smoother and safer for everyone.
💾 GitHub Repo:
👉 https://github.com/hosteons/Initial-VPS-Setup-Script-for-Linux