Here’s a complete guide for setting up DavFS to mount a Hetzner Storage Box on a cPanel server (AlmaLinux or CloudLinux) while maintaining compatibility and security:
Example details:
- Username:
uxxxxxx-subx
- Password:
password
- Mount Point:
/backup
- Storage Box URL:
https://uxxxxxx-subx.your-storagebox.de
1. π Create a Mount Directory
mkdir -p /backup
2. π¦ Enable EPEL Repository (Required for davfs2)
yum -y install epel-release
3. πΎ Install davfs2 Package
yum -y install davfs2
4. π Disable EPEL Repository (to prevent future cPanel issues)
Edit the EPEL repository config:
nano /etc/yum.repos.d/epel.repo
Find:
enabled=1
Change to:
enabled=0
5. π Add Storage Box Credentials
Edit the /etc/davfs2/secrets
file:
nano /etc/davfs2/secrets
Add the following line at the bottom:
https://uxxxxxx-subx.your-storagebox.de uxxxxxx-subx password
Make sure this file is secured:
chmod 600 /etc/davfs2/secrets
6. π Mount the Storage Box
mount -t davfs https://uxxxxxx-subx.your-storagebox.de /backup
You can now access your storage box contents via
/backup
.
7. π Optional: Automount on Boot
Add the following line to /etc/fstab
:
https://uxxxxxx-subx.your-storagebox.de /backup davfs _netdev,defaults 0 0
π§Ό Notes
- You must not leave EPEL enabled after installation, as it may interfere with cPanel updates.
- Ensure
davfs2
has access to network mounts, especially on reboot (_netdev
ensures that).