Introduction
Integrating cloud object storage as a local file system can significantly simplify workflows and save local disk space. In this article, we will show you step by step how to use Hetzner Object Storage. We will follow Hetzner’s official tutorial on object storage file systems and also compare Hetzner Object Storage with Amazon S3 to highlight advantages and disadvantages.
Hetzner Object Storage vs. Amazon S3 – A Brief Comparison
Many administrators already know Amazon S3 as the standard solution for object storage. Hetzner offers a similar solution that is often cheaper and fits well with European data protection requirements (e.g., GDPR). The following table summarizes the key differences.
Feature | Hetzner Object Storage | Amazon S3 |
Pricing Model | Generally cheaper per GB prices and simpler tariff structure | Often more expensive per GB; complex tariff models (Standard, Infrequent Access, Glacier) |
Regions & Data Centers | Focus on Europe (e.g., Germany, Finland) | Global coverage (various regions on all continents) |
API Compatibility | S3-compatible API for basic functions | Full S3 feature set + advanced services (e.g., event notifications) |
Performance | Good performance for EU-based customers | Due to global distribution, often very low latencies worldwide |
Data Protection | EU-based data centers; advantageous in terms of GDPR | Regionally selectable, but different data protection laws depending on location |
Advanced Features | Basic functions, some S3 features available | Large ecosystem (Lambda triggers, lifecycle policies, etc.) |
Positive Aspects of Hetzner Compared to Amazon S3
- Cost Advantage: Cheaper prices per GB and sometimes lower bandwidth costs.
- Simpler Billing: More manageable structure without many different storage classes.
- GDPR-Friendly: Server locations in the EU for companies with data protection priorities.
Possible Disadvantages
- Fewer Regions: Currently primarily in Europe. For users in other world regions, possibly higher latency.
- Less Ecosystem: Missing some AWS-specific features (e.g., event triggers, wide tool integration).
- Smaller Community: Fewer specialized support tools. However, thanks to S3 compatibility, most things work out-of-the-box.
Requirements
- Hetzner Cloud Account with activated object storage.
- Linux Machine/Server (e.g., Ubuntu, Debian, CentOS).
- Access Key for Hetzner Object Storage (Access Key and Secret Key).

Installation and Configuration of s3fs
1. Install s3fs
apt-get update
apt-get install s3fs
2. Create a file for your credentials
touch ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
nano ~/.passwd-s3fs
Content of the file:
ACCESS_KEY_ID:SECRET_ACCESS_KEY

Mounting Hetzner Object Storage
1. Create mount directory
mkdir /mnt/hetzner-s3
2. Mount object storage for testing with s3fs
s3fs nameOfBucket /mnt/hetzner-s3
-o url=https://chosenRegion.your-objectstorage.com
-o allow_other
-o use_cache=/tmp/s3fs
-o multipart_size=100
-o parallel_count=8
-o big_writes
-o kernel_cache
-o umask=0022
-o enable_noobj_cache
-o retries=5
-o ensure_diskfree=2000
-o connect_timeout=180
-o max_dirty_data=1024
-o max_stat_cache_size=100000
-o passwd_file=/root/.passwd-s3fs
-f -d
The output should look like this. Any errors will also be displayed in the console.

Automatic Mounting at System Start
To ensure that the file system is available again after a restart, add an entry to /etc/fstab:
s3fs#nameOfBucket /mnt/hetzner-s3 fuse _netdev,allow_other,url=https://chosenRegion.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=200,connect_timeout=180,max_dirty_data=1024,max_stat_cache_size=100000,passwd_file=/root/.passwd-s3fs 0 0
Common Pitfalls and Troubleshooting
- Incorrect Region or Bucket Name: Make sure you are using the correct
chosenRegion
. Otherwise, “connection refused” or DNS errors will follow. - Access Rights to the Credentials:
s3fs
requires that the credential file is readable only by the owner (600). - Performance Issues / Latency: If you or your customers are far from Hetzner’s data centers (mostly in Europe), there may be higher latency than with globally distributed AWS regions.

Conclusion
Mounting your Hetzner Object Storage as a local file system is a practical way to seamlessly manage cloud-based data. This is very similar to the approach with Amazon S3, but can be more cost-effective and data protection-friendly in the EU area. Hetzner does without some AWS-specific features and offers fewer regions – for many European users, however, this is not a problem and leads to more straightforward billing.
If you value data protection and cost savings, Hetzner is an attractive alternative to Amazon S3. However, if you need many global regions or advanced AWS services (e.g., serverless events), Amazon S3 may be more suitable.
Further Links
Why with ADMIN INTELLIGENCE?
With ADMIN INTELLIGENCE, you receive professional support and tailored solutions for the integration and use of Hetzner S3 Object Storage. Our experienced team ensures that your data storage is secure, efficient, and optimally tailored to your needs. Rely on our expertise to implement and manage your infrastructure smoothly.