Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · OtherFree

Initial Server Setup with Ubuntu (DigitalOcean)

A widely used step-by-step tutorial for the first things to do on a new Ubuntu server: log in as root, create a normal user, grant sudo, set up the UFW firewall and enable SSH access for the new user. It works on any provider's Ubuntu server, not only DigitalOcean.

Format

Guide

Topic

Other

Provider

DigitalOcean

Time needed

About 30 minutes

Level

Beginner

Access

Free

What it is

DigitalOcean's community tutorials are some of the most read server guides on the web, and "Initial Server Setup with Ubuntu" is the one most other guides link to as step zero. It walks through five steps: logging in as root, creating a new user, granting that user administrative privileges with sudo, setting up a basic firewall with UFW, and enabling external access for the regular user, including copying SSH keys so the new user can log in with a key.

Why it matters

A fresh cloud server usually starts with only a root account. Working as root all the time is risky, and a server on the internet is probed for weak SSH logins almost immediately. These steps, a normal user with sudo, key-based login and a firewall allowing only SSH, are the baseline before you install anything else. The commands are standard Ubuntu, so the guide applies whichever provider you use.

Who it is for

Students and developers setting up their first virtual private server (VPS) for a portfolio project, a bot, a small API or practice. Some comfort with the terminal and SSH helps.

How to use it well

  • Keep your current root session open while you test logging in as the new user in a second terminal, so a mistake does not lock you out.
  • After key login works, consider going further than the tutorial by disabling password authentication and root login in the SSH server configuration.
  • Write the steps you took into a short runbook so you can repeat them on the next server.
  • Check the tutorial's version selector or date so the commands match your Ubuntu release.

Costs and cautions

The tutorial is free. A server costs money on most providers after any free credit. Set a billing alert, and destroy servers you are not using. Be wary of "free VPS" offers from unknown sites.

Is it worth it?

Yes. It is short, clear and trusted, and it teaches habits you will use on every Linux server you touch.

Common questions

Do I need a DigitalOcean account? No. The steps work on any Ubuntu server, including free-tier instances from other providers.

What should I read next? Guides on installing a web server such as Nginx, and on keeping the server updated with unattended upgrades.

Is it free? Yes, the tutorial is free to read.

devopscloudbeginner friendly

Ready to start?

Opens on DigitalOcean in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Initial Server Setup with Ubuntu (DigitalOcean)". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.