Skip to content

Commit 256dc4c

Browse files
committed
README prettier formatting
1 parent 4882098 commit 256dc4c

File tree

1 file changed

+18
-9
lines changed
  • registry/melmathari/templates/hetzner-cloud

1 file changed

+18
-9
lines changed

registry/melmathari/templates/hetzner-cloud/README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ tags: [vm, linux, hetzner, cloud, germany]
1111
Provision Hetzner Cloud servers as [Coder workspaces](https://coder.com/docs/workspaces) with this template.
1212

1313
This template provides a comprehensive Hetzner Cloud setup with:
14+
1415
- **Dynamic Configuration**: Server types, locations, and images loaded from JSON
15-
- **Smart Validation**: Prevents invalid server type/location combinations
16+
- **Smart Validation**: Prevents invalid server type/location combinations
1617
- **Multiple Server Types**: Shared, dedicated, and CPU-optimized instances
1718
- **Global Locations**: Germany, Finland, and USA datacenters
1819
- **Persistent Storage**: Home volumes that survive workspace restarts
@@ -45,8 +46,8 @@ export HCLOUD_TOKEN="your-hetzner-cloud-api-token"
4546

4647
# List all available images
4748
curl -s -H "Authorization: Bearer $HCLOUD_TOKEN" \
48-
"https://api.hetzner.cloud/v1/images" | \
49-
jq '.images[] | select(.type=="system") | .name'
49+
"https://api.hetzner.cloud/v1/images" \
50+
| jq '.images[] | select(.type=="system") | .name'
5051
```
5152

5253
If you encounter image-related errors, check that the image names in `hetzner-config.json` match the official names exactly (some may include architecture suffixes like `-amd64`).
@@ -74,8 +75,9 @@ This means that when the workspace restarts, any tools or files outside of the h
7475
The template supports all major Hetzner Cloud server types:
7576

7677
### Shared vCPU (Cost-effective)
78+
7779
- **CX11**: 1 vCPU, 4 GB RAM
78-
- **CX21**: 2 vCPU, 8 GB RAM
80+
- **CX21**: 2 vCPU, 8 GB RAM
7981
- **CX22**: 2 vCPU, 4 GB RAM (AMD)
8082
- **CX31**: 2 vCPU, 8 GB RAM
8183
- **CX32**: 4 vCPU, 8 GB RAM (AMD)
@@ -85,6 +87,7 @@ The template supports all major Hetzner Cloud server types:
8587
- **CX52**: 16 vCPU, 32 GB RAM (AMD)
8688

8789
### Dedicated vCPU (High Performance)
90+
8891
- **CCX13**: 2 vCPU, 8 GB RAM
8992
- **CCX23**: 4 vCPU, 16 GB RAM
9093
- **CCX33**: 8 vCPU, 32 GB RAM
@@ -93,6 +96,7 @@ The template supports all major Hetzner Cloud server types:
9396
- **CCX63**: 48 vCPU, 192 GB RAM
9497

9598
### CPU-Optimized
99+
96100
- **CPX11**: 2 vCPU, 2 GB RAM
97101
- **CPX21**: 3 vCPU, 4 GB RAM
98102
- **CPX31**: 4 vCPU, 8 GB RAM
@@ -102,6 +106,7 @@ The template supports all major Hetzner Cloud server types:
102106
## Locations
103107

104108
Available locations:
109+
105110
- **Falkenstein, Germany** (fsn1) - Primary location
106111
- **Nuremberg, Germany** (nbg1) - Secondary location
107112
- **Helsinki, Finland** (hel1) - EU Nordic
@@ -134,11 +139,12 @@ hcloud_token = "your-hetzner-cloud-api-token"
134139
The template uses `hetzner-config.json` for dynamic configuration:
135140

136141
- **Server Types**: Add new server types with their specifications
137-
- **Locations**: Add new Hetzner datacenters as they become available
142+
- **Locations**: Add new Hetzner datacenters as they become available
138143
- **Images**: Update with current Hetzner image names (verify with API)
139144
- **Availability**: Map server type restrictions per location
140145

141146
**Example**: Adding a new server type:
147+
142148
```json
143149
"cx62": { "name": "CX62 (16 vCPU, 64 GB RAM, AMD)", "vcpus": 16, "memory": 64 }
144150
```
@@ -160,7 +166,7 @@ All other parameters can be configured through the Coder workspace creation inte
160166
You can use custom images in two ways:
161167

162168
1. **Override Field**: Leave the "Custom Image Override" field empty to use the selected OS, or enter a custom image name to override it
163-
2. **Examples**:
169+
2. **Examples**:
164170
- `my-custom-snapshot` - Your own Hetzner Cloud snapshot
165171
- `debian-12-amd64` - Specific architecture variant
166172
- `ubuntu-24.04` - Newer image not yet in the dropdown list
@@ -194,14 +200,15 @@ The template includes validation to prevent selecting server types that aren't a
194200
If you get errors like "image not found" or "invalid image name":
195201

196202
1. **Verify Image Names**: Check current available images using the API:
203+
197204
```bash
198205
curl -s -H "Authorization: Bearer $HCLOUD_TOKEN" \
199-
"https://api.hetzner.cloud/v1/images" | \
200-
jq '.images[] | select(.type=="system") | .name' | sort
206+
"https://api.hetzner.cloud/v1/images" \
207+
| jq '.images[] | select(.type=="system") | .name' | sort
201208
```
202209

203210
2. **Update JSON Configuration**: Edit `hetzner-config.json` to match exact image names from Hetzner
204-
3. **Common Issues**:
211+
3. **Common Issues**:
205212
- Some images may have architecture suffixes (e.g., `debian-12` vs `debian-12-amd64`)
206213
- Image names may change over time as new versions are released
207214
- Deprecated images are removed from the available list
@@ -219,13 +226,15 @@ If you get errors like "image not found" or "invalid image name":
219226
### Volume Mount Issues
220227

221228
If the home directory doesn't mount properly:
229+
222230
1. Check that the volume is attached to the server
223231
2. Verify the cloud-init configuration is applied correctly
224232
3. Ensure the filesystem is formatted as ext4
225233

226234
### Network Connectivity Issues
227235

228236
If you can't connect to development servers:
237+
229238
1. Verify firewall rules allow the required ports
230239
2. Check that the private network is configured correctly
231240
3. Ensure the server has a public IP address

0 commit comments

Comments
 (0)