Docs

Hetzner Object Storage

10 min readUpdated November 9, 2026

Hetzner Object Storage is S3-compatible storage hosted in Hetzner data centres in Germany and Finland. It suits sites that want their media stored in the EU. WP Media Cloud uploads your Media Library to a Hetzner bucket. It then serves every file from the bucket’s public address, or from a CDN in front of it.

This guide takes about 10 minutes.

Before you start#

  • A Hetzner account with a project. Object Storage lives inside a project in the Hetzner Console.
  • A CDN for busy sites (recommended). Hetzner says Object Storage is not a CDN. It recommends a third-party CDN in front of it for high-volume delivery. Without one, you can serve files straight from the bucket.
  • WP Media Cloud 1.1.8 or newer. It lets you type the bucket name in the setup wizard and keeps your CDN choice when you save Settings.

Step 1: Create a bucket#

  1. In the Hetzner Console, open your project.
  2. In the left menu, select Object Storage.
  3. Select Create Bucket.
  4. Under Location, choose Falkenstein, Nuremberg or Helsinki. WP Media Cloud supports these three locations. Note which one you chose.
  5. Under Name/URL, enter a name, for example example-media.
  6. Under Visibility, choose Public. See Step 2 for why.
  7. Select Create & Buy now.

Bucket names use 3 to 63 lowercase letters, numbers and hyphens. They must be unique across all Hetzner users and locations. You cannot rename a bucket later.

The location codes are:

LocationCodeEndpoint
Falkenstein, Germanyfsn1fsn1.your-objectstorage.com
Nuremberg, Germanynbg1nbg1.your-objectstorage.com
Helsinki, Finlandhel1hel1.your-objectstorage.com

Step 2: Make your files public#

Visitors must be able to load your images without keys. A Public bucket gives anyone read access, while uploads and deletes still need your keys. Nobody can list the bucket’s contents.

Your bucket’s public address is:

https://example-media.fsn1.your-objectstorage.com

Replace example-media with your bucket name and fsn1 with your location code. WP Media Cloud uses this address automatically when you do not set a CDN.

If you already created a Private bucket: open the three-dot menu next to the bucket and select Reset visibility/policy. Hetzner advises making a bucket public only while it is empty, and checking for sensitive files first.

About object ACLs: WP Media Cloud sends x-amz-acl: public-read with every Hetzner upload by default. You can change this under Settings, in the Object Permissions card. Keep public-read unless a bucket policy already grants public access.

Optional: Put a CDN in front of the bucket#

Hetzner does not include a CDN. WP Media Cloud can serve files through one of these, chosen in the setup wizard or in Settings:

Option in WP Media CloudWhat it does
Direct bucket URL (wizard) or Direct Bucket (Settings)No CDN. Files load from the bucket address above.
Custom CDNAny CDN or custom domain. You type its URL.
Bunny.net CDNPaste a Bunny API key, select Load Zones, then pick your pull zone.
KeyCDNPaste a KeyCDN API key, load your zones and pick one.
EWWW Easy IOPaste your EWWW API key, load your sites and pick one.
CDN77Paste a CDN77 API token, load your resources and pick one.

Create the pull zone or CDN resource first, with your bucket’s public address as its origin. Bunny, KeyCDN, EWWW and CDN77 also add CDN bandwidth figures to the Dashboard.

WP Media Cloud stores every file with a Cache-Control: public, max-age=31536000, immutable header. CDNs and browsers can cache each file for a year. Replaced files get a new file name, so this is safe.

Step 3: Create S3 credentials#

  1. In your project, select Security in the left menu.
  2. Select S3 Credentials in the top menu.
  3. Select Generate credentials.
  4. Enter a description you will recognise, such as WP Media Cloud - example.com, and create the credentials.
  5. Copy the access key (top box) and the secret key (bottom box) into a password manager.

Copy the secret key now. Hetzner cannot show it again once you close the window. If you lose it, generate new credentials.

Hetzner credentials cover the whole project. By default, each key pair can read and write every bucket in the project, including buckets created later. To limit a key to one bucket, Hetzner uses bucket policies. A simpler option is to keep your WordPress buckets in their own project.

Step 4: Connect WP Media Cloud#

Setup wizard Connect step for Hetzner Object Storage

In WordPress, open Media Cloud in the admin menu. The setup wizard opens on first use. Choose Hetzner and select Continue.

FieldWhat to enter
RegionThe location from Step 1: Falkenstein DE (fsn1), Nuremberg DE (nbg1) or Helsinki FI (hel1). The menu starts on fsn1.
Access KeyThe access key from Step 3
Secret KeyThe secret key from Step 3
Bucket nameType your bucket name from Step 1, for example example-media
CDN ConfigurationDirect bucket URL to serve from the bucket, or one of the CDN options from Step 2
CDN URLOnly for Custom CDN. For example, https://media.example.com. Do not add the bucket name or a trailing path.

Load is optional. It fills a list of your buckets to pick from. It stays greyed out until both keys are filled in.

The Hetzner screen has no Test connection button. WP Media Cloud checks access when it first uploads a file.

Step 5: Finish#

  1. Select Continue.
  2. On the All set! screen, select Save & Go to Dashboard.
  3. Upload a test image in Media > Add New Media File.
  4. Open the image in the Media Library and check that its file URL starts with your bucket address or CDN URL.
  5. Open that URL in a private browser window. The image should load.

If the image stays on your server or does not load, see Troubleshooting below.

Changing your bucket or keys later#

Hetzner CDN card in Settings

Go to Settings and select run the setup wizard. Your offloaded files, records and other settings are kept.

The wizard opens with your saved region, bucket, CDN choice and CDN URL filled in. Saved keys show as Saved. Paste only the keys you are changing.

Alternative: Connect with wp-config.php#

wp-config.php constants for Hetzner Object Storage from the setup wizard

Instead of the wizard, you can define your settings in wp-config.php, above the line /* That's all, stop editing! */. Values set here override anything saved in the admin. This suits sites managed in version control.

Multisite: constants in wp-config.php apply to every subsite, so they point every subsite at the same bucket. That works when each subsite keeps its files in its own folder: also add define( 'WPMC_PATH_PREFIX', 'sites/%site_id%' );. Or set up each subsite in its own dashboard. See Custom path prefix.

// Required
define( 'WPMC_PROVIDER',           'hetzner' );
define( 'WPMC_HETZNER_REGION',     'fsn1' ); // fsn1 | nbg1 | hel1
define( 'WPMC_HETZNER_ACCESS_KEY', 'your-access-key' );
define( 'WPMC_HETZNER_SECRET_KEY', 'your-secret-key' );
define( 'WPMC_HETZNER_BUCKET',     'example-media' );

// Optional: serve through a CDN or custom domain.
// Without these, files load from https://example-media.fsn1.your-objectstorage.com
define( 'WPMC_HETZNER_CDN_TYPE',   'custom' ); // none | custom | bunny | keycdn | ewww | cdn77
define( 'WPMC_HETZNER_CDN_URL',    'https://media.example.com' );

// Optional: object ACL. Default is public-read.
define( 'WPMC_HETZNER_ACL',        'public-read' ); // public-read | private
Code
// Required
define( 'WPMC_PROVIDER',           'hetzner' );
define( 'WPMC_HETZNER_REGION',     'fsn1' ); // fsn1 | nbg1 | hel1
define( 'WPMC_HETZNER_ACCESS_KEY', 'your-access-key' );
define( 'WPMC_HETZNER_SECRET_KEY', 'your-secret-key' );
define( 'WPMC_HETZNER_BUCKET',     'example-media' );

// Optional: serve through a CDN or custom domain.
// Without these, files load from https://example-media.fsn1.your-objectstorage.com
define( 'WPMC_HETZNER_CDN_TYPE',   'custom' ); // none | custom | bunny | keycdn | ewww | cdn77
define( 'WPMC_HETZNER_CDN_URL',    'https://media.example.com' );

// Optional: object ACL. Default is public-read.
define( 'WPMC_HETZNER_ACL',        'public-read' ); // public-read | private

The first five lines are required. The rest are optional.

For other CDNs, the generator also prints optional constants such as WPMC_HETZNER_BUNNY_API_KEY, WPMC_HETZNER_PULL_ZONE_HOSTNAME, WPMC_HETZNER_KEYCDN_ZONE_URL, WPMC_HETZNER_EWWW_API_KEY and WPMC_HETZNER_CDN77_URL. WP Media Cloud reads every one of them. The Health page and the Dashboard read the constants too.

After setup#

  • New uploads go to Hetzner automatically and are served from your bucket address or CDN URL.
  • Existing media is not moved until you start a bulk offload. Open the Dashboard and select Offload All Media in the Bulk Offload card. On large libraries or multisite, wp wpmc offload (or wp wpmc offload --network) is faster.
  • Changing your CDN URL later: in Settings, open the Hetzner Object Storage CDN card. Choose your CDN option and enter the new URL. Under Apply to Existing Media, select Update all media URLs, then select Save Settings.
  • Dashboard stats: Hetzner does not report storage usage to WP Media Cloud, so Storage Used shows N/A. The file count comes from WP Media Cloud’s own records. Bandwidth appears only with Bunny, KeyCDN, EWWW Easy IO or CDN77 selected as your CDN.
  • WooCommerce secure downloads (signed, short-lived links) are available with Bunny.net and Cloudflare R2 only. For Hetzner, the WooCommerce card says so, and downloadable files use their normal CDN URL. Update WooCommerce Download URLs still works.

Troubleshooting#

Upload errors appear in the Bulk Offload card on the Dashboard, with the reason. They look like HTTP 403 AccessDenied: Access Denied.

What you seeWhat it meansHow to fix it
Load shows an errorHetzner refused the bucket list. The keys are wrong, or the wrong Region is selected. The wizard shows the error below the field.Type the bucket name instead. Check both keys have no spaces at either end, and that Region matches your bucket.
Load is greyed outOne of the keys is empty.Type the bucket name, or fill in both Access Key and Secret Key.
InvalidAccessKeyId or SignatureDoesNotMatchThe access key or secret key is wrong.Paste both again. If you are unsure of the secret, generate new credentials (Step 3).
AccessDenied or HTTP 403 on uploadThe key cannot write to this bucket. This happens when a bucket policy limits access to other keys.Use credentials from the bucket’s own project, or update the bucket policy to allow this key.
NoSuchBucket or HTTP 404The bucket name or region does not match.Check the bucket name and its location in the Hetzner Console. Run the setup wizard again with the right Region.
“Hetzner Object Storage not fully configured. Missing: …”A required setting is empty.Run the setup wizard again, or check your wp-config.php constants.
“No response from storage provider” or a cURL errorYour server could not reach Hetzner.Check your server’s outgoing connections and firewall, then retry the failed items.
Images are broken on the site, or the file URL shows 403The bucket is Private and the files were not uploaded as public.Make the bucket Public (Step 2). This covers files already in the bucket. Changing Object ACL in Settings only affects new uploads.
Images are broken and the URL shows 404The CDN URL or CDN origin is wrong.Open a file using your bucket address. If that works, fix the CDN’s origin or the CDN URL.
New uploads stay on your serverOffload on upload is switched off. Before 1.1.7.1, finishing the setup wizard could switch it off.In Settings, turn on Offload on upload and Rewrite URLs, then select Save Settings.
Browser console shows CORS errorsA script is fetched from the bucket’s domain, or a font while Serve fonts from your site is off. Fonts load from your site by default and need no CORS. Ordinary images and video do not need CORS.On the Health tab, run the Web Fonts (CORS) check and click Allow this site to add the rule to the bucket. If the button is not shown, your access key cannot change the bucket’s CORS rules: add a CORS policy to the bucket that allows GET from your site’s address. Hetzner says a CORS change can take up to 15 minutes to apply.

Frequently asked questions#

Can I limit the keys to one bucket? Not in the Hetzner Console. Credentials work for every bucket in their project. You can restrict a key with a bucket policy, or keep your WordPress buckets in a separate project.

Do I need a CDN? No, but it is recommended for busy sites. Hetzner describes Object Storage as unsuitable for high-volume delivery to visitors. Its public limits include 750 requests per second per bucket.

Where is my data stored? In the location you chose. Hetzner keeps each bucket’s data in that one location. All three supported locations are in the EU.

Can I use one bucket for several sites? Yes, when each site has its own path prefix. WP Media Cloud stores files by upload date and file name, such as 2026/10/photo.jpg, so two sites without a prefix can overwrite each other’s files. On a multisite network, set Path prefix to sites/%site_id%. For separate sites, give each one a prefix of its own, such as shop and blog. A staging site should still use its own bucket. See Custom path prefix.

Why does WP Media Cloud send a public-read ACL? Hetzner objects are private unless something makes them public. The ACL makes each uploaded file readable even if the bucket is not set to Public. If your bucket is already Public, the ACL does no harm.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only