Skip to main content
Hyper 8 Spacefun Videos

Yacht: Deine persönliche Management GUI für Docker!

In meinen Videos habe ich euch ja schon eine  Vielzahl von Lösungen für das Selfhosting   00:00
vorgestellt. In der Regel nutzen wir dazu Docker,  denn Docker eignet sich sehr, sehr gut und ist   00:05
dazu auch noch portabel. Normalerweise haben  wir bisher eine Lösung auf einer VM mit Docker   00:12
und Docker Compose installiert. Wenn du jetzt  aber mehrere Lösungen bei dir auf einem Server   00:19
betreiben möchtest, dann eignet sich dazu eine  GUI für Docker, und die möchte ich euch heute   00:25
vorstellen, und zwar heißt die Yacht. Ihr habt  vielleicht schon mal von Management GUIs wie   00:33
Portainer gehört. Ich stelle euch heute Yacht vor.  Yacht ist noch leichtgewichtiger und super einfach   00:39
zu bedienen. Wie das genau geht, das zeige  ich euch jetzt in diesem Video. Und zwar geht   00:46
ihr dazu einfach mal auf die Webseite yacht.sh  und dort können wir gleich schon losgehen. Wie   00:52
üblich nutzen wir auch für die Installation von  Yacht selbst Docker. Das heißt Docker müssen wir   00:59
erst einmal installieren. Ich verwende hier meine  Linux Distribution, die heißt TuxWiz. Die findet   01:04
ihr auf meiner Webseite spacefun.ch und dort  könnt ihr die hier im Bereich TuxWiz ganz einfach   01:10
beziehen. TuxWiz eignet sich super gut, da es sich  um eine leichtgewichtige Linux-Variante handelt,   01:17
die sehr gut auch als Server genutzt werden kann.  TuxWiz basiert dabei auf Debian. Das ist jetzt die   01:25
Variante auf Debian Stable Basis und damit bist  du auf jeden Fall auf der sicheren Seite. Ich   01:30
öffne jetzt also hier mal ein Terminal und  wie üblich installiere ich erstmal Docker   01:37
und Docker Compose. Das ganze mache ich jetzt  hier aus den offiziellen Debian-Repositorys   01:41
und dazu gebe ich den Befehl 'sudo apt install  docker.io' und 'docker-compose' ein. Hier gebe   01:46
ich mein Passwort ein und im Hintergrund  wird jetzt Docker bereits installiert.   01:55
Als Nächstes muss ich dann meinen Benutzer  noch zu der Docker-Gruppe hinzufügen, damit   02:01
ich als Benutzer auch selber Docker verwenden  kann. Üblicherweise haben wir bisher unsere   02:06
Software immer im Home-Verzeichnis des Users  installiert. Das ist auch sehr gut geeignet,   02:12
wenn man jetzt eine einzelne Lösung fährt. Heute  möchten wir es aber etwas anders machen und wir   02:17
möchten das ganze systemweit installieren und auch  für andere Benutzer zugänglich machen. Das heißt   02:23
dazu verwenden wir eine spezielle Gruppe und  unter Linux gibt es üblicherweise eine Gruppe,   02:29
die heißt 'users'. Bei Debian gibt es diese Gruppe  noch, da ist aber standardmäßig kein User mehr   02:33
drin. Das kann ich mal abrufen mit 'getent group  users' und diese Gruppe hat hier die sogenannte   02:39
User ID (UID) 100, das sehen wir hier sehr  genau. Also, ich füge jetzt meinen Benutzer mit 02:49
'sudo usermod -a -G docker tux' der Gruppe  'docker' hinzu. Docker hat er jetzt bereits   02:55
installiert. Zusätzlich füge ich jetzt meinen  User auch noch der Gruppe 'users' hinzu,   03:05
denn nachher können dann alle, die in dieser  Gruppe 'users' drin sind, diese Docker Lösung   03:10
auf deinem Linux-System verwenden. Du musst dann  einfach nur noch den Benutzer in dieser Gruppe   03:14
'users' hinzufügen. Das habe ich jetzt gemacht.  Hier muss ich natürlich 'users' erst die Gruppe   03:19
und dann den Benutzernamen angeben. Jetzt  muss ich mich einmal ab- und wieder anmelden,   03:26
damit diese Änderungen aktiv werden und kann  dann gleich bereits mit der Installation von   03:31
Yacht loslegen. Ich öffne also noch einmal mein  Terminal, öffne wieder die Webseite yacht.sh   03:38
und kann dann hier auf den Punkt 'Get Started'  klicken. Hier gibt es dann einen Bereich im linken   03:44
Menü 'Install Yacht' und wir möchten das ganze  natürlich wie gesagt mit Docker installieren,   03:50
und zwar auch mit Docker Compose, da wir das  systemweit machen möchten. Dazu lege ich jetzt   03:55
einen neuen Ordner '/yacht' direkt auf der  Root-Ebene einfach mal an. Und dazu gebe   04:02
ich den Befehl 'sudo mkdir /yacht' ein. Das  hat den Vorteil, dass dieser Ordner nachher   04:08
auch standardmäßig von dieser Lösung direkt für  Templates genutzt wird. Das kann ich euch nachher   04:18
auch zeigen. Deswegen ist es sinnvoll,  hier für diese Lösung für Yacht wirklich   04:23
diesen '/yacht'-Ordner zu verenden. Das '/' ist  immer das Wurzelverzeichnis, also der Ausgang,   04:27
von dem alle weiteren Verzeichnisse abzweigen.  Das kann ich euch noch mal anzeigen 'ls -al /'   04:33
und da gibt es jetzt den Ordner 'yacht'. Da  habe ich jetzt natürlich noch keine Rechte   04:41
drauf. Das muss ich auch noch anpassen. Also 'sudo  chown' das mache ich jetzt mal mit 'tux' und dann   04:45
aber meine Gruppe ':users' und dann '/yacht'.  Und dann gebe ich noch ein 'sudo chmod' ein.   04:51
Ihr habt bestimmt auch schon mein super Video über  Linux-Rechte gesehen. Falls nein, schau dir das   04:59
unbedingt an. Da erkläre ich dir das ganz genau,  wie das funktioniert mit diesem Oktal-System und   05:05
wie die Rechte hier aufgebaut sind. Ich gebe  jetzt hier mal '775' ein, dann hat der User und   05:11
die Gruppe volle Rechte und dann den Ordner. Das  muss ich natürlich auch wieder mit 'sudo' machen,   05:17
denn diese Befehle auf dem System, also das ist  ja ein Systemordner direkt im Wurzel-Verzeichnis,   05:24
kann ich nur als Root ausführen. Das habe ich  jetzt gemacht. Jetzt schaue ich mir das noch   05:30
mal mit 'ls -ald' an. Ich kann dann direkt das  Directory angeben '/yacht'. Dann wird nämlich   05:34
das Verzeichnis selbst angegeben und nicht  der Verzeichnisinhalt. Wenn ich nur 'ls -al'   05:40
machen würde, würde er mir den Verzeichnisinhalt  anzeigen und ich würde das Verzeichnis gar nicht   05:46
sehen. Also 'ls -ald' zeigt mir die Rechte von  dem Verzeichnis an. Die passen jetzt also, die   05:50
Rechte stimmen hier. Ich gehe jetzt als User in  dieses Verzeichnis rein 'cd /yacht' und kann dann   05:58
dort hier z.B. diese 'docker-compose.yml'-Datei  einfach mal anlegen. 'nano docker-compose.yml'.   06:04
Dazu kopiere ich mir jetzt den Inhalt hier dieser  Beispiel Docker Compose und füge den jetzt hier   06:14
an dieser Stelle einfach mal ein. Hier seht ihr  es wird der Port 8000 exposed und es wird ein   06:21
Verzeichnis, also ein Volume 'yacht' erstellt.  Üblicherweise möchten wir die Volumes lieber   06:27
als Bind-Mount in dem Verzeichnis, in dem wir  uns befinden, einrichten. Ich würde jetzt hier   06:33
also eingeben './yacht'. Also in dem Verzeichnis  soll er dieses Verzeichnis 'yacht' anlegen und das   06:38
soll dann aber auch 'yacht-config' heißen, denn  ihr seht in dem Container heißt das Verzeichnis   06:45
'config'. Dann kann ich mir hier unten diesen  Bereich für die 'volumes' einfach sparen und   06:51
würde das dann mal hier mit 'Ctrl+O', Enter und  'Ctrl+X' einfach mal abspeichern. Jetzt könnte   06:56
ich mit 'docker-compose', hier unter Debian  Stable heißt das immer noch 'docker-compose',   07:04
bei Docker von Docker Hub verwendest du 'docker  compose'. Und ich gebe jetzt mal 'docker-compose   07:10
up' ein und er würde jetzt im Hintergrund  dieses Image bereits pullen. Also er bezieht   07:16
jetzt diese Version von Yacht von dem Repository,  was hier jetzt angegeben ist. Das ist jetzt nicht   07:22
Docker Hub, sondern 'selfhostedpro/yacht' und  da, von dieser Container-Registry heißt das,   07:28
pulled er jetzt dieses Image und startet das  dann nachher. Und wenn ihr das gemacht habt,   07:34
dann könnt ihr hier mal auch auf diesen 'Getting  Started' Bereich gehen. Und ihr seht dann hier,   07:39
nachher kann man dann über localhost:8000 also  den Port 8000 direkt auf diese Lösung zugreifen.   07:45
Das probieren wir gleich mal aus, sobald das Ganze  gestartet ist. Hier ist im Hintergrund jetzt schon   07:53
einiges passiert, schauen wir mal, ob er schon so  weit ist. ich gebe jetzt mal http://localhost:8000 08:00
ein und hier startet jetzt tatsächlich schon  etwas, nämlich das Login von Yacht. Hier gibt   08:11
es standardmäßig einen User admin@yacht.local  mit dem Passwort 'pass'. admin@yacht.local und   08:19
das Passwort 'pass' und das ist Yacht. Und hier  seht ihr auch schon, das ist unser Container,   08:26
nämlich der Yacht-Container. Den könnte ich  mir jetzt z.B. hier in einem anderen Terminal   08:32
auch mit 'docker ps' anzeigen lassen. Und da sehe  ich, hier ist mein Container yacht mit dem Port   08:37
8000 bereits in Betrieb. Hier könnte ich jetzt  Applikationen einfach installieren. Und zwar   08:43
könnte ich das z.B. über diese sogenannten  Templates machen. Templates sind so Vorlagen,   08:50
die gibt es z.B. auch unter Portainer und Yacht  kann auch mit diesen Portainer-Templates umgehen.   08:55
Das heißt, die sind kompatibel. Dazu  müsste ich das jetzt erstmal hinzufügen,   09:02
diese Templates und er schlägt mir hier  auch eins vor. Nämlich diese URL für die   09:05
Yacht-Templates. Und die nehme ich jetzt mal hier,  paste die hier rein und gebe mal Yacht-Templates   09:11
ein. Jetzt wird diese Template-Registry  hier sozusagen angelegt. Diese Templates,   09:18
das ist einfach ein JSON-File kann man sich auch  mal angucken. Die sind eigentlich so ähnlich wie   09:24
so eine Docker Compose Datei. Da wird einfach  beschrieben, wie so eine App aufgebaut ist   09:29
und damit kann die Software dann arbeiten und  kann dann aus diesen Templates sozusagen dann   09:34
Applikationen installieren. Also ich könnte  jetzt hier auf 'Templates / Yacht-Templates'   09:40
klicken und dann wird mir der Inhalt von diesem  Template-Katalog hier angezeigt und ich könnte   09:44
jetzt z.B. einfach mal eine App suchen. Nämlich  z.B. den Nginx Proxy Manager, den haben wir,   09:50
vielleicht hast du das Video zu ownCloud schon  gesehen, den haben wir dort schon verwendet,   09:55
einfach selbst aufgesetzt. Ich suche jetzt mal  nach Nginx und da sehe ich schon den Nginx Proxy   10:00
Manager. Ich kann hier auf Deploy klicken und  dann öffnet sich der Assistent. Der geht hier   10:06
diese vier Schritte durch und die muss ich jetzt  hier einfach mal angeben. Also hier startet der   10:12
Container also 'unless-stopped', das ist die  Restart-Policy. Hier sind die Ports, hier ist   10:17
der Port auf dem Host, der Port im Container,  hier der Port für die Verwaltungs-Oberfläche,   10:23
das ist 81. Das kennt ihr bereits, wenn ihr das  Video gesehen habt. Und hier ist der Port 443.   10:29
80 und 443 muss natürlich für den Proxy erreichbar  sein, denn über den Proxy möchten wir nachher   10:35
den Zugriff aus dem Internet steuern, damit alle  unsere Lösungen auch über das Internet erreichbar   10:39
sind. Natürlich nur die, die wir über den Proxy  erreichbar machen möchten. Und dann seht ihr hier,   10:45
da gibt es z.B. dieses Pling also '!config'  Pling Config NginxProxyManager. Ich breche das   10:51
hier trotzdem noch mal ab und gehe noch mal in  die Settings, denn dann seht ihr genau, was ich   10:59
meine. Und dann versteht ihr das auch ganz genau,  warum ich vorhin den ganzen die ganze Installation   11:03
im Verzeichnis '/yacht' angegeben habe. Denn  hier werden diese Variablen, da gibt's ganz 11:09
verschiedene !config, !data !media  durch ein Replacement ersetzt,   11:14
nämlich einen Pfad '/yacht/AppData/Config'. Also  er legt dann im Verzeichnis 'AppData/Config' für   11:21
die einzelnen Apps auch dann die entsprechenden  Datenverzeichnisse an. Und das ist wirklich sehr,   11:28
sehr sinnvoll, denn dann könnt ihr nachher nur  dieses Verzeichnis '/yacht' weg sichern und da   11:33
habt ihr wirklich dann alles drin inklusive der  Apps, die ihr installiert habt. Also, wir gehen   11:37
noch mal rein. Wir gehen in die Templates, ich  sage wieder die Template-Gruppe Yacht-Templates,   11:42
die ich selber angelegt habe, wähle hier  wieder Nginx, den Nginx Proxy Manager,   11:46
nicht zu verwechseln mit dem Nginx dem Webserver  und sage jetzt hier 'Continue', dann noch mal   11:52
die Ports, die haben vorhin schon mal gesehen. Da  können wir nachher auch noch Änderung vornehmen,   11:58
dann hier der ersetzbare Pfad mit der Variable  und dort legt er dann noch ein Unterverzeichnis   12:02
NginxProxyManager an und das Ganze wird gemappt  auf den Container auf das Verzeichnis '/config'.   12:08
Jetzt gibt es hier noch Environments. Da kann  man noch Environment-Variablen festlegen. Das   12:14
müssen wir jetzt in dem Fall hier nicht machen.  Ich sage jetzt einfach mal Deploy und hier wird   12:19
im Hintergrund jetzt diese App anhand dieses  Template-Kataloges bereits für dich installiert   12:23
und komplett eingerichtet, so wie wir es  kennen, wenn wir jetzt z.B. den Nginx Proxy   12:29
Manager einfach von der Webseite mit Docker  Compose direkt installieren. Wir schauen jetzt   12:34
dann nachher mal hier im Dashboard nach, wie  das Ganze dann aussieht. Also hier sehen wir   12:40
jetzt schon die Apps, da ist alles aufgeführt  mit den Ports. Das, das ist der Nginx Proxy   12:45
Manager und jetzt könnte ich hier z.B. mal  auf das Verwaltungs-Frontend gehen nämlich die 12:50
WebUI und hier öffnet sich jetzt  schon die altbekannte WebUI mit   12:54
dem Nginx Proxy Manager. Standard-Login ist 13:02
admin@example.com und das Passwort 'changeme'.  Und dann sollte ich mich hier bereits anmelden   13:07
können. Hier wird er mich jetzt wieder fragen,  was ist denn meine richtige E-Mail-Adresse, also 13:14
astronaut@spacefun.ch und jetzt kann ich hier  natürlich dann auch noch mal das alte Passwort   13:19
eingeben und ein neues. Und somit ist der Nginx  Proxy Manager, das Herzstück für unser Selfhosting   13:30
bereits installiert und du kannst jetzt in deinem  Router einfach das Port-Forwarding auf Port 80 und   13:40
443 einrichten und dann wird das direkt auf den  Nginx Proxy Manager weitergeleitet. Die Auflösung   13:45
oder das Routing auf deine App erfolgt dann über  den Namen deiner Applikation. Und zwar kannst du   13:51
ja, ich habe bei mir DynDNS eingerichtet, meine  DynDNS-Adresse heißt tuxwiz.mooo.com. Die habe   13:58
ich bei freedns.afraid.org registriert. Das ist  sogar kostenlos und ihr könntet natürlich mehrere   14:06
Adressen dort angeben oder könnt bei freedns,  also freedns.afraid.org auch noch eine Wildcard,   14:12
sogenannte Wildcard-Domain einrichten. Das habe  ich auch schon mal erklärt und dann könntet ihr   14:21
z.B. einfach irgendwas, meineapp.tuxwiz.mooo.com  einrichten. Und meine zweite App und diese Namen   14:25
werden dann weitergeleitet auf die entsprechenden  Apps. Und da gibt es natürlich ganz, ganz viele,   14:32
also es gibt da z.B. wir können jetzt  mal eine App installieren über Docker   14:38
Compose. Wir könnten jetzt irgendeine App  installieren, z.B. so einen Bookmark Manager, 14:48
da bin ich kürzlich drüber gestolpert. Der  ist jetzt eigentlich noch praktisch. Readeck,   15:00
genau Readeck heißt das ganze Ding. Readeck,  Docker Compose und damit kann man dann selber   15:04
Bookmarks managen. Das ist so ähnlich wie  jetzt z.B. hier im Firefox das Pocket-Ding,   15:14
das kennt ihr vielleicht. Und ich gehe jetzt  hier mal drauf auf diese Readeck-Homepage. Also,   15:20
das ist jetzt das Git-Repository. Hier klicke  ich jetzt mal auf Install und schaue da mal,   15:25
ob hier denn so ein Docker Compose File irgendwo  rumfliegt. Also am besten arbeitet ihr wirklich   15:30
mit diesen Docker Compose Files, denn die sind  wirklich wirklich mächtig und damit können wir   15:35
das System dann wirklich sehr einfach aufsetzen.  Das ist wirklich am besten. Hier gibt es auch noch   15:41
eine Homepage readeck.org, vielleicht finde ich  dort in den Docs hier noch etwas. Deployment,   15:47
Compose Files, das klingt doch schon mal ganz gut.  Also hier gibt's jetzt z.B. so ein Compose File   15:54
und das könnten wir jetzt einfach mal kopieren.  Und damit können wir mal anfangen zu arbeiten,   16:00
und so könnt ihr euch eure Systeme halt nach und  nach einfach aufbauen. Ich kopiere mir das jetzt   16:04
mal. Denn in Yacht kann ich hier nämlich  auch einfach mit Compse Files arbeiten,   16:09
das ist wirklich das super geniale. Ich gehe jetzt  hier in Projects, sage jetzt hier neues Project,   16:14
nenne das jetzt z.B. hier Readeck und paste da  jetzt einfach den Inhalt von meinem Compose File   16:20
rein und die Sache ist schon erledigt.  Hier sagt jetzt das Image läuft auf Port   16:28
8000. Ich muss natürlich vorher schauen, dass  der Port jetzt nicht schon irgendwo im Einsatz   16:32
ist. Und zwar haben wir ja hier, wie ihr wisst,  auch schon unsere Lösung, nämlich die Yacht auf   16:36
dem Port 8000 laufen. Das wird sich also in die  Quere kommen. Hier müsste ich jetzt einfach einen   16:42
anderen Port eingeben. Ich sage jetzt hier auf  meinem Host, das ist der Port auf meinem Host,   16:47
wird das Port 8001, der wird noch nicht  verwendet. Das kann ich auch noch mal prüfen 16:53
'sudo netstat   16:57
-antp' dann könnte ich '| grep' angeben 8001, muss  mein Passwort eingeben und da finde ich nichts.   17:00
8000 hingegen wird natürlich hier schon verwendet.  Also 8000 im Container. Den Port darf natürlich   17:11
nicht ändern, der ist weiterhin gleich. Dann kann  ich hier noch sagen, von wo es erreichbar ist,   17:17
der Serverport. Das ist jetzt halt der Port in der  Applikation, und hier müsste ich jetzt noch die   17:22
READECK_ALLOWED_HOSTS eingeben. Ich gebe  jetzt hier mal meine DynDNS-Adresse ein, also 17:29
tuxwiz.mooo.com und jetzt könnte ich hier auch  noch die Volumes halt einrichten. Und so würde   17:32
er natürlich ein ganz normales Docker Volume  erstellen und wenn wir das jetzt aber möchten,   17:43
dass er das auch da erstellt, wo jetzt hier die  Yacht liegt, nämlich in '/yacht' müssen wir das   17:47
natürlich entsprechend anpassen. Also da könnten  wir jetzt z.B. angeben, hier auf meinem Host ist   17:53
das '/yacht' und dann könntest du z.B. einfach  hier direkt in das '/yacht/AppData' reinschreiben.   17:59
Oder du gehst jetzt hier noch in 'AppData', das  hat er ja auch noch angelegt 'AppData/Config'.   18:06
Das ist eigentlich das Verzeichnis, wo er seine  Konfigurationen einrichten will. Also können wir   18:11
das auch noch entsprechend mit angeben. Ich  kopiere das mal also '/yacht/AppData/Config'   18:17
und dann nennen wir das mal 'readeck' wird  gemapped auf das Verzeichnis '/readeck'   18:26
im Container. 'unless-stopped' ist richtig,  'test' das ist alles richtig. Das 'volumes:'   18:32
kann dann weg. Damit habe ich jetzt so ein Docker  Compose File hier schon vorbereitet. Du siehst,   18:37
du musst natürlich ein bisschen drüber gehen,  das ist klar. Du musst es an deine Bedürfnisse   18:44
anpassen. Aber es ist wirklich sehr einfach zu  verstehen und jetzt hat er hier dieses Projekt,   18:49
heißt das für ihn, angelegt und da könnte ich  jetzt hier einfach mal 'docker compose up' machen   18:54
und das würde er jetzt hier im Hintergrund einfach  mal versuchen und wenn das klappt, dann sollte   18:59
nachher diese App auch tatsächlich gestartet  werden. Das hängt natürlich davon ab, 'App   19:04
started', ob alles richtig konfiguriert ist. Falls  nicht, dann müssen wir das hier noch entsprechend   19:09
anpassen. Jetzt können wir schon mal schauen, ob  hier vielleicht auf dem Port schon etwas läuft,   19:14
also 8001. Ja, da läuft jetzt schon was. Also wir  könnten jetzt in unserem Proxy hier schon einen   19:18
neuen Host einrichten. Also Dashboard / Proxy  Hosts / Add Proxy Host und ich gebe jetzt an 19:26
tuxwiz.mooo.com und dort könntest du natürlich  auch deine ganzen Subdomains oder anderen DynDNS   19:31
Domains oder normale Domains angeben. Das ist ganz  einfach. Das wird jetzt hier meines Wissens nach   19:41
über HTTP aufgerufen, das können wir mal schauen.  Und da musst du jetzt die IP-Adresse von deiner   19:46
Virtuellen Maschine angeben, also 'hostname -I'  und dann ist das hier die erste IP. Das ist die   19:53
IP-Adresse, die du auch im Forwarding in deinem  Router angegeben hast und hier gebe ich jetzt den   20:00
Port 8001 ein. Und jetzt sagen wir hier 'Publicly  Accessible'. Ich sage mal 'Save' und schaue mal,   20:05
ob er hier schon irgendwas macht. Ich könnte  jetzt hier noch mal auf 'Edit' gehen und sage   20:11
jetzt bei SSL 'Request SSL Certificate' / 'Force  SSL', 'Agree' und kann dann auch noch das ganze   20:16
über HTTPS erreichbar machen. Voraussetzung  ist natürlich, dass du Port 80 und 443 in   20:22
deinem Router forwardest. Das habe  ich in vielen Videos schon erklärt,   20:27
schau dir die einfach noch mal an und natürlich,  dass du die entsprechende DynDNS-Adresse   20:32
konfiguriert hast. Jetzt schauen wir mal, ob es  da schon irgendwas gibt, auf diesem Readeck. Ja,   20:37
da kann ich jetzt schon was machen. Willkommen und  hier kann ich jetzt einen Benutzernamen angeben 20:41
Astronaut, Passwort und dann kann ich meine  E-Mail-Adresse angeben. astronaut@spacefun.ch und   20:46
ich sage jetzt hier 'Installation beenden' und du  siehst, ich habe jetzt hier so einfach schon meine   21:00
Yacht am Laufen mit dem kompletten Management  ich kann meine Container darüber verwalten,   21:06
ich kann mit Templates arbeiten und ich kann  aber auch wie gewohnt mit diesen Docker Compose   21:11
Dateien schaffen und habe so ein super schnell ein  verwaltbares System für mich eingerichtet. Diese   21:16
Weboberfläche von Yacht, die mache ich natürlich  entweder nur von localhost oder in meinem lokalen   21:23
Netz erreichbar. Ich möchte nicht unbedingt,  dass die im Internet hängt. Das musst du dir   21:28
gut überlegen, ob du das willst. Ich rate davon  ab. Falls du da von extern drauf kommen möchtest,   21:32
dann würde ich dir empfehlen, ein VPN zu  nutzen. Das habe ich auch schon gezeigt,   21:38
mit DockOvpn, mit dem OpenVPN. Und jetzt könntest  du dann hier weiterschauen, wie das funktioniert,   21:42
z.B. mit diesem Lesezeichen-Manager. Ich könnte  jetzt z.B. einfach mal Lesezeichen hinzufügen.   21:48
Ich gehe mal auf Linux und schaue mir hier  mal den Artikel von Ückück an und würde den   21:56
z.B. mal hier einfach reinpasten und sage 'Links  speichern'. Und hier habe ich nachher für später   22:02
zum Nachlesen mir jetzt halt dieses Lesezeichen  abgespeichert und kann da immer wieder drauf   22:09
zugreifen und mir die auch sortieren, hier  mit Tags und vieles mehr. Ich bin gespannt,   22:14
wenn du es ausprobierst, wie weit du kommst,  wo du hängen bleibst. Falls du Hilfe brauchst,   22:21
komm unbedingt bei uns in die Community rein.  Die findest du auf spacefun.ch und dort kannst   22:26
du hier auf den Punkt Commmunity klicken und dort  entweder diesen QR-Code scannen oder einfach hier   22:32
auf den Punkt Telegram. Wir sind auch über  XMPP erreichbar, falls dir das lieber ist.   22:37
Ich freue mich auf jeden Fall über dein Feedback  und wünsche dir viel Spaß beim Ausprobieren dieser   22:43
tollen Lösung und freue mich auf deinen Besuch  bei uns in der Community. Tschüss und bis bald. 22:49
In my videos, I've already 00:00
presented a variety of self-hosting solutions. We generally use Docker for this because it's very, very suitable and 00:05
also portable. We've usually 00:12
installed a solution on a VM with Docker and Docker Compose. However, if you want to run multiple solutions on one server 00:19
, a Docker GUI is suitable, and I'd like 00:25
to introduce it to you today. It's called Yacht. You may have heard of management GUIs like 00:33
Portainer. Today I'm introducing Yacht. Yacht is even more lightweight and super easy 00:39
to use. I'll show you exactly how it works in this video. To do so, 00:46
simply go to the website yacht.sh, and we can get started right away. As 00:52
usual, we'll also use Docker to install Yacht itself. This means we 00:59
first need to install Docker. I'm using my Linux distribution here, which is called TuxWiz. 01:04
You can find it on my website spacefun.ch, and you can easily 01:10
download it here in the TuxWiz section. TuxWiz is ideal because it's a lightweight Linux variant 01:17
that can also be used as a server. TuxWiz is based on Debian. This is the 01:25
Debian Stable version, so you're definitely on the safe side. I 01:30
'll now open a terminal and, as usual, install Docker 01:37
and Docker Compose. I'll do this from the official Debian repositories 01:41
, entering the commands 'sudo apt install docker.io' and 'docker-compose'. 01:46
I'll enter my password here, and Docker will be installed in the background. 01:55
Next, I need to add my user to the Docker group so that 02:01
I can use Docker myself. We've usually 02:06
always installed our software in the user's home directory. This is also very suitable 02:12
if you're running a single solution. Today, however, we want to do things a little differently and 02:17
install the whole thing system-wide and make it accessible to other users. This means 02:23
we use a special group for this, and under Linux there is usually a group 02:29
called 'users'. Debian still has this group, but by default there are no users 02:33
in it anymore. I can check this with 'getent group users', and this group has the so-called 02:39
user ID (UID) 100, which we can see very clearly here. So, I'll now add my user 02:49
to the 'docker' group with 'sudo usermod -a -G docker tux'. Docker has already 02:55
been installed. I'll also add my user to the 'users' group, 03:05
because afterward, everyone in this 'users' group can 03:10
use this Docker solution on your Linux system. You then simply have to 03:14
add the user to this 'users' group. I've done that now. Here, of course, I first have to specify the group 'users' 03:19
and then the username. Now I have to log out and log back in 03:26
for these changes to take effect, and then I can start installing 03:31
Yacht. So I'll open my terminal again, open the yacht.sh website again 03:38
, and then click on 'Get Started'. There's an area in the left 03:44
menu called 'Install Yacht,' and, as mentioned, we want to install the whole thing with Docker, 03:50
including Docker Compose, since we want to do this system-wide. To do this, I'll 03:55
simply create a new folder '/yacht' directly at the root level. 04:02
I'll enter the command 'sudo mkdir /yacht.' This has the advantage that this folder 04:08
will also be used by default for templates in this solution. I can 04:18
show you that later. That's why it makes sense to use this '/yacht' folder for this solution for Yacht 04:23
. The '/' is always the root directory, the exit 04:27
from which all other directories branch off. I can show you this again with 'ls -al /' 04:33
, and there you'll now see the 'yacht' folder. Of course, I don't have any permissions there yet. 04:41
on it. I still have to adjust that too. So, 'sudo chown', I'll do that with 'tux' and then 04:45
my group ':users' and then '/yacht'. And then I'll type 'sudo chmod'. 04:51
You've probably already seen my great video about Linux permissions. If not, be 04:59
sure to watch it. I'll explain to you exactly how it works with this octal system and 05:05
how the permissions are structured here. I'll type '775' here, then the user and 05:11
the group have full permissions and then the folder. Of course, I have to do that with 'sudo' again, 05:17
because these commands on the system – which is a system folder directly in the root directory – 05:24
can only be executed as root. I've done that now. Now I'll take another look 05:30
with 'ls -ald'. I can then specify the directory '/yacht' directly. This 05:34
specifies the directory itself, not the directory contents. If I just did 'ls -al' 05:40
it would show me the directory contents and I wouldn't 05:46
see the directory at all. So 'ls -ald' shows me the permissions of the directory. They are now correct, the 05:50
permissions are correct here. I now go into this directory as the user 'cd /yacht' and can then 05:58
simply create this 'docker-compose.yml' file there, for example 'nano docker-compose.yml'. 06:04
To do this, I will copy the contents of this example Docker Compose and 06:14
simply paste it here. Here you can see that port 8000 is exposed and a directory, i.e. a volume 'yacht', is 06:21
created. Usually we want to set up the volumes 06:27
as a bind mount in the directory we are in. So I would enter './yacht' here 06:33
. So, in this directory, it should create this directory 'yacht', which 06:38
should then also be called 'yacht-config', because you can see the directory in the container is called 06:45
'config'. Then I can simply save this area for the 'volumes' 06:51
here with 'Ctrl+O', Enter, and 'Ctrl+X'. Now 06:56
I could use 'docker-compose'. Here in Debian Stable, it's still called 'docker-compose'; 07:04
with Docker from Docker Hub, you use 'docker compose'. And now I type 'docker-compose 07:10
up', and it would pull this image in the background. So, it 07:16
now gets this version of Yacht from the repository specified here. This isn't 07:22
Docker Hub, but 'selfhostedpro/yacht', and from there, from this container registry, 07:28
it pulls this image and then starts it. Once you've done that, 07:34
you can go to the 'Getting Started' section. You'll see that 07:39
you can then access this solution directly via localhost:8000, i.e., port 8000. 07:45
We'll try that out as soon as the whole thing is up and running. A lot has already 07:53
happened in the background; let's see if it's ready. I'll now type in http://localhost:8000 08:00
, and something will actually start up here: the Yacht login. 08:11
By default, there's a user called admin@yacht.local with the password 'pass', admin@yacht.local, and 08:19
the password 'pass', and that's Yacht. And here you can see our container, 08:26
the Yacht container. I could display it in another terminal, for example 08:32
, using 'docker ps'. And there I can see that my container, yacht, is already running 08:37
with port 8000. I could now easily install applications here. I could do this, for example, 08:43
using these so-called templates. Templates are templates 08:50
that are also available in Portainer, for example, and Yacht can also handle these Portainer templates. 08:55
That means they're compatible. To do this, I'd first have to add 09:02
these templates, and it suggests one to me. Namely, this URL for the 09:05
Yacht templates. And I'll take it here, paste it in, and enter "Yacht-Templates 09:11
." Now this template registry is created, so to speak. These templates, 09:18
It's simply a JSON file, you can take a look at it. They're actually similar to 09:24
a Docker Compose file. It simply describes how an app is structured, 09:29
and the software can then work with it, and can then 09:34
install applications from these templates, so to speak. I could now click on 'Templates / Yacht Templates' 09:40
and then the contents of this template catalog will be displayed, and I could 09:44
now simply search for an app. For example, the Nginx Proxy Manager, which we set up ourselves - 09:50
you may have already seen the video on ownCloud - we used it there 09:55
. I'll now search for Nginx, and I can see the Nginx Proxy 10:00
Manager. I can click on Deploy here, and then the wizard opens. It goes 10:06
through these four steps, which I simply have to specify here. So here the 10:12
container starts 'unstopped'; that's the restart policy. Here are the ports: this is 10:17
the port on the host, the port in the container, and this is the port for the administration interface, 10:23
which is 81. You'll already know that if you've seen the video. And this is port 443. 10:29
80 and 443 must, of course, be accessible to the proxy, because we want to use the proxy 10:35
to control access from the internet later, so that all of our solutions can also be reached via the internet 10:39
. Of course, only the ones we want to make accessible via the proxy. And then you can see here, 10:45
there's this ping: '!config' Pling Config NginxProxyManager. I'm going to 10:51
stop here anyway and go back to the settings, because then you'll see exactly what I 10:59
mean. And then you'll understand exactly why I 11:03
specified the entire installation in the '/yacht' directory earlier. Because here these variables – there are many 11:09
different ones like !config, !data, !media – are replaced by a replacement, 11:14
namely a path '/yacht/AppData/Config'. So it then creates 11:21
the corresponding data directories for the individual apps in the 'AppData/Config' directory. And that's really very, 11:28
very useful, because then you can later just back up this '/yacht' directory and 11:33
you'll have everything in there, including the apps you've installed. So, let's go 11:37
back in. We go to the templates. I'll say the template group Yacht Templates, 11:42
which I created myself. Here I select Nginx, the Nginx Proxy Manager ( 11:46
not to be confused with Nginx, the web server). Now say 'Continue' here. Then the ports again 11:52
, which we saw earlier. We can make changes 11:58
there later, then the replaceable path with the variable and then it creates a subdirectory 12:02
NginxProxyManager there and the whole thing is mapped to the container in the '/config' directory. 12:08
Now there are Environments here. You can also specify environment variables 12:14
there. We don't need to do that in this case. I'll just say Deploy and 12:19
in the background this app will be installed and completely set up for you using this template catalog 12:23
, just as we know it if we now 12:29
install the Nginx Proxy Manager directly from the website with Docker Compose. We'll take a look 12:34
at the dashboard later to see what it all looks like. We can 12:40
already see the apps here, everything is listed there with the ports. This, that is the Nginx Proxy 12:45
Manager and now I could, for example, go to the administration frontend, namely the 12:50
WebUI and the familiar WebUI with the Nginx Proxy Manager will open here 12:54
. The default login is 13:02
admin@example.com and the password 'changeme'. Then I should be 13:07
able to log in here. It will now ask me again what my correct email address is, so 13:14
astronaut@spacefun.ch. Now, of course, I can enter the old password 13:19
and a new one. With that, the Nginx Proxy Manager, the heart of our self-hosting, is 13:30
already installed, and you can now simply configure port forwarding on your router to port 80 and 13:40
443 and then it will be forwarded directly to the Nginx Proxy Manager. The resolution 13:45
or routing to your app is then done via the name of your application. 13:51
I have set up DynDNS for myself; my DynDNS address is tuxwiz.mooo.com. 13:58
I registered it at freedns.afraid.org. It's free, and you can, of course, 14:06
enter multiple addresses there, or you can set up a wildcard, a so-called wildcard domain, at freedns.afraid.org 14:12
. I've already explained that, and then you could 14:21
simply set up something like meineapp.tuxwiz.mooo.com. And my second app and these names 14:25
will then be forwarded to the corresponding apps. And of course there are lots and lots of 14:32
them. For example, we can now install an app via Docker 14:38
Compose. We could install any app, like a bookmark manager, 14:48
I stumbled across that recently. That's actually quite useful. Readeck, 15:00
that's right, the whole thing is called Readeck. Readeck, Docker Compose, and with it you can 15:04
manage your own bookmarks. It's similar to the Pocket thing in Firefox, for example, 15:14
which you might be familiar with. And now I'm going to go to the Readeck homepage. 15:20
This is the Git repository. I'm going to click on Install and see 15:25
if there's a Docker Compose file lying around somewhere. It's best to work 15:30
with these Docker Compose files, because they're really, really powerful and they make 15:35
setting up the system really easy. That's really the best thing. There's also 15:41
a homepage here, readeck.org; perhaps I'll find something in the docs there. Deployment, 15:47
Compose Files, that sounds pretty good. So here, for example, there's a Compose file, 15:54
and we could just copy that. We can start working with that, 16:00
and you can build up your systems little by little. I'll just copy that 16:04
over now. Because in Yacht I can also work with Compose files, 16:09
which is really brilliant. I'll go to Projects, say new project here, 16:14
call it Readeck, for example, and simply paste in the contents of my Compose file 16:20
, and I'm done. Here I say the image is running on port 16:28
8000. Of course I have to check beforehand that the port isn't already in use somewhere 16:32
. As you know, we already have our solution here, with Yacht 16:36
running on port 8000. So that will get in the way. I would simply have to 16:42
enter a different port here. If I say on my host here, which is the port on my host, 16:47
it will be port 8001, which isn't in use yet. I can also check again with 16:53
'sudo netstat 16:57
-antp', then I could '| grep' 8001, I have to enter my password, and I can't find anything. 17:00
8000, on the other hand, is of course already in use here. So 8000 in the container. Of course, the port must 17:11
not be changed; it remains the same. Then I can specify where it is accessible from, 17:17
the server port. This is the port in the application, and here I would also need 17:22
to enter READECK_ALLOWED_HOSTS. I'll enter my DynDNS address here, so 17:29
tuxwiz.mooo.com, and now I can also set up the volumes here. And so 17:32
it would, of course, create a completely normal Docker volume, and if we want it 17:43
to create it where the yacht is now, namely in '/yacht', we would 17:47
of course have to adjust it accordingly. So we could now specify, for example, that on my host 17:53
this is '/yacht', and then you could simply write directly into '/yacht/AppData'. 17:59
Or you can go to 'AppData' here, which it also created, 'AppData/Config'. 18:06
That's actually the directory where it wants to set up its configurations. So we can 18:11
also specify that accordingly. I'll copy this to '/yacht/AppData/Config' 18:17
and then we'll call it 'readeck', which will be mapped to the directory '/readeck'. 18:26
in the container. 'unless-stopped' is correct, 'test' is all correct. The 'volumes:' 18:32
can then be removed. With that, I've now prepared a Docker Compose file here. As you can see, 18:37
you'll have to go over it a bit, of course. You'll have to 18:44
adapt it to your needs. But it's really very easy to understand, and now he's 18:49
created this project, which is what it's called for him, and I could simply do 'docker compose up' here, 18:54
and he would then simply try it in the background, and if that works, then 18:59
this app should actually start afterwards. Of course, that depends on 19:04
whether everything is configured correctly ('App started'). If not, then we have to adjust it accordingly 19:09
. Now we can check whether something is already running on port 19:14
8001. Yes, something is already running. So we could now 19:18
set up a new host in our proxy here. So Dashboard / Proxy Hosts / Add Proxy Host and I'll now enter 19:26
tuxwiz.mooo.com, and there you could of course also 19:31
enter all your subdomains or other DynDNS domains or normal domains. It's quite simple. As far as I know, this is 19:41
accessed via HTTP, so we can take a look at that. And then you have to enter the IP address of your 19:46
virtual machine, so 'hostname -I', and then this is the first IP. This is the 19:53
IP address you also specified for forwarding in your router, and here I'll 20:00
enter port 8001. And now we'll say 'Publicly Accessible'. I'll say 'Save' and see 20:05
if it does anything here. I could now go to 'Edit' again and say 20:11
'Request SSL Certificate' / 'Force SSL', 'Agree' for SSL, and then I can also 20:16
make the whole thing accessible via HTTPS. The prerequisite, of course, is that you forward ports 80 and 443 in 20:22
your router. I've explained this in many videos, 20:27
so just watch them again, and of course, that you 20:32
've configured the corresponding DynDNS address. Now let's see if there's anything there already on this Readeck. Yes, 20:37
I can do something about that now. Welcome, and here I can enter a username 20:41
(Astronaut), password, and then I can enter my email address (astronaut@spacefun.ch). 20:46
I then say 'Finish installation' here. You can see that I now have my 21:00
Yacht up and running with complete management. I can manage my containers through it, 21:06
I can work with templates, and I can also 21:11
create these Docker Compose files as usual, thus setting up a manageable system for myself super quickly. 21:16
I make this Yacht web interface accessible either only from localhost or within my local 21:23
network. I don't necessarily want it to be connected to the internet. You have to 21:28
think carefully about whether that's what you want. I advise against it. If you want to access it externally, 21:32
I would recommend using a VPN. I've already shown you how, 21:38
with DockOvpn, with OpenVPN. And now you could continue to see how it works, 21:42
for example with this bookmark manager. I could, for example, simply add bookmarks. 21:48
I'll go to Linux and take a look at Ückück's article and 21:56
then simply paste it here and say 'Save links'. And here I have 22:02
saved this bookmark for later reference, and I can always 22:09
access it and sort it with tags and much more. I'm excited to see 22:14
how far you get when you try it out and where you get stuck. If you need help, 22:21
be sure to join our community. You can find it at spacefun.ch. There 22:26
you can click on the Community option and either scan this QR code or simply click 22:32
on Telegram. We are also reachable via XMPP, if you prefer. 22:37
I'm definitely looking forward to your feedback and hope you have fun trying out this 22:43
great solution. I look forward to your visit to our community. Bye and see you soon. 22:49

In diesem Video zeige ich dir, wie du mit Yacht eine leistungsstarke und benutzerfreundliche Management-Oberfläche für deine Docker-Container einrichtest. Egal, ob du ein erfahrener Anwenderoder ein Neuling in der Welt von Docker bist – mit Yacht wird das Verwalten deiner Container zum Kinderspiel!

Du erfährst dabei, welche Funktionen und Vorteile Yacht als Management-Tool für Docker bietet und wie du es Schritt für Schritt auf deinem Server installierst und einrichtest. Außerdem erfährst du, wie du alle deine Docker-Container zentral verwaltest, um stets den Überblick zu behalten und deine Effizienz zu steigern. Ich zeige dir auch, wie du Portainer-kompatible Templates verwenden kannst, um neue Anwendungen schnell und einfach einzurichten.

Darüber hinaus lernst du die integrierte Docker-Compose-Funktion kennen und wie du mit Compose-Dateien dein individuelles Setup erstellst. Zum Schluss erhältst du noch einige bewährte Tipps und Tricks, um Yacht optimal für dein Docker-Management zu nutzen.

Richte dir noch heute deinen Docker-Management-Server ein und bringe deine Container-Verwaltung auf das nächste Level. Mit Yacht hast du die volle Kontrolle über deine Docker-Umgebung.

Navigation

Video Player