import { useState } from 'react' import { useOverlayDismiss } from '../hooks/useOverlayDismiss' import Tabs from './Tabs' /** * Wie hänge ich diese Cloud als Laufwerk ein? * * Die Adresse steht bisher nirgends. Sie ist zwar ableitbar – Cloud-Adresse * plus `/dav/` –, aber „ableitbar" heißt: Man muss wissen, dass es sie gibt. * Und die drei Wege dorthin (Windows, Konsole, Dateimanager) haben je eine * Eigenheit, an der es sonst scheitert: * * * Windows verlangt HTTPS und lädt ohne Registry-Eingriff nichts über 50 MB. * * Die Konsole braucht ein zusätzliches Paket (davfs2). * * Dateimanager wollen ein eigenes Schema: `davs://` statt `https://`. * * Die Adressen entstehen aus `window.location`, nicht aus einer Einstellung: * Was im Browser funktioniert, funktioniert auch im Dateimanager – eine * falsch gesetzte PUBLIC_URL würde hier sonst eine Adresse anbieten, die * nachweislich nicht die ist, über die der Betrachter gerade hereinkam. */ interface Props { username: string onClose: () => void } type Tab = 'windows' | 'terminal' | 'files' /** Eine Zeile zum Abschreiben – mit Knopf, weil genau das sonst schiefgeht. */ function CopyRow({ label, value, hint }: { label: string; value: string; hint?: string }) { const [copied, setCopied] = useState(false) function copy() { navigator.clipboard?.writeText(value).then(() => { setCopied(true) setTimeout(() => setCopied(false), 1500) }) } return (
{label}
{value}
{hint && (
{hint}
)}
) } function Step({ n, children }: { n: number; children: React.ReactNode }) { return (
{n}
{children}
) } /** Ein Kasten für das, was an dieser Stelle erfahrungsgemäß schiefgeht. */ function Caveat({ children }: { children: React.ReactNode }) { return (
{children}
) } function Code({ children }: { children: string }) { const [copied, setCopied] = useState(false) return (
{children}
) } export default function WebDavGuide({ username, onClose }: Props) { const overlay = useOverlayDismiss(onClose) const [tab, setTab] = useState('windows') const origin = window.location.origin const davURL = `${origin}/dav/` // Dateimanager sprechen nicht https, sondern davs (verschlüsselt) bzw. dav. const davsURL = davURL.replace(/^https:/, 'davs:').replace(/^http:/, 'dav:') const isHTTPS = window.location.protocol === 'https:' const host = window.location.host // Dolphin kennt beide Schreibweisen; die verschlüsselte heißt anders. const kioURL = `${isHTTPS ? 'webdavs' : 'webdav'}://${host}/dav/` return (

Connect as a drive

Your files over WebDAV — same folders, in your file manager. Sign in with your username and an app password; your account password is refused here on purpose.

{!isHTTPS && ( This page is not using HTTPS.{' '} Windows refuses WebDAV over plain HTTP outright, and every other client sends your app password unencrypted. Put a reverse proxy with TLS in front before you connect a device. )}
tabs={[ { id: 'windows', label: 'Windows' }, { id: 'terminal', label: 'Linux · terminal' }, { id: 'files', label: 'Linux · file manager' }, ]} active={tab} onChange={setTab} />
{tab === 'windows' && (
Open Explorer, right-click This PC → Map network drive… Folder: {davURL} Tick Connect using different credentials. Username {username}, password = your app password. Two things Windows will do to you.
Downloads stop at 50 MB — that is a built-in limit of the Windows WebDAV client, not of this server. Raise it in HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters → FileSizeLimitInBytes (decimal 4294967295 = 4 GB), then restart the WebClient service.

If mapping fails immediately, that service is usually not running: services.msc → WebClient → start, set to Automatic.

For large files, a dedicated client (WinSCP, Cyberduck, RaiDrive) is the calmer route — none of them have that limit.
)} {tab === 'terminal' && (

Mount it with davfs2. It asks for username and password on the first mount.

{`sudo apt install davfs2 # Debian/Ubuntu # sudo dnf install davfs2 # Fedora # sudo pacman -S davfs2 # Arch sudo mkdir -p /mnt/aether sudo mount -t davfs ${davURL} /mnt/aether`}

Without typing the password every time

Put the credentials in ~/.davfs2/secrets — the file must be readable by you alone, davfs2 refuses it otherwise:

{`mkdir -p ~/.davfs2 echo '${davURL} ${username} YOUR-APP-PASSWORD' >> ~/.davfs2/secrets chmod 600 ~/.davfs2/secrets`}

Mount it at boot

One line in /etc/fstab:

{`${davURL} /mnt/aether davfs user,noauto,_netdev 0 0`} _netdev matters: without it the system tries to mount before the network is up and the boot stalls.

davfs2 caches in ~/.davfs2/cache. A large file is written there first and only then uploaded — so a copy can look finished while it is still on its way.

Prefer rclone? rclone config → type webdav → vendor{' '} other → URL as above. It handles interrupted transfers better.
)} {tab === 'files' && (

GNOME Files, Dolphin, Nemo and Thunar all speak WebDAV natively — but they want their own scheme, not https://:

GNOME Files: Other Locations at the bottom of the sidebar → Connect to Server → paste the address → Connect. KDE Dolphin: type the address straight into the location bar (Ctrl + L). Dolphin also accepts{' '} {kioURL}. Username {username}, password = your app password. Tick “remember” so the keyring keeps it. Right-click the mount in the sidebar → Add Bookmark, and it stays one click away. These mounts live in GVFS/KIO, not in the kernel — they show up in the file manager, but not always for other programs. If a tool cannot see the files, look under /run/user/$(id -u)/gvfs/{' '} or mount with davfs2 instead (the terminal tab).
)}
) }