StorageStorage ServicesHetzner

Hetzner

Hetzner Object Storage

Just need ad-hoc uploads? Wrap this adapter in the Files facade for a one-liner API. The reference below shows direct adapter usage — pick that path when you're hosting an upload server.

Overview

Hetzner Object Storage is an S3-compatible object storage service hosted in Hetzner data centers (Falkenstein, Nuremberg, Helsinki). It's priced per TB and well-suited for European workloads with data-residency requirements.

Installation

npm install @aws-sdk/client-s3 @aws-sdk/credential-providers @aws-sdk/s3-request-presigner @aws-sdk/signature-v4-crt aws-crt @aws-sdk/types

Usage

Hetzner Object Storage is S3-compatible, so use the S3Storage with the Hetzner endpoint:

import { S3Storage } from "@visulima/storage/provider/aws";
import { hetzner } from "@visulima/storage/provider/aws/s3/clients";

const clientConfig = hetzner({
    accessKeyId: process.env.HETZNER_ACCESS_KEY_ID!,
    secretAccessKey: process.env.HETZNER_SECRET_ACCESS_KEY!,
    location: "fsn1", // fsn1 | nbg1 | hel1
});

const storage = new S3Storage({
    bucket: "my-bucket",
    ...clientConfig,
});

Configuration

Locations

CodeSite
fsn1Falkenstein, DE
nbg1Nuremberg, DE
hel1Helsinki, FI

The location is used as both the AWS region and the endpoint subdomain (https://<location>.your-objectstorage.com).

Environment Variables

process.env.HETZNER_ACCESS_KEY_ID = "your-access-key";
process.env.HETZNER_SECRET_ACCESS_KEY = "your-secret-key";
process.env.HETZNER_LOCATION = "fsn1";

const clientConfig = hetzner(); // Uses environment variables
const storage = new S3Storage({
    bucket: "my-bucket",
    ...clientConfig,
});

With Explicit Parameters

const clientConfig = hetzner({
    accessKeyId: "your-access-key",
    secretAccessKey: "your-secret-key",
    location: "nbg1",
});

Features

  • EU data residency: All locations are in the EU (Germany, Finland)
  • S3-Compatible: Works with the AWS S3 SDK and any S3-compatible tooling
  • Flat pricing: Transparent per-TB pricing with no surprise egress fees on most plans

Best Practices

  1. Pin your location — keep buckets close to your compute to minimize latency
  2. Use environment variables — never hard-code keys
  3. Configure CORS in the Hetzner console for browser uploads
  4. Generate scoped keys per environment / service via the Hetzner console
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues