EQVPS

How to set up a Debian VPS (first steps after you get root)

Initial setup for a fresh Debian 12 VPS: update apt, add sudo and a non-root user, install your SSH key, disable password login, and enable the UFW firewall. The Debian-specific notes vs Ubuntu, with copy-paste commands.

Debian setup is almost the same as Ubuntu — both are apt-based — with a couple of Debian-specific gotchas worth knowing (sudo isn't always there; the image is more minimal). Here's the first ten minutes on a fresh Debian 12 box.

1. Update the system

apt update && apt upgrade -y

2. Install sudo (Debian often lacks it) and make a user

apt install -y sudo curl
adduser deploy            # set a password when prompted
usermod -aG sudo deploy

The sudo install is the main Debian difference — minimal images ship without it.

3. Add your SSH key to the user

Install your public key (generating one):

mkdir -p /home/deploy/.ssh
nano /home/deploy/.ssh/authorized_keys      # paste your PUBLIC key
chown -R deploy:deploy /home/deploy/.ssh
chmod 700 /home/deploy/.ssh && chmod 600 /home/deploy/.ssh/authorized_keys

Confirm ssh deploy@YOUR.SERVER.IP works in a second terminal before continuing.

4. Disable password and root SSH login

sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo systemctl restart ssh

5. Firewall (install then enable)

Debian minimal may not have UFW:

sudo apt install -y ufw
sudo ufw allow OpenSSH
sudo ufw enable

See configure a UFW firewall for opening app ports.

6. Automatic security updates

sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades   # choose "Yes"

Next steps

Patched, off root, key-only, firewalled. From here: install Docker, set up an nginx reverse proxy, or run the full new-VPS security checklist. EQVPS offers clean Debian 12 (and Ubuntu, AlmaLinux) images with root in about a minute, no KYC, paid in crypto.

FAQ

What's different about setting up Debian vs Ubuntu?

The steps are nearly identical — both are apt-based — with two small Debian notes: sudo isn't always installed by default, so you install it first, and Debian ships more minimal, so tools like curl or ufw may need installing. Otherwise the update / non-root user / SSH key / firewall flow is the same.

Why isn't sudo working on my fresh Debian box?

Debian minimal images often don't include sudo, and your new user isn't in the sudo group yet. Install it as root (apt install -y sudo) and add your user with usermod -aG sudo <user>. Then log out and back in for the group to take effect.

Should I disable root SSH login on Debian?

Yes, once a non-root sudo user with your SSH key works. Root login over SSH is the first thing bots try. Create the user, confirm key login in a second terminal, then set PermitRootLogin no and PasswordAuthentication no.

Which Debian version for a VPS?

Debian 12 (Bookworm) — current stable, long support, and what these commands target. Debian stable is prized for exactly the boring reliability you want on a server.

Do you ask for ID or a card?

No. Email to sign up, pay in USDC or USDT. You get a clean Debian image with root in about a minute — no documents, no card.

Comments

No comments yet. Be the first.

Leave a comment

Comments are moderated before they appear.