Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

Set up a self-hosted Landscape Server
on Ubuntu


Minimum requirements for landscape server

  • Ubuntu 22.04 LTS (Jammy Jellyfish) or Ubuntu 24.04 LTS (Noble Numbat)
  • For hardware: a dual core 2 Ghz processor, 4 GB of RAM, and 20 GB of disk space
  • For networking: an IP address and FQDN, with TCP communication allowed for SSH (typically port 22), HTTP (port 80), HTTPS (port 443), and gRPC (6554)
  • DNS administration access for the domain you will use to access Landscape is necessary, if you wish to use LetsEncrypt to obtain an SSL certificate.

2 ways to install landscape server

Quickstart install

Install 15 mins

Config 30 mins


Manual install

Install 30 mins

Config time varies


Installation type Install time Config time
Juju (Recommended) 15 minutes 15 minutes
Quickstart 15 minutes 30 minutes
Manual 30 minutes 30 hours

Install Landscape Server to manage machines and containers


Attach Pro Token

  1. Get token from ubuntu.com/pro/dashboard

    sudo pro attach

Install

  1. Install prerequisites

    sudo apt update && sudo apt install -y ca-certificates software-properties-common
  2. Set your hostname using variables

    Set landscape.example.com with the FQDN pointing to your server.

    sudo hostnamectl set-hostname "$FQDN"
  3. Add the Landscape PPA

    sudo add-apt-repository -y ppa:landscape/self-hosted-24.04 
  4. Install Landscape

    sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-server-quickstart

Configure SSL

If you have the fullchain.pem and privkey.pem files for your SSL certificate, skip these steps and configure Apache manually.

  1. Install certbot

    sudo snap install certbot --classic
  2. Set your email address in a variable

    EMAIL="YOUR-EMAIL@ADDRESS.COM"
  3. Get and install your certificate

    sudo certbot --apache --non-interactive --no-redirect --agree-tos --email $EMAIL --domains $(hostname --long)

Configure postfix for email

Detailed information is available for Postfix in the Ubuntu Server documentation.

  1. Set SMTP information in variables

    The value of SMTP_PASSWORD should be the SendGrid API Key

    SMTP_HOST='smtp.sendgrid.net'
    SMTP_PORT='587'
    SMTP_USERNAME='apikey'
    SMTP_PASSWORD='YOUR_API_KEY_GOES_HERE'
  2. Install postfix

    sudo DEBIAN_FRONTEND=noninteractive apt-get install -y postfix
  3. Configure postfix

    sudo postconf -e myhostname="$(hostname --long)"
    sudo postconf -e mydomain="$(hostname --domain)"
    sudo postconf -e myorigin="$(hostname --domain)"
    sudo postconf -e masquerade_domains="$(hostname --domain)"
    sudo postconf -e mydestination=localhost
    sudo postconf -e default_transport=smtp
    sudo postconf -e relay_transport=smtp
    sudo postconf -e relayhost="[${SMTP_HOST}]:${SMTP_PORT}"
    sudo postconf -e smtp_tls_security_level=encrypt
    sudo postconf -e smtp_sasl_auth_enable=yes
    sudo postconf -e smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
    sudo postconf -e header_size_limit=4096000
    sudo postconf -e smtp_sasl_security_options=noanonymous
    sudo postconf -e smtp_use_tls=yes
    sudo postconf -e smtp_tls_security_level=encrypt
    sudo postconf -e smtp_sasl_tls_security_options=noanonymous
  4. Write sasl_passwd

    sudo sh -c "echo \"[$SMTP_HOST]:$SMTP_PORT $SMTP_USERNAME:$SMTP_PASSWORD\" > /etc/postfix/sasl_passwd"
  5. Generate sasl_passwd.db

    sudo postmap /etc/postfix/sasl_passwd
  6. Secure sasl_passwd.db

    sudo chmod 600 /etc/postfix/sasl_passwd.db
  7. Remove sasl_passwd

    sudo rm /etc/postfix/sasl_passwd
  8. Restart postfix

    sudo /etc/init.d/postfix restart

Set aside some time

Read the Manual Installation documentation


Install Landscape

Follow the Manual Installation documentation


4 ways to install landscape client

Install Landscape Client
to manage machines and containers

Landscape Client can be installed from Ubuntu's main repository. The latest version can be obtained from the Landscape Beta PPA.


Install

  1. Install the package

    sudo apt update && sudo apt install -y landscape-client

Configure

  1. Define parameters in variables

    Self-hosted Landscape users should set LANDSCAPE_ACCOUNT_NAME as standalone, Landscape SaaS customers should specify their account name and set LANDSCAPE_FQDN as landscape.canonical.com.

    LANDSCAPE_ACCOUNT_NAME='standalone'
    LANDSCAPE_FQDN='landscape.example.com'
    LANDSCAPE_COMPUTER_TITLE='My Computer'
  2. Configure

    sudo landscape-config --silent --account-name="${LANDSCAPE_ACCOUNT_NAME}" --computer-title="${LANDSCAPE_COMPUTER_TITLE}" --tags="" --script-users='nobody,landscape,root' --url "https://${LANDSCAPE_FQDN}/message-system" --ping-url "http://${LANDSCAPE_FQDN}/ping"

Install

  1. Install prerequisites

    sudo apt update && sudo apt install -y software-properties-common
  2. Add the PPA

    sudo add-apt-repository -y ppa:landscape/self-hosted-beta
  3. Install

    sudo apt update && sudo apt install -y landscape-client

Configure

  1. Define parameters in variables

    Self-hosted Landscape users should set LANDSCAPE_ACCOUNT_NAME as standalone, Landscape SaaS customers should specify their account name and set LANDSCAPE_FQDN as landscape.canonical.com.

    LANDSCAPE_ACCOUNT_NAME='standalone'
    LANDSCAPE_FQDN='landscape.example.com'
    LANDSCAPE_COMPUTER_TITLE='My Computer'
  2. Configure

    sudo landscape-config --silent --account-name="${LANDSCAPE_ACCOUNT_NAME}" --computer-title="${LANDSCAPE_COMPUTER_TITLE}" --tags='' --script-users='nobody,landscape,root' --ping-url="http://${LANDSCAPE_FQDN}/ping" --url="https://${LANDSCAPE_FQDN}/message-system"

Install

  1. Define parameters in variables

    Self-hosted Landscape users should set LANDSCAPE_ACCOUNT_NAME as standalone, Landscape SaaS customers should specify their account name and set LANDSCAPE_FQDN as landscape.canonical.com.

    LANDSCAPE_ACCOUNT_NAME='standalone'
    LANDSCAPE_FQDN='landscape.example.com'
  2. Deploy the charm

    juju deploy landscape-client --config account-name='standalone' --config tags='' --config script-users='nobody,landscape,root' --config ping-url="http://${LANDSCAPE_FQDN}/ping" --config url="https://${LANDSCAPE_FQDN}/message-system"

Configure

  1. Relate the charm

    juju relate landscape-client <charm-name>

To install landscape-client from a PPA

apt:
  sources:
    trunk-testing-ppa:
      source: ppa:landscape/self-hosted-24.04
            

Configure landscape-client

To discover additional supported client keys visit the cloud-init Landscape module documentation.

Self-hosted Landscape users should set account_name as `standalone` and define the url and ping_url keys. Landscape SaaS customers should specify their account name, and the url and ping_url keys can be omitted.

landscape:
  client:
    account_name: standalone
    computer_title: "My Computer"
    url: "https://landscape.example.com/message-system"
    ping_url: "http://landscape.example.com/ping"