Quick Start

New Server (Ubuntu Linux)

Initial provisioning steps for a fresh Ubuntu Linux server.

Objective Set a static IP, configure SSH keys, and run initial updates.
Device Ubuntu 22.04/24.04 LTS
Time 10 min

After installing a fresh Ubuntu Server from an ISO (or spinning up a cloud VM), you need to get it securely on the network before you can actually start using it.

1. Set a Static IP Address

Ubuntu uses netplan for network configuration.

  1. Open the Netplan config file (the filename may vary, usually starts with 50- or 00-):
    sudo nano /etc/netplan/00-installer-config.yaml
    
  2. Modify it to use a static IP (assuming your interface is eth0):
    network:
      ethernets:
        eth0:
          addresses:
            - 10.10.10.25/24
          routes:
            - to: default
              via: 10.10.10.1
          nameservers:
            addresses: [8.8.8.8, 1.1.1.1]
      version: 2
    
  3. Apply the changes:
    sudo netplan apply
    

2. Secure SSH Access

Never rely on passwords for SSH. You should set up SSH keys.

From your local laptop, generate a key and copy it to the server:

# Generate a key (if you don't already have one)
ssh-keygen -t ed25519

# Copy it to the new server
ssh-copy-id username@10.10.10.25

Now, disable password authentication on the server:

sudo nano /etc/ssh/sshd_config

Find the line PasswordAuthentication yes and change it to no. Restart SSH:

sudo systemctl restart ssh

3. Update Packages

Finally, ensure the system is fully patched and secure:

sudo apt update && sudo apt upgrade -y