Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
S3 Object Storage
Mount
Step 1 - Installation
- For Ubuntu/Debian:
sudo apt-get update sudo apt-get install s3fs
Step 2 - Configure Access Credentials and mount point
For Hetzner Object Storage, create access credentials in the Hetzner Cloud Console
- Create a credentials file:
echo "ACCESS_KEY_ID:SECRET_ACCESS_KEY" | sudo tee /root/.passwd-s3fs > /dev/null
- Set proper permissions:
sudo chmod 600 /root/.passwd-s3fs
- Create the mount point
sudo mkdir /mnt/s3storage
Step 3 - Mounting Options
In the mount commands, replace <bucket_name> and https://nbg1.your-objectstorage.com/ with your actual bucket name and endpoint.
If you use Hetzner Object Storage, the URL must be chosen according to the region where your Bucket was created. You can find your region in the Hetzner Cloud Console under „Object Storage“. You can find a list of available regions and endpoints in their Object Storage overview. Example: If your Bucket was created in Nuremberg, use the URL https://nbg1.your-objectstorage.com in your mount commands and fstab. You cannot change the region after the Bucket was created.
Note: An incorrect endpoint URL will result in connection errors.
Add this line to /etc/fstab:
s3fs#<bucket_name> /mnt/s3storage fuse _netdev,allow_other,use_path_request_style,url=https://nbg1.your-objectstorage.com/,use_cache=/tmp/s3fs,multipart_size=100,parallel_count=8,big_writes,kernel_cache,umask=0022,enable_noobj_cache,retries=5,ensure_diskfree=20000,connect_timeout=180,max_dirty_data=1024,max_stat_cache_size=100000,passwd_file=/root/.passwd-s3fs 0 0
s3fs#<bucket_name> /mnt/s3storage fuse _netdev,url=https://nbg1.your-objectstorage.com/,passwd_file=/root/.passwd-s3fs 0 0
Docker Plugin
The FUSE driver is a prerequisite for rclone mounting and should be installed on host:
sudo apt-get -y install fuse3
Create two directories required by rclone docker plugin:
sudo mkdir -p /var/lib/docker-plugins/rclone/config sudo mkdir -p /var/lib/docker-plugins/rclone/cache
Install the managed rclone docker plugin for your architecture (here amd64):
docker plugin install rclone/docker-volume-rclone:amd64 args="-v" --alias rclone --grant-all-permissions docker plugin list
Run rclone config on another machine equipped with web browser and graphical user interface. Create the Google Drive remote. When done, transfer the resulting rclone.conf to the Swarm cluster and save as /var/lib/docker-plugins/rclone/config/rclone.conf on every node. By default this location is accessible only to the root user so you will need appropriate privileges. The resulting config will look like this:
/var/lib/docker-plugins/rclone/config/rclone.conf
insert:
[hetzner-hel] type = s3 region = hel1 endpoint = hel1.your-objectstorage.com provider = Other env_auth = false access_key_id = access_key_id secret_access_key = secret_access_key acl = private
in Docker compose:
version: '3'
services:
heimdall:
image: linuxserver/heimdall:latest
ports: [8080:80]
volumes: [heimdall_config:/config]
volumes:
heimdall_config:
driver: rclone
driver_opts:
remote: "hetzner-hel:bucket-name"
allow_other: "true"
vfs_cache_mode: "full" # Critical for consistency
poll_interval: 0
