UnderHost
Knowledgebase Docs

Getting started with Debian on your VPS

Debian first steps: SSH, package updates, UFW firewall, non-root user, and common software.

On this page
Debian is a stable, reliable Linux distribution perfect for VPS hosting. This guide covers essential first steps after provisioning a Debian VPS at UnderHost. ## 1. Connect via SSH {#connect-ssh} Find your VPS credentials in CustomerPanel under **My Services**. Connect using SSH: ```bash ssh root@your.server.ip ``` Replace `your.server.ip` with your VPS IP address. If prompted, accept the key fingerprint. ## 2. Update the System {#update-system} Keep your system secure by updating the package lists and installed packages: ```bash apt update apt upgrade -y ``` For a full upgrade (including major version changes): ```bash apt full-upgrade -y ``` ## 3. Configure UFW Firewall {#firewall-basics} Debian includes **UFW** (Uncomplicated Firewall) for simple firewall management. Check if it's installed: ```bash apt install ufw -y ``` Enable UFW: ```bash ufw enable ``` Allow SSH (essential to keep access): ```bash ufw allow ssh ``` Allow HTTP and HTTPS for web servers: ```bash ufw allow http ufw allow https ``` Check the firewall status: ```bash ufw status ``` ## 4. Create a Non-Root User {#create-user} Running everything as root is unsafe. Create a non-root user: ```bash adduser myuser ``` Follow the prompts to set a password and user details. Add sudo privileges: ```bash usermod -aG sudo myuser ``` Test the new user: ```bash su - myuser sudo whoami ``` Exit and log in as the new user for day-to-day tasks. ## 5. Install Common Software {#install-software} **Web Server (Nginx):** ```bash apt install nginx -y systemctl enable nginx systemctl start nginx ``` **PHP and Extensions:** ```bash apt install php php-cli php-fpm php-mysql -y systemctl enable php-fpm systemctl start php-fpm ``` **MySQL/MariaDB:** ```bash apt install mariadb-server -y mysql_secure_installation ``` **Git:** ```bash apt install git -y ``` ## Next Steps {#next-steps} - Install a control panel (aaPanel, CloudPanel, or HestiaCP) - Configure SSL certificates with Let's Encrypt - Set up regular backups - Monitor system resources with htop (`apt install htop`) - Read the [OS Comparison guide](/article/os-comparison/) for other options For more help, see our [VPS management guide](/article/manage-vps/) or [contact support](/article/contact-support/). **Related:** [Getting started with Ubuntu Server on your VPS](/article/ubuntu-server-guide/) | [Getting started with AlmaLinux on your VPS](/article/almalinux-guide/) | [Linux and Windows operating systems for VPS-which to choose](/article/os-comparison/) | [How to choose the right operating system for your VPS](/article/choose-os/)
Was this article helpful?

Need a server with this OS?

Deploy Linux or Windows workloads on an UnderHost Cloud VPS or dedicated server with the operating system that fits your stack.

Related articles

Back to Operating Systems