βœ… Setup DavFS on cPanel Server for Hetzner Storage Box

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).
Scroll to Top