1. Home
  2. Linux
  3. How to manage your docker containers with yacht

How to manage your Docker containers with Yacht

Docker is a beautiful tool, but it can be hard to manage if you’re unfamiliar with it. Yacht is a program that tries to make things easier by giving users a web UI that can be used to deploy, modify, and manage containers. Here’s how to set up Yacht on your Linux system.

Before we begin

Yacht is an easy-to-use UI for Docker containers. You can use it to edit containers, deploy new ones, manage volumes, and even modify configuration files. However, this software is under heavy development and can sometimes be unstable.

We highly suggest only using Yacht in settings where you aren’t worried about losing valuable data. Be sure to back up your data before using Yacht.

Installing Docker on Linux

Yacht is provided to users through Dockerhub as an image. However, you must install Docker on your system before you attempt to run it. To install Docker on your system, open a terminal window on your server and follow the installation instructions below.

We’ll use Docker via a Snap package on Linux in this guide. Snap is being used because it takes a lot of the difficulty of setting up Docker. To start, you must enable the Snap runtime on your Linux system.

To enable the Snap runtime on Linux, follow our guide on the subject. This guide will go over, in detail, how to set up the Snap package runtime. After setting up the Snap runtime, you can install Docker on your server using the snap install command.

sudo snap install docker

With the Docker tool installed, you can use it as root. However, if you want to use Docker without root, you must enter the following commands in a terminal window.

sudo addgroup --system docker

sudo adduser $USER docker

newgrp docker

sudo snap disable docker

sudo snap enable docker

Pulling the Yacht docker image

You’ll need to pull the Yacht docker image directly from Dockerhub. To pull it to your server (or Linux PC), log into the server’s root account. You can log into root with su.

su -

You likely have the root account locked if you cannot log into the root account. Therefore, you will need to enable it. To enable the root account, do the following.

sudo -s
passwd

Set the root password to something secure and memorable. Then, log out of sudo -s with exit.

exit

After logging into the root account, use the following command to create the “yacht” docker volume. This volume will hold all of the Yacht data on the server.

docker volume create yacht

With the new volume created, use the docker run command to pull down your system’s Yacht image from Dockerhub.

docker run -d -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v yacht:/config selfhostedpro/yacht

Once the image is pulled from Dockerhub, Docker will deploy the image as a container on your system. It will run Yacht on port 8000. You can access the Yacht web UI in any browser with the following URL.

HTTP://local-lan-ip-of-server:8000

Starting the Yacht docker container after installation

Using the docker run command above, Yacht will be deployed via the Docker image and started on Port 8000. However, this command only works for the initial deployment.

If you restart your Linux system, you must use the docker start command to run Yacht. Here’s how.

First, log into the root account using the su – command.

su -

Once logged into the root account, run the docker ps -a command. This command will list all containers on your system. Find the “CONTAINER ID” column and the Yacht container ID.

After copying the Yacht container ID, you can start it up with:

docker start CONTAINER_ID

Or, shut it down with:

docker stop CONTAINER_ID

Logging into Yacht

You’ll need to use the default password and username to log into Yacht. Then, access Yacht via the URL below, enter admin@yacht.local as the user and pass as the password.

HTTP://local-lan-ip-of-server:8000

Using Yacht

Once you log into Yacht, you’ll be presented with the dashboard. This dashboard will show all running Docker images and their CPU and memory usage.

To manage the containers, click on the Yacht sidebar, select “Applications,” and select your container. Then, once you’ve chosen the container, you’ll see detailed information, including port information, control buttons, running processes, logs, etc.

Manage volumes

It is possible to manage Docker volumes in Yacht. To do it, select the Yacht sidebar, choose “Resources,” and select “Volumes.” From here, you’ll be able to access both used and unused Docker volumes.

Manage Networks

Need to access your Docker network settings? Select the Yacht sidebar, and select the “Network” option. Once you’ve accessed this area, you’re free to modify networking settings, interfaces, etc.

Manage images

If you need to manage Docker images, select the Yacht sidebar, choose the “Resources” button, and click on “Images.” Once inside “Images,” Yacht will let you manage your Docker images.