Self-hosting container management tools has become increasingly popular among developers and homelab enthusiasts. Yacht, a modern and lightweight Docker management UI, offers a streamlined way to control Docker containers, images, and networks. This guide provides a step-by-step process to install and run Yacht on a VPS, helping you leverage open-source tools for your self-hosted projects.
Why Self-Host Yacht?
Yacht simplifies Docker container management by providing a visual interface, making it easier to deploy, monitor, and troubleshoot containerized applications. Hosting Yacht on a VPS allows for a cost-effective, reliable, and always-on solution for your self-hosted ecosystem.
Choosing the Right VPS
Select a VPS provider based on your budget and location. Common options include:
| Provider | Price (EUR/USD/month) | Link |
|---|---|---|
| Contabo | 5.99 EUR | Contabo |
| Hetzner Cloud | 4.15 EUR | Hetzner |
| DigitalOcean | 6 USD | DigitalOcean |
| Vultr | 6 USD | Vultr |
| Linode | 5 USD | Linode |
For a comprehensive look at all providers, see the full VPS comparison. Here, we’ll use Hetzner Cloud as an example due to its price-performance ratio.
Prerequisites
- Basic familiarity with Linux command line
- VPS with Ubuntu 22.04 LTS or similar
- SSH access with root or sudo privileges
- Domain name (optional but recommended for SSL)
Step 1: Prepare Your VPS
Connect via SSH:
ssh root@your-vps-ip
Update the system:
apt update && apt upgrade -y
Install Docker and Docker Compose:
apt install -y docker.io docker-compose
systemctl enable --now docker
Verify Docker is running:
docker --version
docker-compose --version
Step 2: Create Docker Compose File for Yacht
Create a directory for Yacht:
mkdir -p ~/yacht && cd ~/yacht
Create docker-compose.yml:
version: '3'
services:
yacht:
image: selfhostedpro/yacht:latest
container_name: yacht
ports:
- "8080:8080"
restart: unless-stopped
environment:
- TZ=Europe/Berlin
Adjust the timezone (TZ) as needed.
Step 3: Launch Yacht Container
Start the container:
docker-compose up -d
Check container status:
docker ps
Once running, Yacht will be accessible via http://your-vps-ip:8080.
Step 4: Configure Yacht for Your Environment
Open your browser and navigate to http://your-vps-ip:8080. You’ll see the Yacht UI.
- Set a password or enable authentication.
- Modify settings to improve security, such as setting up SSL with a reverse proxy (e.g., Nginx).
Step 5: Secure Your Yacht Instance (Recommended)
Use Certbot with Nginx to enable HTTPS:
- Install Nginx:
apt install -y nginx
- Configure Nginx as a reverse proxy:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
- Obtain SSL:
apt install -y certbot python3-certbot-nginx
certbot --nginx -d your-domain.com
Update the Nginx configuration for SSL support and restart:
systemctl reload nginx
Now, you can access Yacht securely via HTTPS.
Additional Tips
- Backup your Yacht configuration regularly.
- Keep Yacht Docker image updated:
docker-compose pull
docker-compose up -d
- Consider integrating Yacht with other self-hosted apps for automation, like Portainer or Heimdall.
Frequently Asked Questions
1. How do I install Yacht on a VPS using Docker?
To install Yacht using Docker, create a docker-compose.yml file pointing to the latest Yacht image and run docker-compose up -d. This method simplifies management and updates. Always ensure your Docker setup is secure and up to date, especially when exposed to the internet.
2. Is Yacht suitable for managing multiple Docker hosts?
Yacht manages Docker containers on a single host. For multi-host setups, consider tools like Portainer or Rancher, which can orchestrate multiple nodes. Yacht is ideal if you run containers on a single VPS or homelab server.
3. Can I automate Yacht updates?
Yes. Pull the latest image and restart the container:
docker-compose pull
docker-compose up -d
Automate this process using cron jobs or CI/CD pipelines. Always test updates on a staging environment beforehand to prevent disruptions.
Conclusion
Self-hosting Yacht on a VPS offers a powerful and lightweight platform for container management, tailored for developers and self-hosters. By choosing a cost-effective VPS from providers like Hetzner or Contabo, you can run Yacht reliably and affordably. Follow this guide to set up, secure, and maintain your self-hosted Yacht instance efficiently.
For more self-hosting ideas and best practices, explore the awesome-selfhosted list and r/selfhosted community. Happy self-hosting!