From e012603ff674ffb5b8b20b9739838ae043425936 Mon Sep 17 00:00:00 2001 From: "jonas@geiger-natur.de" Date: Tue, 23 Dec 2025 15:51:15 +0100 Subject: [PATCH] README Hetzner Storage Box --- README.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6c17a3..1cdf317 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,107 @@ ## Step 4 - Install Dokploy -Run `curl -sSL https://dokploy.com/install.sh | sh` in the Terminal \ No newline at end of file +Run `curl -sSL https://dokploy.com/install.sh | sh` in the Terminal + + +# Hetzner Storage Box (optional) + +If you want more and cheap storage you can use [Hetzner Storage Box](https://docs.hetzner.com/de/storage/storage-box/) and connect it via [rclone](https://rclone.org/) for encrypted access. + +## Step 1 - Setup Hetzner Storage Box + + + +## Step 2 - Connect to Dokploy-Server via SSH + +- Run `ssh root@your-server-ip-address` + +## Step 3 - Install Rclone + +- Connect to your VPS Server via SSH +- Run `apt install rclone` + +## Step 4 - Create a SSH Key for Rclone + +- Run `ssh-keygen -t ed25519 -f ~/.ssh/storagebox -C "DokployStorageBox"` +- Hit Enter twice to set no passphrase +- Run `ssh-keyscan uXXXXX.your-storagebox.de >> ~/.ssh/known_hosts` + +- Execute `cat ~/.ssh/storagebox.pub` then to get the public key. +- Copy that key and add it to your Hetzner project ssh keys + +## Step 5 - [Rclone Config](https://docs.hetzner.com/storage/storage-box/access/access-ssh-rsync-borg#rclone) + +- Run this command with your password `rclone obscure YOURSUPERSECUREPASSWORD` and copy the result. +- Run `nano ~/.config/rclone/rclone.conf` and paste the following code with your values for host, user and pass. + +``` conf +[storagebox] +type = sftp +host = uXXXXX.your-storagebox.de +user = uXXXXX +port = 23 +pass = +``` + +## Step 6 - Testing + +- Run `rclone ls storagebox:` to test the connection +You should get a result like `247 .ssh/authorized_keys`. + +## Step 7 - Create Directory + +- Run `rclone mkdir storagebox:data` to create a data-folder +- Run `rclone lsd storagebox:` to check + +## Step 8 - Encryption + +- Generate 2 new passwords and create the hash with `rclone obscure` +- Run `nano ~/.config/rclone/rclone.conf` again and append the following code with your password & password2 + +``` conf +[storagebox-crypt] +type = crypt +remote = storagebox:data +filename_encryption = standard +directory_name_encryption = true +password = YOUR_ENCRYPTION_PASSWORD +password2 = YOUR_SALT_PASSWORD +``` + +## Step 9 - Mount Directory + +- Run `mkdir -p /mnt/storagebox-crypt` to crate a mount directory +- Run `nano /etc/systemd/system/rclone-storagebox-crypt.service` + +``` +[Unit] +Description=Mount rclone encrypted Storage Box +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/rclone mount storagebox-crypt: /mnt/storagebox-crypt \ + --allow-other \ + --buffer-size 256M \ + --dir-cache-time 12h \ + --vfs-cache-mode writes \ + --vfs-cache-max-size 512M \ + --vfs-read-chunk-size 64M \ + --vfs-read-chunk-size-limit 256M \ + --poll-interval 1m \ + --timeout 1m \ + --log-level INFO +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target +``` + +With this the local mount directory will be connected with the storagebox. + +- Then Run `systemctl start rclone-storagebox-crypt.service` +- Now you should create a folder for every service `mkdir /mnt/storagebox-crypt/nextcloud` \ No newline at end of file