mirror of
https://github.com/JG2401/HetznerDokployLab.git
synced 2026-08-29 04:30:10 +00:00
Wireguard and Backup-Job
This commit is contained in:
60
README.md
60
README.md
@@ -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.
|
||||
@@ -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 (?)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user