--- title: "How to Install and Use Lazydocker on Ubuntu 24.04" description: "Install Lazydocker on Ubuntu 24.04 from the official release, then use its terminal UI to follow logs, check stats, restart and exec into Docker containers." category: "Docker Advanced" language: en source: https://cubepath.com/docs/docker-advanced/lazydocker-terminal-ui-for-docker updated: 2026-09-25 --- # How to Install and Use Lazydocker on Ubuntu 24.04 Lazydocker is an open source terminal user interface for Docker and Docker Compose written in Go. It shows containers, Compose services, images, volumes and networks in one screen, with live logs and resource graphs, and lets you restart, stop, remove or open a shell in a container with a single key. It is especially useful over SSH, where you have no graphical tool. In this tutorial you will install Lazydocker on Ubuntu 24.04 from the official GitHub release, use it to manage a small Compose project and customize its configuration. ## Prerequisites To follow this tutorial you need: - A server running Ubuntu 24.04 LTS, for example a CubePath VPS, on x86_64 or arm64. - A non-root user with `sudo` privileges. - Docker Engine and the Docker Compose plugin installed from Docker's official repository. - Your user in the `docker` group, so it can talk to the Docker socket without `sudo`. Lazydocker uses the same permissions as the `docker` command. Confirm that Docker works for your user: ```bash docker ps ``` ```output CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` If you get `permission denied while trying to connect to the Docker daemon socket`, add your user to the group with `sudo usermod -aG docker $USER`, then log out and back in. ## Step 1 - Installing Lazydocker Lazydocker is not packaged in the Ubuntu archive. The project publishes a static binary for each release on GitHub, so installing it is a matter of downloading the right archive and copying the binary into your `PATH`. Look up the latest version number through the GitHub API: ```bash LAZYDOCKER_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazydocker/releases/latest | grep -Po '"tag_name": *"v\K[^"]*') echo "$LAZYDOCKER_VERSION" ``` ```output 0.24.1 ``` The exact number will be whatever is current when you run it. Download the archive for your architecture. On x86_64 servers use `Linux_x86_64`; on arm64 servers replace it with `Linux_arm64`: ```bash cd /tmp curl -fLo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/download/v${LAZYDOCKER_VERSION}/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz" ``` Extract only the binary and install it to `/usr/local/bin` with the right permissions: ```bash tar -xzf lazydocker.tar.gz lazydocker sudo install -m 0755 lazydocker /usr/local/bin/lazydocker rm lazydocker lazydocker.tar.gz ``` Check the installed version: ```bash lazydocker --version ``` ```output Version: 0.24.1 ... OS: linux Arch: amd64 ``` The first line should match the version you downloaded, followed by build details. To upgrade later, repeat this step: the new binary replaces the old one. ## Step 2 - Starting a sample Compose project Lazydocker is most useful with something to look at. Create a small Compose project with a web server and a Redis cache: ```bash mkdir -p ~/lazydemo && cd ~/lazydemo nano compose.yaml ``` ```yaml services: web: image: nginx:alpine ports: - "8080:80" cache: image: redis:7-alpine ``` Start it: ```bash docker compose up -d ``` Check that both containers are running: ```bash docker compose ps --format 'table {{.Name}}\t{{.State}}' ``` ```output NAME STATE lazydemo-cache-1 running lazydemo-web-1 running ``` ## Step 3 - Navigating the interface Launch Lazydocker from the project directory. When it starts inside a Compose project it adds a **Services** panel for that project: ```bash cd ~/lazydemo lazydocker ``` The screen is split in two. The left column holds a list of panels: - **Project**: the current Compose project, with its `compose.yaml` and logs of all services. - **Services**: the services of that project, with their state. - **Containers**: every container on the host, including ones outside the project. - **Images**, **Volumes** and **Networks**: the corresponding Docker objects. The large right-hand area shows details for the selected item, split into tabs such as **Logs**, **Stats**, **Env**, **Config** and **Top**. Move between panels and items with the arrow keys (or `h`, `j`, `k`, `l`). Switch between the tabs of the right-hand area with `[` and `]`. Press `Enter` to focus the right-hand area so you can scroll it, and `Esc` to go back. Press `x` at any time to open a menu with every action available for the current panel, and `q` to quit. ## Step 4 - Following logs and resource usage Select `web` in the **Services** panel. The **Logs** tab follows the container output live, like `docker compose logs -f web`. Generate some traffic from a second terminal to see it scroll: ```bash for i in $(seq 1 5); do curl -s -o /dev/null http://localhost:8080; done ``` Each request appears as an Nginx access log line in Lazydocker. Press `]` to move to the **Stats** tab, which draws CPU and memory graphs and shows the same counters as `docker stats`, including the memory limit if one is set. The **Env** tab lists the environment variables of the container, and **Config** shows the relevant parts of `docker inspect`, which is often faster than scrolling through the full JSON. ## Step 5 - Managing containers With a service or container selected, the most common actions are a single key away: | Key | Action | |-----|--------| | `r` | Restart | | `s` | Stop | | `d` | Remove (asks for confirmation) | | `p` | Pause or unpause | | `E` | Open a shell inside the container | | `a` | Attach to the container's main process | | `m` | Show logs in full screen | | `b` | Bulk commands, such as stopping or removing all containers | | `x` | Menu with every action for the panel | Try it: select `cache`, press `r` and watch its state in the **Services** panel go to restarting and back to running. Then press `E` to open a shell in the Redis container and run a command: ```bash redis-cli ping ``` ```output PONG ``` Type `exit` to leave the shell and return to Lazydocker. Actions that change state, such as removing a container or pruning images, always ask for confirmation first. In the **Images** and **Volumes** panels, `d` removes the selected item and `b` offers bulk cleanup of unused ones, the same as `docker image prune` and `docker volume prune`. ## Step 6 - Customizing the configuration Lazydocker reads its settings from `~/.config/lazydocker/config.yml`. The file does not exist until you create it, and you only need to include the keys you want to change. Quit Lazydocker with `q` and create it: ```bash mkdir -p ~/.config/lazydocker nano ~/.config/lazydocker/config.yml ``` ```yaml gui: theme: activeBorderColor: - green - bold inactiveBorderColor: - white logs: timestamps: true since: "60m" commandTemplates: dockerCompose: docker compose customCommands: containers: - name: bash attach: true command: "docker exec -it {{ .Container.ID }} bash" ``` This configuration: - Highlights the focused panel border in bold green. - Prefixes every log line with a timestamp and loads only the last 60 minutes of logs, which keeps the view fast for chatty containers. - Makes Lazydocker call the Compose v2 plugin (`docker compose`) instead of the legacy `docker-compose` binary. - Adds a custom command that opens `bash` instead of `sh` in containers that have it. Run it by selecting a container and pressing `c`. Start Lazydocker again from `~/lazydemo` and check that the log lines now start with a timestamp. ## Troubleshooting **`Got permission denied while trying to connect to the Docker daemon socket`.** Your user is not in the `docker` group, or you have not logged in again since adding it. Run `id` and check that `docker` is listed. **The Services panel is empty.** Lazydocker only detects a Compose project when you start it in the directory that contains the Compose file. Run `cd` into the project first. **Colors or borders look broken.** Your terminal does not support the characters or colors Lazydocker uses. Make sure `TERM` is set to a value such as `xterm-256color` and use a UTF-8 locale. ## Conclusion You installed Lazydocker from the official release, used it to follow logs and statistics, restart containers, open a shell and clean up objects, and tuned its behavior with `config.yml`. As next steps, add more `customCommands` for the tasks you repeat most, set CPU and memory limits on your containers so the Stats tab shows meaningful limits, and keep the Docker CLI at hand for scripting, since Lazydocker is designed for interactive use.