Skip to main content
Hyper 8 Spacefun Videos

SFTPGo: Deine Mini-Cloud mit WebDAV

Hallo liebe Hyperspace-Reisende. Heute möchte  ich euch einen einfachen Server zum Aufsetzen   00:00
einer Cloud mit WebDAV genauer vorstellen,  und zwar heißt die Lösung SFTPGo. Der Name   00:08
legt es bereits nah, das System ist in erster  Linie auf die Nutzung von SFTP ausgelegt.   00:17
SFTP ist ein verschlüsseltes Protokoll zur  Dateiübertragung SFTPGo beherrscht aber auch   00:24
WebDAV. Zur Einrichtung gehst du ganz einfach  auf die Webseite SFTPGo.com und wählst dann   00:32
hier im Menü den Bereich Docs für die Anleitung.  Hier findest du dann eine 'Getting Started Guide'   00:39
und daran orientieren wir uns heute auch. Ich  klicke hier auf den Bereich 'Installation' und   00:48
finde dann dort die Installationsanleitung für die  verschiedenen Betriebssysteme, unter anderem auch   00:53
Ubuntu oder Debian. Wir verwenden hier  Debian als Basis, Debian Stable. Diese   01:00
Versionen sind aktuell supported. Wir müssen  hier als Erstes mal den GPG-Key herunterladen,   01:06
und zwar mit curl. Das heißt, falls curl noch  nicht installiert ist, sollten wir dies zunächst   01:12
nachholen. 'sudo apt install curl'. Ich bin hier  sogar schon als Root unterwegs. Das kannst du dann   01:17
entsprechend so einrichten. Dann habe ich  jetzt curl installiert und kann jetzt hier   01:24
danach entsprechend schon loslegen, den Key hier  einzurichten. Er möchte hier noch gnupg haben,   01:30
das installieren wir ihm auch noch, und wir  laden dann mit curl diesen GPG-Key runter   01:38
und speichern ihn im Textformat in der Datei  /usr/share/keyrings/sftpgo-archive-keyring.gpg.   01:43
Das hat er jetzt gemacht. Als Nächstes können wir  diese sources.list erstellen. In der sources.list   01:54
wird das Repo für das Projekt hinterlegt, und zwar  wird hier ein Codename verwendet. Wir können den   01:59
hier auslesen 'CODENAME=lsb_release -c -s' und das  können wir dann mal direkt auch manuell ausführen,   02:05
und dann sehen wir sofort, was da reingeschrieben  wird in diese Umgebungsvariable. Und zwar schreibt   02:14
er hier 'bookworm' rein. Das ist der  aktuelle Debian Stable Release. Das kann   02:19
je nach verwendeter Distribution etwas anderes  sein. Danach führen wir hier diesen Befehl aus,   02:24
denn der erstellt uns dann tatsächlich mit dem  'sudo tee', diese sources.list, die brauchen   02:30
wir natürlich. Das mache ich jetzt mal und hier  wird dann diese Variable Codename verwendet und   02:36
das schreibt ihr dann tatsächlich hier in diese  Datei rein. Die können wir uns mal anschauen 02:43
'cat /etc/apt/sources.list.d/sftpgo.list' und  da sehen wir jetzt hier hat er tatsächlich auch   02:48
bookworm direkt schon reingeschrieben. Wir haben  jetzt also diese sources.list vorbereitet und   02:58
können unser System, also die Paketlisten,  nun als allererstes mal aktualisieren. Das   03:04
machen wir wie üblich mit 'sudo apt update' und  danach können wir auch schon die eigentliche   03:09
Applikation installieren. Das mache ich jetzt  mal hier. Wichtige Voraussetzung ist wie immer   03:14
wenn du das Ganze im Selfhosting bei dir zu Hause  installieren möchtest, dann musst du deinen Router   03:22
entsprechend vorbereiten. Und zwar zumindest für  die Einrichtung mit SSL den Port 80 forwarden und   03:28
nachher noch einen entsprechenden Port für die  Nutzung von HTTPS und für WebDAV. Das schauen wir   03:35
uns gleich im Detail aber noch mal an. Wir haben  jetzt die Software hier schon installiert und wir   03:42
können die auch schon direkt mal anschauen.  Und zwar hat er jetzt hier die Software im   03:47
Hintergrund bereits eingerichtet und er sagt mir  dann hier als Nächstes bei der Konfiguration,   03:52
wie ich die dann tatsächlich aufrufen kann.  Wir sind jetzt hier noch im Getting Started   03:58
Bereich. Wir sagen jetzt hier als allererstes  mal 'sudo netstat -antp' und schauen mal,   04:04
was er denn tatsächlich jetzt hier schon laufen  hat. Da läuft schon was und zwar läuft hier auf   04:12
Port 8080 aktuell SFTPGo und hier läuft auch schon  ein Dienst und zwar ist der für SCP zuständig. Ich   04:17
gehe jetzt hier mal auf http://localhost:8080 und  bin hier jetzt schon auf dem Verwaltungsfrontend   04:26
von SFTPGo drauf. Hier kann ich mir als Erstes  mal einen Admin User anlegen. Den nenne ich jetzt   04:34
mal tux und gebe dem jetzt hier ein entsprechendes  Passwort. Das Ganze kannst du wie immer bei dir zu   04:40
Hause nachbauen. Ich empfehle dir natürlich, meine  Linux-Distribution Tuxwiz in der Mini-Variante   04:47
dazu zu nehmen, denn die eignet sich sehr, sehr  gut für die Einrichtung deines Homeservers. Wir   04:52
sind jetzt hier also schon im Admin-Frontend  von dieser SFTPGo Installation und können hier   04:58
schon sofort loslegen. Hier könntest du jetzt  direkt noch die Zwei-Faktor-Authentifizierung   05:06
konfigurieren, falls du das möchtest. Wir haben  jetzt als Erstes mal nur SFTPGo installiert.   05:11
Das ist jetzt im Augenblick noch nicht  von extern erreichbar und wir möchten   05:18
jetzt als Erstes mal die SSL-Konfiguration  vornehmen und dafür gibt es hier im Bereich   05:23
den Punkt und dort kann man das SSL-Zertifikat  beantragen. Und zwar musst du natürlich eine   05:30
Domain haben. Ich habe hier in meinem  Fall eine DynDNS-Domain, die heißt 05:37
tuxwiz.mooo.com und die zeigt direkt  bei mir auf meinen Homeserver,   05:41
also auf meinen Router. Hier gebe ich  eine E-Mail-Adresse für das Zertifikat an 05:49
astronaut@spacefun.ch und hier diesen Port der im  Router geöffnet sein muss. Hier kann ich nachher   05:54
noch sagen, für was er denn tatsächlich das  Zertifikat alles nutzen soll, und ich sage   06:03
hier gerade mal HTTP, FTP und WebDAV. Wir möchten  jetzt bei SFTPGo nachher natürlich wirklich nur   06:07
die WebDAV-Installation nutzen. Du kannst aber  auch das System genauso gut für SFTP nutzen,   06:14
denn darauf ist es ausgelegt. Ich sage jetzt  hier 'Speichern' und dann schauen wir doch mal,   06:21
ob er dieses Zertifikat auch schon beziehen kann  im Hintergrund. Sollte das nicht der Fall sein,   06:25
dann ist möglicherweise deine Domain nicht  richtig eingerichtet. Die muss wirklich auf   06:31
deine IP-Adresse deines Routers zeigen. Hier  hat das jetzt im Hintergrund schon erfolgreich   06:35
erledigen können. Wie üblich habe ich hier euch  für diese Installation hier so ein kleines Cheat   06:41
Sheet erstellt und da schreibe ich die wichtigsten  Befehle alle mal raus, und wir sind hier schon   06:46
angekommen. Also, wir haben jetzt hier SFTPGo  schon installiert und können jetzt schon mit der   06:52
eigentlichen Konfiguration anfangen. Was wir jetzt  hier als Erstes mal machen möchten, ist dass wir   06:56
halt für WebDAV auch das SSL-Protokoll aktivieren  möchten. Denn wir möchten WebDAV verschlüsselt   07:02
nutzen und du könntest hier im Servermanager  im Statusbereich sehen, dass dazu aktuell nur   07:10
bisher sogar WebDAV disabled ist. Und dann, wenn  du es enabled hättest, tatsächlich sogar nur HTTP   07:17
im Moment zum Einsatz kommt. Wir schauen uns das  Ganze jetzt mal an und dazu bearbeiten wir hier   07:23
diese Datei /etc/sftpgo/env.d/webdavd.env, denn  da kann man einfach über Environment-Variablen   07:28
Konfigurationseinstellungen vornehmen. Wir  gehen jetzt mal in eine Datei webdavd.env   07:35
und schreiben dann mal anhand der Anleitung diese  entsprechenden Konfigurationseinstellungen herein.   07:42
Die Paste sich jetzt hier mal rein und hier wird  z.B. das Zertifikat angegeben. Da musst du den   07:47
Namen natürlich anpassen auf deine Domain denn  das Zertifikat wird natürlich im Namen deiner   07:54
Domain eingerichtet. Ich sage jetzt mal 'Ctrl+O',  Enter, 'Ctrl+X', beenden. Wir können uns das auch   07:59
noch mal angucken 'ls- al /var/lib/sftpgo/certs/'  und da liegt dann dein Zertifikat. Das müssen wir   08:05
mit sudo machen, denn mein normaler User hat  da gar keine Rechte drauf. Ihr seht hier hat   08:12
nur der User SFTPGo Rechte und natürlich Root. Wir  haben jetzt also WebDAV eingerichtet und das auch   08:17
entsprechend verschlüsselt. Und jetzt können wir  mal als allererstes mal den Dienst neu starten und   08:24
das machen wir als erstes Mal. Wir könnten dann  nämlich mal im Backend schauen, was da passiert   08:30
ist. Schauen wir jetzt noch mal, 'System',  ah das muss natürlich auch wieder als Root   08:35
gemacht werden. 'sudo service sftpgo restart'.  Ich schreibe euch das entsprechend hier auch noch   08:40
mit rein, dann habt ihr das sauber. Jetzt hat er  den Dienst im Hintergrund schon neu gestartet und   08:45
jetzt sollten wir hier im Bereich Status direkt  schon sehen, was da gelaufen ist. Jetzt hat er   08:50
hier schon HTTPS auf Port 8080 aktiv. Das möchten  wir nachher natürlich noch ändern, da möchten wir   08:56
einen eigenen Port dafür wählen. Ich greife jetzt  aber erstmal auf Port 8080 hier zu. Das ist jetzt   09:02
natürlich auch nicht die richtige Domain. Ich  melde mich hier an und kann jetzt hier mit meinem   09:08
Passwort wieder auf das System zugreifen. Hier ist  er jetzt allerdings nicht im Admin-Modus sondern   09:14
im User-Modus. Ich muss jetzt hier auf 'Go to Web  Admin' gehen und kann mich erst dann als Admin   09:21
anmelden. Das ist ein Admin User der hat keinen  normalen User-Account und jetzt können wir hier   09:26
im Bereich Servermanager unter Status noch mal  schauen, ob WebDAV denn jetzt aktiv ist. WebDAV   09:31
ist aktiv und er nutzt hier auch das Protokoll  HTTPS und nicht HTTP, das ist also ganz wichtig,   09:36
und er hat hier einen Port 10443. Wir möchten  jetzt das Webfrontend auch noch auf einem anderen   09:42
Port laufen lassen mit HTTPS, nicht mehr auf Port  8080. Und da nehmen wir auch noch eine kleine   09:48
Konfigurationsänderung vor, die sehr ähnlich  aussieht wie das, was wir schon haben also 'sudo   09:52
nano /etc/sftpgo/env.d/httpd.env' und da paste  ich jetzt den Inhalt hier rein. Und da muss dann   09:59
auch das Zertifikat natürlich wieder angepasst  werden, also hier der Name tuxwiz.mooo.com.   10:07
Den musst du auf deine DynDNS-Domain oder deine  Domain hin anpassen. Hier siehst du auch den Port   10:12
den ich gerne verwenden möchte. Das wäre jetzt  9443. Ich könnte aber auch einfach den Port 443   10:18
wählen. Das mache ich jetzt mal und sage jetzt  hier 'Ctrl+O', Enter, 'Ctrl+X', beenden. Jetzt   10:23
kann ich noch mal den Service neu starten mit  'sudo service sftpgo restart' und jetzt sollte   10:29
der Dienst tatsächlich dann auch über Port  443 schon erreichbar sein. Das schauen wir mal 10:35
tuxwiz.mooo.com und ich mache auch noch  ein https davor, dann geht er auch gerade   10:40
verschlüsselt da drauf. Und jetzt bin ich schon  über das Internet hier tatsächlich auf meiner   10:49
SFTPGo Instanz drauf und kann mich hier wieder  über 'Go to Web Admin' als mein admin anmelden,   10:53
sag jetzt hier, geb mein Passwort ein und bin  jetzt hier schon drin. Als Allererstes würde   11:00
ich jetzt mal einen neuen User erstellen.  Das kann ich hier im Bereich Users machen,   11:06
'Add' und jetzt sage ich z.B Usernamen  Astronaut und bei Passwort gebe ich jetzt   11:09
hier ein Passwort ein und damit könnte ich hier  auch schon loslegen. Hier könnte ich bei der   11:15
Verwendung von SFTP auch noch einen Public Key  hinterlegen. Das müsste ich dann hier machen,   11:21
und ich sage jetzt aber einfach mal Save und  dann werden die defaults verwendet. Jetzt melde   11:27
ich mich mal hier nicht am Backend an, sondern  gehe einfach auf tuxwiz.mooo.com. Hier sehe ich,   11:32
dass ich im Frontend bin und melde mich jetzt hier  mit Astronaut an und gebe jetzt hier mein Passwort   11:37
ein. Jetzt bin ich tatsächlich hier schon in  dem Webfrondend, aus Client-Sicht, also aus   11:45
User-Sicht, und kann hier einzelne Dateien auch  tatsächlich schon hochladen. Ich sage jetzt hier   11:51
einfach Drag & Drop könnte jetzt diese sftpgo.txt  da hochladen. Ich sage Save und dann ist das Ganze   11:56
hier auch schon im WebGUI sichtbar. Ich könnte  das auch sharen, wie z.B. auf einer Nextcloud.   12:02
Ich könnte mir hier ein Share erstellen, Ordner  z.B. 'shared', 'New folder' sage jetzt 'shared',   12:08
Enter und könnte jetzt hier ein neues  Share erstellen. 'Add share', dann könnte   12:15
ich z.B. sagen, wie kann mein Gegenüber darauf  zugreifen. Dann sage ich hier ein Password/Secret 12:22
und sage dann hier z.B. ich gebe noch ein  Passwort ein und könnte noch ein Expiration   12:30
Date definieren. Dann sage ich hier Save und damit  ist das Share auch schon erstellt. Und hier kann   12:36
ich dann über diesen Link z.B ein Single Directory  Link einfach kopieren und dann kann ich den mein   12:40
Gegenüber geben und der kann dann ganz einfach  mit dem Passwort auf diese Dateien zugreifen.   12:47
So kann ich auf einfache Weise schon mal Daten  austauschen mit Freunden und Bekannten. Ich könnte   12:52
hier auch einen Shared Folder für alle User die  auf der SFTPGo Instanz arbeiten gemeinsam anlegen,   12:57
das ist also auch möglich. Und dann kann ich  sogar noch definieren, wer was können darf,   13:04
also ob man lesen schreiben kann oder nur lesen  das ist alles möglich. Wir möchten jetzt aber   13:08
natürlich über WebDAV darauf zugreifen, und für  WebDAV muss man noch ein bisschen was beachten.   13:13
Falls noch nicht installiert, dann sollte man auf  jeden Fall das davfs2 installieren. Das ist jetzt   13:19
hier schon drauf 'sudo apt install davfs2' das  ist das Paket. Und dann kann man z.B. auch über   13:24
den Dateimanager Thunar direkt auf dieses Share  zugreifen. Und zwar muss man jetzt natürlich   13:31
dann über diesen Port, den er jetzt vorhin in  der Konfiguration angegeben hat, über WebDAV   13:37
zugreifen. Das können wir noch mal schauen, so,  'netstat -antp' ich könnte jetzt hier auch '|grep   13:43
sftpgo' noch eingeben und dann sehe ich nur die  Dienste, die hier über SFTPGo freigegeben sind.   13:51
Und da sehe ich jetzt hier diesen Port, den  er vorhin bei WebDAV genannt habe, 10443. Und   13:57
jetzt können wir mal versuchen, ob wir tatsächlich  schon über WebDAV hier auf diesen Server zugreifen   14:03
können. Und dazu könnte ich jetzt mal hier in  Thunar in der URL einfach mal die URL eingeben 14:09
tuxwiz.mooo.com und dann 14:15
:10443. Jetzt müsste er eigentlich übers Internet  gehen. Deswegen kommt er da jetzt noch nicht   14:20
drauf, weil dieser tatsächlich noch nicht in  meinem Router freigegeben ist. Also den müsste   14:27
ich diesen Port 10443 den müsste ich jetzt auch  noch in meinem Router freigeben, sonst geht das   14:33
natürlich nicht. Wir sind jetzt hier. Da wir jetzt  direkt auf dem Server sind, könnte ich jetzt auch   14:39
direkt über localhost zugreifen. Da sagt jetzt  natürlich das Zertifikat stimmt nicht, denn das   14:44
lautet hier auf tuxwiz.mooo.com. Ich sage jetzt  trotzdem mal 'Ja', astronaut, könnte jetzt hier   14:49
das Passwort eingeben und könnte das sogar hier  speichern, im Passwortsafe. Dann könnte ich direkt   14:56
darauf zugreifen und hier sehe ich schon meine  Dateien, die ich auch im Webfrontend gesehen habe,   15:01
ganz einfach zum Zugriff. Du musst bedenken,  wenn du WebDAV unter Windows nutzt, dann ist   15:06
in der Registry eingestellt, dass standardmäßig  die maximale Dateigröße 50 MB betragen darf. Das   15:11
ist natürlich sehr, sehr wenig. Das müsstest  du entsprechend anpassen. Wie das geht, habe   15:18
ich dir hier auch hier unten im Cheat Sheet mit  verlinkt, und dann kannst du das genau noch mal   15:23
nachlesen. Das Cheat Sheet findest du wie immer  bei uns in der Telegram-Community. Da kommst du   15:29
ganz einfach drauf über www.spacefun.ch und kannst  dann hier den Punkt Telegram wählen und dann bist   15:34
du schon bei uns dabei. Also wenn du irgendwelche  Fragen hast zur Einrichtung des Systems,   15:42
sei wirklich nicht scheu. Komm bei uns in die  Telegram Community. Wir helfen dir gerne weiter,   15:48
und dann bin ich mir ganz sicher, dass du das  auch selber hinkriegst. Ich wünsche dir viel   15:53
Spaß beim Nachbauen von dieser Lösung  SFTPGo. Ich finde das eine ganz tolle Lösung,   15:59
sehr schlank, einfach einzurichten und super  zu verwenden. Viel Spaß und bis bald. Tschüss. 16:03
Hello fellow Hyperspace travelers. Today I'd like to 00:00
introduce you to a simple server for setting up a cloud with WebDAV. The solution is called SFTPGo. The name 00:08
suggests it; the system is primarily designed for use with SFTP. 00:17
SFTP is an encrypted file transfer protocol, but SFTPGo also supports 00:24
WebDAV. To set it up, simply go to the website SFTPGo.com and select 00:32
the Docs section in the menu for the instructions. There you'll find a 'Getting Started Guide 00:39
,' which we'll be using today. I'll click on the 'Installation' section and 00:48
find the installation instructions for the various operating systems, including 00:53
Ubuntu and Debian. We're using Debian as the base, Debian Stable. These 01:00
versions are currently supported. The first thing we need to do is download the GPG key 01:06
using curl. So, if curl isn't already installed, we should 01:12
do that first. 'sudo apt install curl'. I'm even already running as root here. You can then 01:17
set it up accordingly. I've now installed curl, and can now 01:24
start setting up the key here. He also wants gnupg, 01:30
so we'll install that for him, and then we download this GPG key with curl 01:38
and save it in text format in the file /usr/share/keyrings/sftpgo-archive-keyring.gpg. 01:43
He's done that now. Next, we can create this sources.list. 01:54
The repo for the project is stored in the sources.list, and a codename is used here. We can 01:59
read it out here: 'CODENAME=lsb_release -c -s', and we can then run it manually, 02:05
and then we immediately see what's written to this environment variable. 02:14
It writes 'bookworm' here. This is the current Debian stable release. This can 02:19
be different depending on the distribution used. Then we run this command, 02:24
which actually creates this sources.list with 'sudo tee', which 02:30
we need, of course. I'll do that now, and then this variable codename will be used, 02:36
which you then write into this file. We can take a look at it: 02:43
'cat /etc/apt/sources.list.d/sftpgo.list' and we can see that it has actually 02:48
already written bookworm into it. So we've now prepared this sources.list and 02:58
can now update our system, i.e., the package lists, first. 03:04
We do this as usual with 'sudo apt update', and then we can 03:09
install the actual application. I'll do that here. As always, 03:14
if you want to install the whole thing in self-hosted mode at home, you need 03:22
to prepare your router accordingly. At least for setting up SSL, you need to forward port 80, and 03:28
then a corresponding port for using HTTPS and WebDAV. We'll look 03:35
at that in more detail in a moment. We've already installed the software here, and we 03:42
can take a look at it right away. It's 03:47
already set up the software in the background, and next in the configuration it'll tell me 03:52
how to actually call it up. We're still in the Getting Started 03:58
area. The very first thing we do is say 'sudo netstat -antp' and look at 04:04
what it actually has running here. Something is already running, and 04:12
SFTPGo is currently running on port 8080, and there's also a service running here, and it's responsible for SCP. I'm 04:17
now going to go to http://localhost:8080 and I'm already on the 04:26
SFTPGo administration frontend. The first thing I can do here is create an admin user. I'll call it 04:34
tux and give it a corresponding password. You can recreate the whole thing at home, as always 04:40
. I recommend, of course, that you use the mini version of my Linux distribution Tuxwiz 04:47
, as it's very well suited for setting up your home server. 04:52
So, we're now in the admin frontend of this SFTPGo installation and can 04:58
Get started right away. You can 05:06
configure two-factor authentication here if you'd like. First, we've only installed SFTPGo. 05:11
It's not accessible from the outside at the moment, and we want to 05:18
configure the SSL configuration first. For that, there's a 05:23
link here where you can request an SSL certificate. You'll need a 05:30
domain, of course. In my case, I have a DynDNS domain called 05:37
tuxwiz.mooo.com, which points directly to my home server, 05:41
i.e., my router. Here, I'll enter an email address for the certificate, 05:49
astronaut@spacefun.ch, and this port, which must be open on the router. Here, I can 05:54
specify later what the certificate should actually be used for, and I'll 06:03
just say HTTP, FTP, and WebDAV. For SFTPGo, we only want 06:07
to use the WebDAV installation. You can also use the system just as well for SFTP, 06:14
because that's what it's designed for. I'll say 'Save' here, and then we'll see 06:21
if it can already retrieve this certificate in the background. If it can't, 06:25
then your domain might not be set up correctly. It really needs 06:31
to point to your router's IP address. Here, it's already successfully 06:35
done that in the background. As usual, I've 06:41
created a little cheat sheet for this installation, and I'm listing all the most important commands there 06:46
. So, we've already installed SFTPGo and can now 06:52
begin with the actual configuration. The first thing we want to do is 06:56
enable the SSL protocol for WebDAV. We want 07:02
to use encrypted WebDAV, and you can see in the status area of ​​the Server Manager that 07:10
WebDAV is currently disabled. And if you had enabled it, only HTTP 07:17
would actually be used at the moment. Now we'll take a look at the whole thing and to do so we'll edit 07:23
this file /etc/sftpgo/env.d/webdavd.env, because you can easily 07:28
make configuration settings there using environment variables. We'll now go to a file webdavd.env 07:35
and then write the relevant configuration settings following the instructions. 07:42
Paste it in here and this is where the certificate, for example, is specified. You'll 07:47
obviously have to adapt the name to your domain, because the certificate is naturally 07:54
set up in your domain's name. I'll now say 'Ctrl+O', Enter, 'Ctrl+X', and finish. We can also 07:59
take another look at it: 'ls- al /var/lib/sftpgo/certs/' and your certificate will be there. We have to 08:05
do this with sudo, because my normal user has no rights there. As you can see, 08:12
only the SFTPGo user has rights and, of course, root. So we've now set up WebDAV and 08:17
encrypted it accordingly. And now, first of all, we can restart the service, and 08:24
we'll do that first. We could then look in the backend to see what happened 08:30
. Let's look again at 'System'—ah, of course, this also has to 08:35
be done as root again. 'sudo service sftpgo restart'. I'll write that 08:40
down here for you, so you'll have it clean. The service has already restarted in the background, and 08:45
now we should be able to see what happened directly in the Status area. It already has 08:50
HTTPS active on port 8080. We'll want to change that later, of course; we want 08:56
to choose a separate port for it. But for now, I'm accessing port 8080. That's 09:02
not the correct domain, of course. I'll log in here and can now 09:08
access the system again with my password. However, it's not in admin mode here, but 09:14
in user mode. I have to click 'Go to Web Admin' here and only then can I 09:21
log in as an admin. This is an admin user who doesn't have a regular user account, and now we can 09:26
check again in the Server Manager under Status to see if WebDAV is now active. 09:31
is active and it uses the HTTPS protocol here and not HTTP, which is very important, 09:36
and it has port 10443. We now want 09:42
to run the web frontend on a different port, with HTTPS, no longer on port 8080. And we'll also 09:48
make a small configuration change that looks very similar to what we already have, so 'sudo 09:52
nano /etc/sftpgo/env.d/httpd.env' and I'll paste the content in here. And then 09:59
the certificate obviously needs to be adjusted again, so the name tuxwiz.mooo.com here. 10:07
You have to adjust this to your DynDNS domain or your domain. Here you can also see the port 10:12
I'd like to use. That would be 9443. But I could also just choose port 443. 10:18
I'll do that now and say 'Ctrl+O', Enter, 'Ctrl+X', and finish. Now 10:23
I can restart the service again with 'sudo service sftpgo restart' and now 10:29
the service should actually be accessible via port 443. Let's take a look at 10:35
tuxwiz.mooo.com and I'll also put an https in front of it so that it goes 10:40
there encrypted. And now I'm actually on my 10:49
SFTPGo instance over the internet and can log in again as my admin using 'Go to Web Admin', 10:53
say here, enter my password and I'm in here now. The very first thing 11:00
I would do is create a new user. I can do that here in the Users area, 11:06
'Add' and now I say username Astronaut, for example, and under Password I 11:09
enter a password here and with that I can get started. Here I could 11:15
also store a public key. I would then have to do that here, 11:21
and now I'll just say Save and then the defaults will be used. Now 11:27
I'm not going to log in to the backend, but simply go to tuxwiz.mooo.com. Here I can see 11:32
that I'm in the frontend, so I log in with Astronaut and enter my password here 11:37
. I'm now actually in the web frontend, from the client's perspective, i.e. from 11:45
the user's perspective, and I can actually upload individual files. I can now simply 11:51
drag and drop and upload this sftpgo.txt. I say Save and then the whole thing is 11:56
visible in the WebGUI. I could also share it, like on a Nextcloud, for example. I could 12:02
create a share here, a folder, for example, 'shared', 'New folder', now say 'shared', 12:08
Enter and I could now create a new share here. 'Add share', then 12:15
I could say, for example, how the other person can access it. Then I say a password/secret here 12:22
and then say, for example, I enter a password and I could also 12:30
define an expiration date. Then I say Save here and the share is created. And here 12:36
I can then simply copy a single directory link, for example, and then I can 12:40
give it to the person I'm talking to, and they can then easily access these files using the password. 12:47
This way I can easily exchange data with friends and acquaintances. I could 12:52
also create a shared folder here for all users who work on the SFTPGo instance; 12:57
that's possible too. And then I can even define who can do what, 13:04
i.e. whether they can read/write or only read—all of this is possible. But now we 13:08
obviously want to access it via WebDAV, and there are a few things to consider with WebDAV. 13:13
If it isn't already installed, you should definitely install davfs2. It's already 13:19
there: 'sudo apt install davfs2'—that's the package. And then you can access this share directly, 13:24
for example, using the Thunar file manager. You then have to access it 13:31
via WebDAV using the port that you specified in the configuration earlier 13:37
. We can take another look at that, like, 'netstat -antp'. I could also 13:43
type '|grep sftpgo' here, and then I'll only see the services that are shared here via SFTPGo. 13:51
And now I see this port that I mentioned earlier for WebDAV, 10443. And 13:57
Now we can try to see if we can actually access this server via WebDAV 14:03
. To do this, I could simply enter the URL 14:09
tuxwiz.mooo.com and then 14:15
:10443 in the URL here in Thunar. It should actually go over the internet. That's why it can't access it yet 14:20
, because it's not actually open on my router yet. So 14:27
I would have to open port 10443 on my router as well, otherwise it 14:33
won't work, of course. We are here now. Since we are now directly on the server, I could also 14:39
access it directly via localhost. Of course, the certificate says it's incorrect, because that 14:44
's tuxwiz.mooo.com. I'll say 'Yes' anyway, astronaut, I could 14:49
enter the password here and could even save it here, in the password safe. Then I could access it directly 14:56
, and here I can see my files, which I also saw in the web front end, 15:01
very easily accessible. You have to keep in mind that if you use WebDAV under Windows, 15:06
the registry is set so that the maximum file size is 50 MB by default. That 15:11
's obviously very, very little. You would have to adjust it accordingly. 15:18
I've put a link to how to do this in the cheat sheet below, and you can 15:23
read it again in detail. As always, you can find the cheat sheet in our Telegram community. You can get 15:29
there easily via www.spacefun.ch and then select the Telegram option, and then 15:34
you're already with us. So if you have any questions about setting up the system, 15:42
don't be shy. Come join our Telegram community. We'll be happy to help you, 15:48
and then I'm quite sure you'll be able to do it yourself. I hope you have 15:53
fun recreating this SFTPGo solution. I think it's a really great solution— 15:59
very streamlined, easy to set up, and great to use. Have fun and see you soon. Bye. 16:03

Mit SFTPGo richtest du deinen eigenen Cloudserver im Selfhosting ein – ohne auf große Anbieter angewiesen zu sein. Im Video führe ich ausführlich durch die komplette Installation und Konfiguration: Du erfährst, wie du SFTPGo auf einem Linux-Server installierst, Benutzende anlegst und den Zugriff übers Internet aufbaust. Besonderes Augenmerk liegt auf der sicheren Einrichtung dank HTTPS sowie der Portfreigabe am Router.

SFTPGo unterstützt neben SFTP auch WebDAV, sodass du direkt mit deinem Dateimanager (egal ob Linux, macOS oder Windows) auf deine Cloud zugreifen kannst – inklusive Drag & Drop, Datei-Uploads und einfachem Teilen einzelner Ordner per Link und Passwortschutz.

Starte jetzt mit SFTPGo in dein eigenes Cloud-Projekt – sicher, datensparsam und flexibel! Bei Fragen steht dir die Community zur Seite.

Navigation

Video Player