Wireguard and Backup-Job

This commit is contained in:
jonas@geiger-natur.de
2026-01-05 20:41:31 +01:00
parent 7bb892fa67
commit 9bd01a99be
3 changed files with 65 additions and 12 deletions

View File

@@ -145,3 +145,63 @@ Every Folder for the Applications will be created automatically based on your do
ls /var/lib/docker/volumes
rclone ls storagebox-crypt:
# Wireguard
- sudo apt install wireguard
- sudo nano /etc/wireguard/wg0.conf
Copy the config into the file and modify it
```
[Interface]
PrivateKey =
Address = 10.8.0.2/24
[Peer]
PublicKey =
PresharedKey =
AllowedIPs = 192.168.1.0/24
PersistentKeepalive = 25
Endpoint =
```
- sudo wg-quick up wg0
- sudo wg
- ping 192.168.1.10
# Backup-Job (with [Wireguard](#wireguard) & Rclone)
- Run `nano ~/.config/rclone/rclone.conf` again and append the following modified configuration.
```
[nas]
type = smb
host = 192.168.x.x
user = your_nas_username
pass = your_nas_password
```
after that run `rclone sync storagebox-crypt: nas:/YourShareName --progress --checksum` to sync the data manually.
To run the sync automatically create a sh-file with `nano /usr/local/bin/backup_storagebox.sh`
```
# Start WireGuard VPN
sudo wg-quick up wg0
sleep 5
rclone sync storagebox-crypt: nas:/YourShareName --progress --checksum
sudo wg-quick down wg0
```
Then make the script executable with `sudo chmod +x /usr/local/bin/backup_storagebox.sh`
Edit cronjob file with `crontab -e`
and add `0 2 * * * /usr/local/bin/backup_storagebox.sh >> /var/log/backup_storagebox.log 2>&1` for example. This runs every day at 2:00 AM then.

View File

@@ -1,9 +1,6 @@
## Apps
### External storage support
@@ -13,10 +10,5 @@ Enable `External storage support` and create a new external storage in the admin
- Foldername: `StorageBox`
- External storage: `local`
- Authentication: `None`
- Configuration: `/mnt/storagebox/data`
- Configuration: `/mnt/storagebox`
- Available for `All people`
### File access control (?)

View File

@@ -5,8 +5,9 @@ services:
environment:
DOMAIN: ${DOMAIN}
SIGNUPS_ALLOWED: ${SIGNUPS_ALLOWED}
ADMIN_TOKEN: ${ADMIN_TOKEN}
volumes:
- /mnt/storagebox-crypt/vaultwarden:/data
- vaultwarden:/data
expose:
- 80