# First Steps on a New Server

DevFeed: [First Steps on a New Server](<https://devfeed.tech/articles/first-steps-on-a-new-server-60975.md>)

Original publisher: [Read original article](<https://david.alvarezrosa.com/posts/first-steps-on-a-new-server/>)

Author: David Álvarez Rosa

Published: 2026-05-17T16:26:00Z

Content type: tutorial

Language: en

Sources: [David Álvarez Rosa](<https://devfeed.tech/sources/david-alvarez-rosa.md>)

Topics: [Back end](<https://devfeed.tech/topics/backend.md>), [ssh](<https://devfeed.tech/topics/ssh.md>), [Zsh](<https://devfeed.tech/topics/zsh.md>)

Tags: [debian](<https://devfeed.tech/tags/debian.md>), [dns](<https://devfeed.tech/tags/dns.md>), [linux](<https://devfeed.tech/tags/linux.md>), [password](<https://devfeed.tech/tags/password.md>), [self-hosting](<https://devfeed.tech/tags/self-hosting.md>), [servers](<https://devfeed.tech/tags/servers.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [starship](<https://devfeed.tech/tags/starship.md>)

## AI overview

A practical checklist for setting up a new Linux server covers choosing a distribution, configuring DNS, creating a non-root account, setting up shell dotfiles and SSH keys, enabling firewall rules and security updates, and confirming nginx and HTTPS work.

## Source excerpt

Over the last decade I've been playing with dozens of servers from multiple providers. These are the steps I've been perfecting to get up to speed fast and feel right at home on a new machine. Wrote it down here mostly as a personal reference, but hopefully useful to someone else too. Hardware, distro, and DNS § Clean Linux install with one large root partition plus big swap.1 While I run Arch on my laptop, Debian tends to be a better fit for servers because of its stability and long support window. Point your domain2 to your server's IP at your DNS provider: an A record for IPv4 and an AAAA record for IPv6. Wait a few minutes, then verify both. $ dig alvarezrosa.com A +short 213.32.19.229 $ dig alvarezrosa.com AAAA +short 2001:41d0:305:2100::febc Hardware doesn't matter: a VPS, a Raspberry Pi, or a dedicated box will do. First login § Log in as root, change the password, and update. $ ssh root@alvarezrosa.com $ passwd $ apt update && apt full-upgrade Create a non-root user with sudo privileges. $ useradd --create-home --groups sudo david $ passwd david Log out, then reconnect as the new user. $ ssh david@alvarezrosa.com From here on, stay on this account and use sudo when you need it. Dotfiles § I like to set up dotfiles early. Debugging on an unfamiliar shell is its own kind of miserable.3 $ git init $ git remote add origin https://github.com/david-alvarez-rosa/dotfiles.git $ git fetch origin $ git checkout -t origin/main $ git submodule update --init --recursive $ git config status.showUntrackedFiles no Switch to zsh and install starship.4 $ sudo apt install zsh starship $ chsh --shell $(which zsh) Log out and back in to confirm the shell loads correctly. SSH keys § Copy your public key to the server from your local machine.5 $ ssh-copy-id david@alvarezrosa.com Confirm you can get in without a password. $ ssh david@alvarezrosa.com If you need root access over SSH, install the key there too. $ sudo install -d -m 700 /root/.ssh $ sudo install -m 600 ~/.ssh/authoriz