deploy ubuntu 20 04 instance scaleway elements

Jump toUpdate content

How to deploy a Ubuntu 20.04 LTS (Focal Fossa) Instance on Scaleway

Reviewed on 14 June 2022 • Published on 02 December 2021
  • Ubuntu
  • instance
  • setup
  • server

Ubuntu is one of the most popular Linux distributions. First released in 2004, Ubuntu, whose name is based on an ancient African word meaning ‘humanity to others’, became quickly the favourite Linux distribution of users around the world, mostly because it is easy to install and use.

Ubuntu is developed and maintained by the company Canonical and a large community. Their commercial and community teams release new versions of the distribution every six months and collaborate to produce a single, high quality release with long term support (LTS) every two years.

In this tutorial you will learn how to deploy an Instance with Ubuntu 20.04 LTS (Focal Fossa) from the Scaleway console and configure it for hosting your apps and websites.


Deploying your Ubuntu Linux Instance from the Scaleway console

  1. Click Instances in the Compute section of the console side menu. The Instances creation page displays.

  2. Click Create an Instance. The Instance creation wizard displays.

  3. Configure your Instance:

    • Choose an Availability Zone
      • An Availability Zone refers to the geographical location in which your Instance will be created.
    • Select the Instance type
      • Scaleway provide different Instance types, designed for specific use cases. Choose the configuration that fits your requirements.
    • Choose an image for your instance
      • Select the Ubuntu 20.04 Focal Fossa image from the OS images tab.
    • Configure the storage options
      • For the ease of this tutorial, leave the default storage options in place.
    • Enter a name and optional tags
      • Tags can help to organzie your Instances
    • Check your SSH key displays in the list of keys authorized to access the Instance
    • Click Create a new Instance to create the Instance.

Once your Instance is ready, it displays in the list of your Instances.

Logging into the root account


The root account is the admin user on Linux systems and has full administrative priviledges. Therefore, it is not recommended to use the root account on a regular basis. A malicious command executed as root can damage the system, even by accident. We recommend that you create a regular user account for daily operations. The steps for doing this are outlined later in this tutorial.

  1. Click your Instance name on the Instances list. Your Instance’s information displays.

  2. Navigate to the SSH command section and click Copy to copy the command into the clipboard.

  3. Open a terminal and paste the command in the terminal:

     ssh root@your_instance_id

    A warning about host authenticity appears upon the first connection to the Instance. Accept it to proceed.

Updating your system

Ubuntu uses the Advanced Packaging Tool (APT) to manage its 60,000+ pre-compiled software packages. The APT package index is a collection of available packages and it generates the repositories defined in the file /etc/apt/sources.list, and from the directory /etc/apt/sources.list.d.

  1. Run the following command to update the APT package index:

    apt update
  2. Upgrade the packages already installed on your Instance to the latest version available in Ubuntu’s repositories by running the following command:

    apt upgrade 

To install additonal software packages, use the apt install command:

apt install packagename

For more information about how to use the APT package manager, run the following command: apt help, or refer to our documentation on how to manage packages.

Adding regular users on Ubuntu

As previously mentioned, we do not recommend always connecting to your Instance as root. Rather, create additional regular users to log into your Instance.

  1. Run the following command to create a new user, named scaler:

    adduser scaler
  2. Answer the questions, starting with the account password. Make sure to use a strong password and optionally fill in any of the other information. Confirm the response to each question by pressing Enter.

  3. Add the users to the superdoers group (sudo) to be able to launch administrative tasks from this user, without the need to log in as root.

    adduser scaler sudo

    You can now run commands with administrative permissions by prefixing your command with sudo. For example: sudo apt upgrade.

  4. Add the public SSH key information for the user by opening the file ~/.ssh/authorized_keys in a text editor and pasting the public key:

    nano ~/.ssh/authorized_keys

    You can generate your SSH key pair on Linux or macOS directly from a terminal. On computers running Windows you can use PuTTYgen to generate your key pair.