Skip to content

Commit 9115c35

Browse files
committed
Update Hetzner Object Storage config to match official format
- Use correct endpoint format: https://fsn1.your-objectstorage.com - Update region to fsn1 (only available Hetzner region) - Use HETZNER_* environment variables instead of AWS_* - Remove force_path_style (not needed with correct endpoint) - Update all documentation to match blog post recommendations
1 parent a2b6279 commit 9115c35

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

HETZNER_SETUP.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This app uses Hetzner Object Storage (S3-compatible) for image uploads.
99
1. Go to [Hetzner Cloud Console](https://console.hetzner.cloud/)
1010
2. Navigate to "Object Storage"
1111
3. Create a new Object Storage instance
12-
4. Choose region (recommend `eu-central`)
12+
4. Choose region `fsn1` (currently the only available region)
1313
5. Create a bucket (e.g., `pyramid-scheme-uploads`)
1414

1515
### 2. Get Access Credentials
@@ -24,20 +24,20 @@ Copy `.env.example` to `.env` and fill in your values:
2424

2525
```bash
2626
# Your Hetzner Object Storage credentials
27-
AWS_ACCESS_KEY_ID=your_hetzner_access_key
28-
AWS_SECRET_ACCESS_KEY=your_hetzner_secret_key
29-
AWS_REGION=eu-central
30-
AWS_BUCKET=your-bucket-name
31-
AWS_ENDPOINT=https://your-project.hetzner.eu-central.objects.s3.cloud
27+
HETZNER_ACCESS_KEY_ID=your_hetzner_access_key
28+
HETZNER_SECRET_ACCESS_KEY=your_hetzner_secret_key
29+
HETZNER_REGION=fsn1
30+
HETZNER_BUCKET=your-bucket-name
31+
HETZNER_ENDPOINT=https://fsn1.your-objectstorage.com
3232
```
3333

3434
### 4. Find Your Endpoint URL
3535

36-
Your endpoint URL format: `https://{your-project-id}.{region}.objects.s3.cloud`
36+
Your endpoint URL format: `https://fsn1.your-objectstorage.com`
3737

38-
Example: `https://12345678.eu-central.objects.s3.cloud`
38+
Replace "your-objectstorage" with your actual object storage subdomain from Hetzner Cloud Console.
3939

40-
You can find this in the Hetzner Cloud Console under Object Storage details.
40+
Note: At the time of writing, Hetzner Object Storage is only available in region "fsn1".
4141

4242
## Testing
4343

PRODUCTION_ENV.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ RAILS_MAX_THREADS=5
2626

2727
```bash
2828
# Hetzner Object Storage credentials
29-
AWS_ACCESS_KEY_ID=your_hetzner_access_key
30-
AWS_SECRET_ACCESS_KEY=your_hetzner_secret_key
31-
AWS_REGION=eu-central
32-
AWS_BUCKET=your-bucket-name
33-
AWS_ENDPOINT=https://your-project.hetzner.eu-central.objects.s3.cloud
29+
HETZNER_ACCESS_KEY_ID=your_hetzner_access_key
30+
HETZNER_SECRET_ACCESS_KEY=your_hetzner_secret_key
31+
HETZNER_REGION=fsn1
32+
HETZNER_BUCKET=your-bucket-name
33+
HETZNER_ENDPOINT=https://fsn1.your-objectstorage.com
3434
```
3535

3636
## Application Specific

app/views/home/index.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- Hero Section -->
2-
<div class="bg-gradient-to-r from-blue-600 to-purple-600 rounded-xl p-8 mb-8 text-white">
2+
<div class="bg-gradient-to-r from-hackclub-red to-hackclub-orange rounded-xl p-8 mb-8 text-white">
33
<div class="text-center max-w-4xl mx-auto">
44
<h1 class="text-4xl md:text-6xl font-bold mb-6">
55
Earn iPads, Framework Laptops, and More by Inviting High Schoolers to Code This Summer
@@ -9,12 +9,12 @@
99
</p>
1010
<% if logged_in? %>
1111
<%= link_to user_dashboard_path,
12-
class: "inline-flex items-center px-8 py-4 bg-white text-blue-600 font-bold text-lg rounded-lg hover:bg-gray-50 transition-colors shadow-lg" do %>
12+
class: "inline-flex items-center px-8 py-4 bg-hackclub-yellow text-gray-900 font-bold text-lg rounded-lg hover:bg-white transition-colors shadow-lg" do %>
1313
Get My Referral Link →
1414
<% end %>
1515
<% else %>
1616
<%= link_to "/login",
17-
class: "inline-flex items-center px-8 py-4 bg-white text-blue-600 font-bold text-lg rounded-lg hover:bg-gray-50 transition-colors shadow-lg" do %>
17+
class: "inline-flex items-center px-8 py-4 bg-hackclub-yellow text-gray-900 font-bold text-lg rounded-lg hover:bg-white transition-colors shadow-lg" do %>
1818
Get My Referral Link →
1919
<% end %>
2020
<% end %>

config/storage.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ local:
99
# Hetzner Object Storage (S3 compatible)
1010
hetzner:
1111
service: S3
12-
access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
13-
secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
14-
region: <%= ENV.fetch("AWS_REGION") { "eu-central" } %>
15-
bucket: <%= ENV["AWS_BUCKET"] %>
16-
endpoint: <%= ENV.fetch("AWS_ENDPOINT") { "https://your-project.hetzner.eu-central.objects.s3.cloud" } %>
17-
force_path_style: true
12+
endpoint: <%= ENV.fetch("HETZNER_ENDPOINT") { "https://fsn1.your-objectstorage.com" } %>
13+
access_key_id: <%= ENV["HETZNER_ACCESS_KEY_ID"] %>
14+
secret_access_key: <%= ENV["HETZNER_SECRET_ACCESS_KEY"] %>
15+
region: <%= ENV.fetch("HETZNER_REGION") { "fsn1" } %>
16+
bucket: <%= ENV["HETZNER_BUCKET"] %>
1817

1918
# Remember not to checkin your GCS keyfile to a repository
2019
# google:

0 commit comments

Comments
 (0)