Guides

Set up your first server

Demo Author

Published: 1 min read

A pine forest in teal mist, a bright path running between the trees

A new server is a blank machine with a public address. These steps take it from the welcome email to a system you can safely build on.

Choose a plan and a system

Start with the plan that fits today's project; you can move up later without reinstalling. Pick a current Ubuntu or Debian release unless your software asks for something else.

Log in for the first time

The welcome email has your server's IP address. In a terminal, connect as the administrator: ssh [email protected] (with your own address).

Install the updates

Bring every package up to date before anything else: apt update && apt upgrade -y.

Add a user for daily work

Working as root turns every slip into a big one. Create your own user and give it admin rights: adduser maya, then usermod -aG sudo maya.

A pine forest at night in green mist, with a soft light behind the trees

Turn on the firewall

Allow SSH first, then switch the firewall on: ufw allow OpenSSH and ufw enable. Open other ports, such as 80 and 443 for a website, only when you need them.

Tip: Next step

Swap the password for a key: Log in with SSH keys.

Related posts