Working with Yatch

Yacht is a lightweight, web-based interface for managing Docker containers. It provides a simple and user-friendly way to handle Docker containers, images, volumes, and networks, making it easier for users who prefer a graphical interface over command-line operations.

Key Features of Yacht

Why Use Yacht?

Yacht makes Docker management accessible for users who may not be comfortable using the command line all the time. It simplifies tasks like deploying new containers or checking the status of running services with an easy-to-use interface. It’s especially helpful for beginners who want to explore Docker without diving into complex commands.

Run Yacht using Docker Compose

Step 1: Create a docker-compose.yml File

  1. Create a directory for your Docker Compose setup, for example:

    cd /src/ mkdir yacht cd yacht
  2. Inside this directory, create a file called docker-compose.yml:

    touch docker-compose.yml
  3. Open the docker-compose.yml file in a text editor, then add the following content:

    version: '3.8' services: yacht: image: selfhostedpro/yacht container_name: yacht ports: - 8000:8000 volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config:/config restart: unless-stopped

    Here’s what each section means:

Step 2: Start Yacht with Docker Compose

  1. Make sure you're in the same directory as your docker-compose.yml file.

  2. Run the following command to start Yacht using Docker Compose:

    docker-compose up -d
  3. Docker Compose will pull the Yacht image (if not already downloaded) and create the container.

Step 3: Access Yacht in Your Browser

  1. Open a web browser.

  2. Type the following in the address bar:

    http://srvX.lab.npnog.org.np:8000

    This opens the Yacht web interface.

Step 4: Managing Containers Through Yacht

  1. Login to Yacht (the default username is admin and password is pass—change this in the settings).
  2. From the dashboard, you can:

Example Commands in Yacht

Step 5: (Optional) Stop and Remove Yacht Containers

To stop the Yacht service, run:

docker-compose down

This will stop and remove the Yacht container, but it won’t remove the image or any persistent data in the ./config folder.