Skip to main content
Hyper 8 Spacefun Videos

ownCloud - dein eigener Cloudserver

Hallo liebe Weltraumschmuggler. In diesem  Video möchte ich euch die Lösung ownCloud   00:00
genauer vorstellen. Wir haben uns ja gemeinsam  bereits Nextcloud, SeaFile, FileBrowser,   00:05
CryptPad und einiges mehr angeschaut. Bei ownCloud  handelt es sich ähnlich wie bei Nextcloud um eine   00:13
Datei-Synchronisationslösung, die einen Serverteil  und einen Client-Teil benötigt. Den Serverteil,   00:20
den möchten wir gerne im Selfhosting in bei uns zu  Hause betreiben und wie das genau geht, das möchte   00:28
ich euch heute erklären. Doch vorab möchte ich  euch ein kleines Projekt vorstellen, an dem wir in   00:34
den letzten Wochen und Monaten fleißig gearbeitet  haben, und zwar ist das die FOSSWELT. Die findet   00:40
ihr auf fosswelt.org und bei der FOSSWELT handelt  es sich um eine Webseite, auf der wir versuchen   00:47
alle wichtigen deutschsprachigen Open Source und  Linux Projekte zusammenzufassen. Hier findest du   00:54
unter anderem gnulinux.ch linuxnews.de aber auch  meine Videos oder FOSS-Heute, den Mikroblog. Und   01:01
wenn du selbst Sachen im Bereich Open Source oder  Linux machst, dann bist du herzlich eingeladen,   01:10
hier auch teilzunehmen und dann führen wir dich  gerne auch auf unserer Webseite mit auf. Zur   01:16
Vorbereitung unserer Installation habe ich hier  wie üblich eine TuxWiz Installation 'TuxWiz Mini'   01:24
in der Stable Variante. Ihr könnt das ganze aber  auch auf jedem anderen Debian-basierten System   01:30
nachbauen. Wie üblich möchte ich das System in  Docker betreiben, und zwar mit Docker Compose,   01:35
um die nötige Flexibilität zu erhalten. Für  das Selfhosting benötigen wir entweder einen   01:41
Cloudflare-Tunnel, wie das geht habe ich euch  bereits einmal erklärt, oder ein entsprechendes   01:48
Port Forwarding im Router. Dazu benötigen wir  außerdem eine DynDNS-Adresse. Meine DynDNS-Adresse   01:54
heißt hier tuxwiz.mooo.com. Meine IP-Adresse  von meinem Server, die kann ich ganz einfach   02:02
herausfinden mit dem Befehl 'ip a s' und hier oben  wird mir diese IP-Adresse auch schon angezeigt.   02:08
Die muss ich dann in meinem Router hier beim  Bereich NAT/Portweiterleitung oder Port Forwarding   02:15
entsprechend eintragen für das Protokoll HTTP und  HTTPS. Das wären Port 80 und Port 443, die ich   02:22
dann weiterleite hier auf diese lokale IP-Adresse,  die ich mir hier oben ausgeben habe lassen. Wenn   02:29
ihr das so weit vorbereitet habt, dann sind wir  eigentlich startklar und wir können schon mit   02:36
der Installation von Docker beginnen. Wie üblich  habe ich euch hier ein Cheat Sheet vorbereitet.   02:40
Das findet ihr nachher dann auch bei uns in der  Telegram-Community. Also kommt bitte unbedingt in   02:46
unsere Telegram-Community, denn dort findet ihr  alle wichtigen Informationen. Dazu geht ihr hier   02:51
auf spacefun.ch klickt auf Telegram und schon seid  ihr mit dabei. Ich installiere mir also als erstes   02:57
Mal Docker aus den Debian-Repositories und Docker  Compose. Dazu gebe ich 'sudo apt install docker.io   03:04
docker-compose' ein und muss da natürlich einmal  mein Passwort eingeben. Wie üblich bei Docker,   03:13
muss dein User in der sogenannten docker-Gruppe  Mitglied sein. Das kannst du mit dem 'usermod'   03:20
Befehl machen. Mein User ist jetzt hier in dem  Fall schon Mitglied dieser Gruppe. Ich zeige dir   03:26
das trotzdem allerdings mal, wie das geht. 'sudo  usermod -a -G', dann 'docker' und dein Username.   03:31
In meinem Fall wäre das hier der User 'tux'. Das  Ganze wird erst wirksam, wenn du dich einmal ab-   03:41
und wieder anmeldest und dann kannst du das  mit dem Befehl 'id' prüfen. Und dann zeigt   03:47
er dir hier unten auch an, dass du Mitglied der  Gruppe 'docker' bist. Wir haben das also so weit   03:51
alles mal vorbereitet und jetzt fangen wir mit  der eigentlichen Installation an. Dazu möchten   03:55
wir als Erstes mal die Installationsanleitung  von ownCloud aufrufen. Die habe ich hier auch   04:01
verlinkt und die schauen wir uns jetzt mal genauer  an. Hier wird als erstes Mal in einem Verzeichnis,   04:06
ich wäre jetzt hier mein Home-Verzeichnis, da  kann ich hereingehen, mit 'cd' 'pwd' /home/tux,   04:14
da bin ich schon drin, ein Ordner erstellt. 'mkdir  owncloud-docker-server', das mache ich jetzt mal   04:19
hier und dann wird hier einfach in diesen Ordner  rein gewechselt. 'cd owncloud-docker-server' und   04:25
dann gibt es hier diese 'docker-compose.yml'  und die lege ich mir jetzt mal an und zwar mit 04:35
'nano docker-compose.yml' und dort hinein kann ich  jetzt hier dieses Beispiel, was hier aufgeführt   04:41
ist, das habe ich euch auch im Cheat Sheet noch  mal verlinkt, einfach mal reinkopieren. Das ist   04:51
hier relativ lang. Ich sage hier kopieren und  kann das jetzt hier reinpasten und hier ist es   04:55
jetzt schon drin. Wir müssen allerdings noch ein  paar Einstellungen ändern. Also er exposed hier   05:04
meine ownCloud standardmäßig über HTTP auf Port  8080. Da müssen wir dann natürlich nachher noch   05:09
einen Proxy davorstellen, sonst funktioniert  das nicht mit dem Zugriff aus dem Internet.   05:15
Hier kann ich jetzt eine ownCloud Domain, die  definiere ich dann nachher, diese Variablen   05:20
kann ich nachher über ein sogenanntes .env File  definieren. Dort gebe ich die dann nachher an. Das   05:24
ist also sehr wichtig. Was ich hier jetzt noch  ändere, sind die Volumes. Und zwar möchte ich,   05:30
dass die Volumes in meinem Verzeichnis direkt  exposed werden und dann gebe ich hier './' davor   05:35
an. Und dann wird in dem Ordner, den ich vorhin  angelegt habe, ein Unterordner 'files' angelegt,   05:41
wo dann die ganzen Daten auch drin liegen. Dann  habe ich alles beieinander und dann liegt das   05:47
nicht irgendwo in Docker Volumes auf dem System  herum. Also hier auch überall, wo 'volumes'   05:51
drinsteht, mache ich ein './' davor. Und dann  habe ich das Ganze auch schon fertig. 'Ctrl+O',   05:56
Enter, 'Ctrl+X', beenden. Jetzt kann ich den  Server noch nicht starten, denn ich muss eben noch   06:02
diese .env Datei erstellen. Dazu ist hier auch ein  Beispiel mit cat und EOF. Das pasted einfach den   06:08
Inhalt zwischen dem EOF hier in eine Datei '.env'  rein. Ich könnte die auch einfach mit Nano öffnen   06:14
und den Inhalt dort reinpasten. Die öffne ich  jetzt auch mal mit Nano, weil darin müssen wir   06:22
jetzt noch einiges bearbeiten. Also nicht so  viel. Wir lassen jetzt das hier drinstehen,   06:26
aber als 'OWNCLOUD_TRUSTED_DOMAINS', da muss ich  dann meine DynDNS Domain einstellen. DynDNS habe   06:33
ich in meinem Router vorher bereits konfiguriert  gehabt. Netzwerkeinstellung, jetzt ist er hier   06:38
abgelaufen, aber da gibt es dann DNS und da  kann ich mir dann DynDNS-Adressen einrichten.   06:43
Das sieht je nach Router bisschen anders aus.  Hier gebe ich also meine DynDNS-Domain ein: 06:48
tuxwiz.mooo.com. Und dann kann ich das ganze auch  schon mit 'Ctrl+O' und 'Ctrl+X' speichern und   06:53
beenden. Jetzt könnte ich diesen Docker Service  auch schon starten. Das können wir auch mal   07:02
schauen hier, 'docker compose up', mit '-d', dann  wird es in den Hintergrund verschoben oder ohne,   07:07
dann bleibt es halt im Vordergrund stehen.  Also hier müssen wir 'docker-compose' machen,   07:13
weil unter Debian heißt das ganze noch  'docker-compose'. Es ist ein separater Befehl.   07:17
Jetzt wird das Image hier schon mal gepulled  und er wird mir jetzt hier im Hintergrund schon   07:23
meine ownCloud Instanz aufsetzen. Also, das geht  natürlich ganz schnell. Da wir allerdings möchten,   07:28
dass das über HTTP und HTTPS aus dem Internet  erreichbar ist, müssen wir natürlich noch einen   07:34
Proxy davorstellen. Und einen Proxy, den  möchte ich gerne auch in Docker betreiben,   07:40
denn das bietet sich natürlich an. Dann haben  wir alles einheitlich in einem Docker-Setup   07:44
und dazu bietet sich der Nginx Proxy Manager  an. Das ist eine ganz tolle Lösung. Ich mag   07:49
die sehr gerne. Und da gibt es hier auch ein  Quick Setup und das können wir einfach mal   07:54
befolgen. Das geht auch wieder mit  so einer 'docker-compose.yml' Datei   07:59
und die können wir hier entsprechend auch  mal anlegen. Dazu mache ich mal hier ein   08:03
neues Fenster auf und gehe wieder in mein Home.  Mit 'mkdir npm' mache ich einen neuen Ordner. 08:06
'cd npm'. Da hatte ich das schon mal  angelegt. Das mache ich erstmal wieder 08:16
weg, sauber. Und jetzt kann ich hier eben  auch wieder so eine docker-compose.yml   08:21
Datei anlegen. Das machen wir jetzt auch  wieder. Nano. Also jedes System hat hier   08:33
eine eigene Docker Compose. Die könnte  man auch entsprechend zusammenführen,   08:39
das müssen wir jetzt aber nicht. Hier sind jetzt  noch die Rechte falsch. Ich mache das erstmal   08:44
neu. So 'mkdir npm', 'cd npm' und jetzt 'nano  docker-compose.yml'. Diese Docker Compose sieht   08:50
schon viel übersichtlicher aus und die ist auch  schon super vorbereitet. Die Paste ich jetzt hier   09:01
mal rein. Da müssen wir jetzt gar nichts ändern.  Er exposed jetzt hier auch die Verzeichnisse   09:05
direkt hier rein. /data und /letsencrypt. Da  sage ich jetzt mal 'Ctrl+O', Enter, 'Ctrl+X',   09:10
Beenden. Damit ist das eigentlich schon fertig und  die können wir jetzt auch schon mal mit 'docker   09:17
compose up -d' starten. Wir haben jetzt also  eine ownCloud Instanz. Also jetzt könnten wir   09:21
die schon mal prüfen, ob die schon läuft  'sudo netstat -antp | grep 8080'. Läuft,   09:29
8080 und da läuft auch schon was. Also das ist  schon mal sehr gut und jetzt installiere ich   09:38
mir hier natürlich noch meinen Proxy davor. Ich  könnte jetzt schon per localhost auf den Port 8080   09:45
zugreifen und würde da sogar schon meine ownCloud  sehen. Wir möchten das ganze allerdings ja aus dem   09:50
Internet erreichbar machen. Wenn du jetzt so einen  Cloudflare-Tunnel nutzt, dann musst du natürlich   09:55
in deiner Tunnelkonfiguration den Traffic auf  Port 8080 auf localhost forwarden. Du kannst   09:59
dir die Einrichtung des Proxys damit sparen,  da der Proxy-Dienst dann auf deinem Tunnel bei   10:06
Cloudflare läuft. Also das ist von der Einrichtung  noch einfacher und da musst du auch kein Port   10:12
Forwarding in deinem Router einrichten. Das ist  natürlich auch eine ganz super Sache und natürlich   10:16
dann noch mal auch sehr sicher. Jetzt läuft jetzt  hier und dann können wir nachher den npm dann über   10:22
die lokale Adresse über den Port 81 konfigurieren.  Ich habe euch das ganze auch hier in der Datei   10:30
noch mal zusammengeschrieben, also hier ist noch  die Docker Compose von ownCloud mit drin und dann   10:37
geht's hier unten weiter mit dem Punkt .env.  Da habe ich euch das noch mal reingeschrieben.   10:42
OWNCLOUD_TRUSTED_DOMAINS, also da ist es. Das  ist falsch. Da muss natürlich MEINE_DOMAIN 10:47
rein und dann hätte ich hier auch noch das  Admin-Passwort ändern können. Also das können   10:55
wir natürlich dann auch noch entsprechend  ändern über https://localhost:8080. Es ist   11:02
jetzt im Moment noch admin:admin. Das solltet ihr  vorher ändern, bevor ihr das Ganze im Internet   11:11
exposed. Da ist jetzt die localhost ownCloud  schon am Laufen. Ich kann hier unter Settings   11:17
natürlich dann noch entsprechende Einstellungen  vornehmen. Ich ändere jetzt hier mal mein Passwort 11:23
'Change Password'. Ah, da muss man  noch das 'Current Password' eingeben. 11:32
'admin' und dann hier an der Stelle  das 'New Password'. Jetzt probieren   11:40
wir das ganze noch mal, ob wir uns  damit auch schon anmelden können 11:50
Und siehe da, ich bin jetzt mit meinem neuen  Passwort auch schon in meiner ownCloud auf   11:55
localhost drin. Also, die läuft jetzt hier  schon lokal auf meinem System. Da bringt   12:00
sie mir natürlich nicht sehr viel, weil ich  möchte sie natürlich aus dem Internet verfügbar   12:04
machen möchte, damit ich von überall meine Dateien  synchronisieren kann. Wir müssen also schauen,   12:08
ob der Proxy jetzt läuft. Der ist hier auch schon  gestartet und jetzt kann ich auch schon mal hier   12:13
darauf zugreifen. Also, wir gucken jetzt mal. Da  gibt es einen Default User 'admin@example.com' und   12:17
ein Passwort 'changeme'. Damit müssen wir uns  jetzt hier am 'localhost:81' mal anmelden. Das   12:23
ist der npm, der hat ein eigenes Webfontend. Da  gebe ich jetzt erst mal admin@example.com ein und   12:30
gebe jetzt hier 'changeme' als Passwort ein  und bin dann auch schon in der Config und   12:35
er fragt mich hier auch automatisch, will  ich das ändern. Das mache ich natürlich. 12:40
'astronaut@spacefun.ch'. Ich sage  jetzt hier 'Save' und dann sage   12:42
ich hier 'changeme' und gebe dann  hier auch mein neues Passwort ein. 12:51
So, das ist jetzt hier soweit fertig und jetzt  kann ich hier über den Punkt 'Hosts / Proxy Hosts'   13:00
einen neuen Proxy Host hinzufügen und da gebe ich  jetzt einfach als Domain meine DynDNS-Domain ein. 13:04
tuxwiz.mooo.com. Da muss ich hier unten auf 'Add'  klicken und dann sage ich hier Scheme 'http' und   13:10
forwarde das jetzt aber auf meine lokale Adresse,  also die Adresse, die ich mir vorher mit 'ip a s'   13:18
angeschaut habe. Und zwar ist das hier diese, die  ich auch im Router freigegeben habe 192.168.1.157.   13:24
Da gebe ich jetzt diese Adresse, gebe ich da  jetzt ein und den Port natürlich 8080. Und dann   13:32
sage ich hier noch 'Block Common Exploits' und  hier kann ich dann auch noch ein SSL-Zertifikat   13:37
beziehen. Das ist ganz toll, der hat Let's Encrypt  eingebaut. Ihr könnt hier 'Force SSL' machen,   13:42
das müssen wir gleich noch mal prüfen. Ich sage  hier auch noch 'HTTP/2 Support' und sage Agree   13:46
und Save. In dem Moment versucht er jetzt auch  schon ein SSL-Zertifikat automatisch für dich via   13:51
Let's Encrypt zu beziehen. Wenn das klappt, dann  aktualisiert er das auch regelmäßig. Du musst dich   13:58
also um nichts kümmern. Beim Cloudflare-Tunnel  passiert das Ganze natürlich voll automatisch. Da   14:03
brauchst du das Ganze gar nicht machen, denn der  generiert für dich das Zertifikat. Jetzt schaue   14:08
ich hier noch mal auf 'Edit' und sage hier noch  mal 'Force SSL', denn das wird standardmäßig nicht   14:12
übernommen. Jetzt habe ich das hier gespeichert.  Jetzt können wir mal probieren, ob wir über die   14:17
Domain tuxwiz.mooo.com auch schon draufkommen. Und  siehe da, meine ownCloud läuft hier schon. Das ist   14:22
ja wirklich genial. Ich kann mich jetzt hier mit  'admin' und meinem Passwort auch wieder anmelden   14:28
und habe jetzt hier meine ownCloud bereits  betriebsbereit. Du siehst also, du hast in wenigen   14:33
Minuten so eine ganze Cloud für dich aufgesetzt  und der Vorteil von ownCloud ist, dass es sich   14:38
wirklich auf das Wesentliche beschränkt. Nextcloud  kann viel viel mehr. Es ist sehr viel flexibler   14:44
und hat tausende von AddOns. ownClouds Stärke ist,  dass es sich wirklich auf die File-Synchronisation   14:49
beschränkt und die aber wirklich super gut machen  kann. Ich bin großer Fan von dieser Lösung und   14:55
wenn das jetzt so eingerichtet worden ist, dann  kannst Du nachher natürlich dann auch diesen   15:00
Client installieren. Das könnten wir uns dann  auch noch mal entsprechend anschauen und zwar   15:04
habe ich jetzt hier noch ein SpaceFun-System und  da können wir jetzt diesen ownCloud-Client auch   15:09
noch mal angucken. Den gibt es hier auch auf  https://owncloud.com/desktop-app/. Dann gibt   15:15
es hier im Bereich Linux ein sogenanntes  AppImage. Als AppImage herunterladen. Das   15:20
ist so eine AppImage Datei, die kann man einfach  ausführbar machen und dann ist das volle Programm   15:26
eigentlich auch schon drin und ich kann es  einfach nur noch starten. Das ist jetzt hier   15:31
meinem Downloads-Ordner. Ich verschiebe das  ganze wie üblich in einen Ordner '~/bin' und   15:36
gucke dann dass es hier über rechte Maustaste /  Eigenschaften / Berechtigungen / Datei ausführbar   15:41
machen auch als ausführbar markiert ist. Das  Ganze kannst du natürlich auch im Terminal   15:46
mit 'chmod +x' machen. Jetzt sage ich hier  wieder 'Ausführen', der fragt mich jetzt   15:50
hier noch mal. Ich bestätige das und hier kann  ich jetzt schon meine Serveradresse eingeben. 15:55
Also tuxwiz.mooo.com. Jetzt fragt er mich hier  noch mal nach einem Benutzernamen. Den gebe ich   16:00
entsprechend an und schon ist die Einrichtung  hier abgeschlossen und der hat jetzt hier einen   16:11
lokalen Ordner ownCloud erstellt in meinem  Home Verzeichnis. Und da sind dann auch all   16:16
die Dateien. Also hier ist der Ordner, da sind  dann all die Dateien, die auch im Webfrontend   16:21
von der ownCloud schon sichtbar waren. Das sind  so ein paar Demo-Dateien. Die sind hier jetzt   16:26
auch schon synchronisiert. Das ganze gibt es  natürlich auch für mobile Endgeräte wie iOS,   16:30
Android oder auch mit Ghostcloud für Ubuntu  Touch. Das nutze ich z.B. und damit hast du   16:37
deine Daten dann auch überall mobil unterwegs  zugreifbar. Ich wünsche dir viel Spaß beim   16:43
Nachbauen. Ich finde es wirklich super einfach  und eine tolle Lösung für das Selfhosting,   16:50
also eine meiner Lieblingslösungen.  Und falls du irgendwo dennoch Fragen   16:55
haben solltest, dann schreib mir einfach in  den Kommentaren oder melde dich in unserer   16:58
Telegram-Community an. Ich freue mich  auf deinen Besuch. Und bis bald. Tschüss 17:03
Hello space smugglers! In this video, I'd like 00:00
to introduce you to the ownCloud solution in more detail. We've already 00:05
looked at Nextcloud, SeaFile, FileBrowser, CryptPad, and a few other things together. Similar to Nextcloud, ownCloud is a 00:13
file synchronization solution that requires a server and a client component. 00:20
We'd like to self-host the server component at home, and 00:28
I'd like to explain to you today exactly how that works. But first, I'd like to introduce you to a small project we 00:34
've been working hard on over the past few weeks and months: FOSSWELT. You can find it 00:40
at fosswelt.org. FOSSWELT is a website where we try 00:47
to bring together all the important German-language open source and Linux projects. Here you'll find 00:54
gnulinux.ch and linuxnews.de, among other things, but also my videos and FOSS-Heute, the microblog. And 01:01
if you're doing something in the open source or Linux space yourself, you're warmly invited 01:10
to participate, and we'd be happy to list you on our website. To 01:16
prepare for our installation, I've created a stable version 01:24
of TuxWiz 'TuxWiz Mini,' as usual . You can also 01:30
replicate the whole thing on any other Debian-based system. As usual, I want to run the system in Docker, specifically with Docker Compose, 01:35
to achieve the necessary flexibility. For self-hosting, we'll need either a 01:41
Cloudflare tunnel—I've already explained how to do this—or appropriate 01:48
port forwarding in the router. For this, we also need a DynDNS address. My DynDNS address 01:54
is tuxwiz.mooo.com. I can easily 02:02
find out my server's IP address with the command 'ip a s,' and this IP address is displayed up here. 02:08
I then need to enter it accordingly in my router under NAT/Port Forwarding or Port Forwarding 02:15
for the HTTP and HTTPS protocols. These are ports 80 and 443, which I 02:22
then forward to this local IP address that I have displayed above. If 02:29
you have prepared this far, then we are basically ready to go and can 02:36
begin installing Docker. As usual, I have prepared a cheat sheet for you here. 02:40
You can find it later in our Telegram community. So please join 02:46
our Telegram community, because that's where you'll find all the important information. To do this, go here 02:51
to spacefun.ch, click on Telegram, and you're there. So the first thing I'll do is install 02:57
Docker from the Debian repositories and Docker Compose. To do this, I 03:04
enter 'sudo apt install docker.io docker-compose' and, of course, enter my password. As usual with Docker, 03:13
your user must be a member of the docker group. You can 03:20
do this with the 'usermod' command. In this case, my user is already a member of this group. I'll show you 03:26
how it works anyway. 'sudo usermod -a -G', then 'docker' and your username. 03:31
In my case, that would be the user 'tux'. The whole thing only takes effect when you 03:41
log out and back in again, and then you can check this with the 'id' command. And then 03:47
it will show you down here that you are a member of the 'docker' group. So we've got 03:51
everything prepared so far, and now we'll begin with the actual installation. 03:55
First, we want to open the ownCloud installation instructions. I've also 04:01
linked them here, and we'll take a closer look at them now. The first thing we do here is create a folder in a directory—here, 04:06
I'd call this my home directory, which I can enter—with 'cd' 'pwd' /home/tux, 04:14
where I'm already in. 'mkdir owncloud-docker-server'—I'll do that here now 04:19
, and then we'll simply change into this folder. 'cd owncloud-docker-server' and 04:25
then there is this 'docker-compose.yml' and I will create it now with 04:35
'nano docker-compose.yml' and in there I can now put this example, which is listed here 04:41
I've linked it again in the cheat sheet, just copy it in. It's 04:51
quite long. I say copy here and can now paste it here and it's 04:55
already in here. We still need to change a few settings, though. So, by 05:04
default, it exposes my ownCloud via HTTP on port 8080. We then have to 05:09
put a proxy in front of it, of course, otherwise access from the internet won't work. 05:15
Here I can define an ownCloud domain, which I'll define later. 05:20
I can define these variables later using a so-called .env file. I'll enter them there later. This 05:24
is very important. What I'm going to change now are the volumes. I want 05:30
the volumes in my directory to be exposed directly, so I put './' in front of them 05:35
. And then a subfolder called 'files' is created in the folder I created earlier, 05:41
which will then contain all the data. Then I have everything together and it's 05:47
not lying around in Docker volumes somewhere on the system. So everywhere where 'volumes' 05:51
is, I put a './' in front of it. And then I'm done. 'Ctrl+O', 05:56
Enter, 'Ctrl+X', quit. I can't start the server yet because I still have to 06:02
create this .env file. Here's an example using cat and EOF. This simply pastes the 06:08
contents between the EOF into an '.env' file. I could also just open it with Nano 06:14
and paste the contents in there. I'll open it with Nano now because we 06:22
still have a few things to edit in it. So not too much. We'll leave this here for now, 06:26
but as 'OWNCLOUD_TRUSTED_DOMAINS', I then have to set my DynDNS domain there. 06:33
I had already configured DynDNS in my router. Network settings have expired here 06:38
, but there's DNS, and I can set up DynDNS addresses there. 06:43
It looks a bit different depending on the router. Here I'm entering my DynDNS domain: 06:48
tuxwiz.mooo.com. Then I can save and 06:53
exit the whole thing with 'Ctrl+O' and 'Ctrl+X'. Now I can start this Docker service. We can also 07:02
look at that here: 'docker compose up', with '-d'; then it's moved to the background, or without, 07:07
so it stays in the foreground. So here we need to do 'docker-compose', 07:13
because under Debian the whole thing is still called 'docker-compose'. It's a separate command. 07:17
Now the image is being pulled here, and it will set up my ownCloud instance in the background 07:23
. So, of course, that's really quick. However, since we want 07:28
it to be accessible from the internet via HTTP and HTTPS, we obviously need 07:34
to add a proxy. And I'd also like to run a proxy in Docker, 07:40
because that's a natural fit. Then we'll have everything uniformly in a single Docker setup 07:44
, and the Nginx Proxy Manager is ideal for that. It's a great solution. I like 07:49
it a lot. And there's also a quick setup here, and we can just 07:54
follow it. This can also be done with a 'docker-compose.yml' file 07:59
, which we can create here as well. To do this, I'll 08:03
open a new window here and go back to my home page. I create a new folder with 'mkdir npm'. 08:06
'cd npm'. I created that there before. I'll 08:16
delete it again for now, clean it up. And now I can create another docker-compose.yml 08:21
file here. We'll do that again now. Nano. So each system has 08:33
its own Docker Compose. We could also merge them accordingly, 08:39
but we don't need to. The permissions are still incorrect here. I'll redo this first 08:44
. 'mkdir npm', 'cd npm', and now 'nano docker-compose.yml'. This Docker Compose 08:50
already looks much clearer, and it's already well-prepared. I'll paste it 09:01
in here. We don't need to change anything. It also exposes the directories 09:05
directly here: /data and /letsencrypt. I'll now say 'Ctrl+O', 'Enter', 'Ctrl+X'. 09:10
Exit. That basically completes it, and we can now 09:17
start it with 'docker compose up -d'. So we now have an ownCloud instance. We can now 09:21
check whether it's already running with 'sudo netstat -antp | grep 8080'. It's running, 09:29
8080, and something is already running there. So that's already very good, and now I'll 09:38
of course install my proxy in front of it. I could already 09:45
access port 8080 via localhost and would even see my ownCloud there. However, we want 09:50
to make the whole thing accessible from the internet. If you use a Cloudflare tunnel, you obviously have to 09:55
forward traffic on port 8080 to localhost in your tunnel configuration. This 09:59
saves you the trouble of setting up the proxy, as the proxy service will then 10:06
run on your tunnel at Cloudflare. So, it's even easier to set up, and you don't even need 10:12
to configure port forwarding on your router. That's a really great thing, and of course 10:16
very secure, too. It's running here now, and then we can 10:22
configure npm later using the local address on port 81. I've 10:30
written it all down here in the file for you, so the Docker Compose from ownCloud is also included, and then 10:37
it continues down here with the .env point. I've written it in there again for you: 10:42
OWNCLOUD_TRUSTED_DOMAINS, so there it is. That's wrong. Of course, MY_DOMAIN should 10:47
go there, and then I could have changed the admin password here too. So 10:55
we can of course change that accordingly via https://localhost:8080. 11:02
At the moment it's still admin:admin. You should change that beforehand, before you 11:11
expose the whole thing to the internet. The localhost ownCloud is already running. I can 11:17
of course make the necessary settings here under Settings. I'll now change my password here 11:23
: 'Change Password'. Ah, you still have to enter the 'Current Password'. 11:32
'admin' and then the 'New Password' here. Now 11:40
let's try it again to see if we can log in with it. 11:50
And look, I'm now in my ownCloud on 11:55
localhost with my new password. So, it's already running locally on my system. Of 12:00
course, it's not much use to me because I want 12:04
to make it available from the internet so that I can synchronise my files from anywhere. So we need to check 12:08
if the proxy is running now. It's already started here and now I can 12:13
access it. So, let's take a look. There is a default user 'admin@example.com' and 12:17
a password 'changeme'. We now need to log in here at 'localhost:81'. That 12:23
's the npm, which has its own web frontend. First I enter admin@example.com and 12:30
then 'changeme' as the password. Then I'm already in the config and 12:35
it automatically asks me if I want to change it. Of course I do that. 12:40
'astronaut@spacefun.ch'. I now say 'Save' and then 12:42
I say 'changeme' and then enter my new password here. 12:51
So, that's finished now and now I can add a new proxy host under 'Hosts / Proxy Hosts' 13:00
and then I simply enter my DynDNS domain as the domain: 13:04
tuxwiz.mooo.com. I have to click 'Add' down here and then I say Scheme 'http' and 13:10
now forward it to my local address, i.e. the address that I looked at previously with 'ip a s' 13:18
. This is the one I also released in the router: 192.168.1.157. 13:24
Now I'll enter this address, and the port, of course, 8080. And then 13:32
I'll say 'Block Common Exploits,' and here I can also 13:37
get an SSL certificate. That's great; it has Let's Encrypt built in. You can 'Force SSL,' 13:42
we'll have to check that again in a moment. I'll also say 'HTTP/2 Support,' and say 'Agree.' 13:46
and save. At that moment, it will also try 13:51
to automatically obtain an SSL certificate for you via Let's Encrypt. If that works, it will update it regularly. 13:58
So you don't have to worry about anything. With the Cloudflare tunnel, the whole thing happens automatically, of course. 14:03
You don't even need to do that, because it generates the certificate for you. Now 14:08
I'll go back to 'Edit' and select 'Force SSL' again, because that isn't 14:12
applied by default. Now I've saved it here. Now we can try 14:17
to access it via the domain tuxwiz.mooo.com. And look, my ownCloud is already running here. That's 14:22
really ingenious. I can now log in again with 'admin' and my password, 14:28
and my ownCloud is now ready to go. So you see, you've set up an entire cloud for yourself in just a few 14:33
minutes, and the advantage of ownCloud is that it 14:38
really sticks to the essentials. Nextcloud can do much, much more. It's much more flexible 14:44
and has thousands of add-ons. ownCloud's strength is that it's really limited to file synchronization 14:49
, but it does that really well. I'm a big fan of this solution, and 14:55
once it's set up like this, you can of course install this client later 15:00
. We could take another look at that. 15:04
I have a SpaceFun system here, and we can 15:09
take another look at this ownCloud client. It's also available here at https://owncloud.com/desktop-app/. Then, 15:15
in the Linux section, there's a so-called AppImage. Download it as an AppImage. It 15:20
's an AppImage file that you can easily make executable, and then the entire program is 15:26
basically already inside, and I can just start it. This is now in 15:31
my Downloads folder. I'll move the whole thing to a folder called '~/bin' as usual and then make sure it 15:36
's marked as executable by right-clicking on it and selecting Properties > Permissions > Make File Executable 15:41
. You can of course also 15:46
do the whole thing in the terminal with 'chmod +x'. Now I say 'Run' again, and it asks me 15:50
again. I confirm this, and here I can enter my server address. 15:55
So tuxwiz.mooo.com. Now it asks me again for a user name. I 16:00
enter this accordingly, and the setup is complete. It has now 16:11
created a local ownCloud folder in my home directory. And that's where all 16:16
the files are. So here is the folder, and there you have all the files that 16:21
were already visible in the ownCloud web front end. These are a few demo files. They're 16:26
already synchronized here. The whole thing is of course also available for mobile devices like iOS, 16:30
Android, or with Ghostcloud for Ubuntu Touch. I use that, for example, and it means you can 16:37
access your data anywhere, even on the go. I hope you have fun 16:43
recreating it. I think it's really super simple and a great solution for self-hosting— 16:50
one of my favorites. And if you still 16:55
have any questions, just write to me in the comments or join our 16:58
Telegram community. I look forward to your visit. And see you soon. Bye. 17:03

ownCloud ist eine praktische Lösung, mit der du ganz einfach deinen eigenen Cloudserver zu Hause betreiben kannst. In diesem Video zeige ich dir Schritt für Schritt, wie du ownCloud mithilfe von Docker installierst und über einen NGINX-Proxy aus dem Internet zugänglich machst – so kannst du von überall sicher auf deine Dateien zugreifen.

Zunächst richtest du dein System vor, am besten auf einem Debian-basierten Linux, und installierst Docker sowie Docker Compose. Danach legst du ein Verzeichnis für ownCloud an und erstellst eine Docker-Compose-Datei, in der du die Container-Konfiguration festlegst. Wichtig ist, dass du die Speicherorte für deine Daten direkt in deinem Verzeichnis definierst, damit alles übersichtlich bleibt und nicht irgendwo in Docker-Volumes versteckt ist.

Damit ownCloud aus dem Internet erreichbar ist, brauchst du entweder ein Port-Forwarding im Router oder einen Cloudflare-Tunnel. Außerdem solltest du eine DynDNS-Adresse verwenden, damit dein Server auch bei wechselnder IP-Adresse immer erreichbar bleibt. Im Router leitest du dann die Ports 80 (HTTP) und 443 (HTTPS) auf deinen Server weiter.

Nach dem Start der Container kannst du ownCloud lokal über den freigegebenen Port erreichen. Um den Zugriff aus dem Internet zu ermöglichen und abzusichern, setzt du einen Reverse-Proxy wie den NGINX Proxy Manager ein, den du ebenfalls mit Docker betreibst. Dieser Proxy verwaltet auch die SSL-Zertifikate, die du bequem per Let's Encrypt automatisch beziehen und erneuern lassen kannst.

Der Fokus von ownCloud liegt auf der zuverlässigen und performanten Dateisynchronisation – im Gegensatz zu Nextcloud, das viele zusätzliche Funktionen bietet, konzentriert sich ownCloud auf das Wesentliche und macht das sehr gut.

Für den Zugriff auf deine Cloud kannst du den ownCloud-Client auf verschiedenen Plattformen installieren. So bleiben deine Daten auf Smartphone, Tablet oder PC immer synchron und aktuell. Mit dieser Lösung hast du in kurzer Zeit eine stabile, sichere und einfach zu bedienende private Cloud, die dir volle Kontrolle über deine Daten gibt.

Navigation

Video Player