Skip to main content

How to Install Juju on Ubuntu/Debian

Updated this week

Introduction

Juju is an open-source application modeling tool developed by Canonical that allows you to deploy, configure, and manage complex applications on various platforms such as Kubernetes, public/private clouds, and bare metal.

In this guide, we'll walk through the installation of Juju on a Debian-based system like Ubuntu. This will set the foundation for deploying charms and models effectively.

Prerequisites

Before installing Juju, make sure your system meets the following requirements:

  • A machine running Ubuntu 20.04/22.04 or Debian 11/12

  • A user with sudo privileges

  • A stable internet connection

  • Basic understanding of the Linux terminal

Quick Notes

  • Juju is distributed as a snap package.

  • Snap is preinstalled on Ubuntu but may need to be installed manually on Debian.

  • Juju interacts with clouds (e.g., LXD, AWS, Azure, Kubernetes), so be prepared to configure cloud credentials depending on your use case.

  • This guide focuses on Juju 3.x, the current stable release as of writing.

Install Snap (Debian)

Ubuntu comes with snapd preinstalled. If you're on Debian, install it manually:

sudo apt update
sudo apt install snapd -y
sudo systemctl enable --now snapd.socket

Ensure Snap is available in the current session:

sudo ln -s /var/lib/snapd/snap /snap

Then, reboot or log out and back in to complete the snap setup.

Install Juju

Install Juju via snap:

sudo snap install juju --classic

Verify the installation:

juju version

You should see output similar to:

3.4.0-ubuntu-amd64

Add a Cloud (LXD for Local Testing)

For local development or testing, you can use LXD as your cloud.

sudo snap install lxd
sudo lxd init

Go with the defaults unless you need a custom setup. If unsure, answer:

  • Use LXD clustering? → No

  • Create a new storage pool? → Yes

  • Would you like to configure networking? → Yes

  • Use an existing bridge or create a new one? → Create a new bridge

  • Enable IPv6? → No (optional)

After initialization, add your user to the lxd group:

sudo usermod -aG lxd $USER
newgrp lxd

Add the LXD Cloud to Juju

juju add-cloud

Choose:

  • Cloud type: lxd

  • Name: lxd-local (or any name you like)

  • Accept the default endpoint or press Enter

juju autoload-credentials

Juju will detect your LXD setup and import credentials automatically.

Create a Controller

A controller is Juju's brain — it manages models and deployments.

juju bootstrap lxd-local my-controller

Replace my-controller with any name you prefer.

If successful, you’ll see:

Bootstrap complete, controller "my-controller" now is available.

Verify

Check the status of the controller, you should see an active controller and a default model.

juju status

Conclusion

You've successfully installed and configured Juju on your Ubuntu or Debian system. This setup provides a solid foundation to explore Juju’s powerful capabilities, whether you're testing locally or preparing for production deployments on public or private clouds.

Did this answer your question?