Skip to main content

Hetzner New Server Setup Prompt

Context

Use this prompt when provisioning a new Hetzner Cloud server for Pacing Agency self-hosted services (n8n, TwentyCRM, Notifuse, Remark42, HeadshotAI, etc.).

This prompt will help you:

  • Provision a server with appropriate specifications
  • Configure initial security (firewall, SSH)
  • Install Docker and Docker Compose
  • Set up automated backups
  • Document the server in our infrastructure

Prerequisites

  • Hetzner Cloud account access - Team member with project access
  • Project selected - Know which Hetzner project to use
  • Server specifications - Decided on server type, location, purpose
  • SSH public key - Your SSH key for server access
  • Budget approval - Confirmed monthly cost is approved

See Hetzner Tool Documentation for existing infrastructure and project details.

Prompt Template

I need to set up a new Hetzner Cloud server for Pacing Agency with the following specifications:

**Project Details:**
- Project: [PROJECT_NAME]
- Purpose: [SERVER_PURPOSE]
- Service to host: [SERVICE_NAME]

**Server Specifications:**
- Location: [DATACENTER] (Falkenstein/Nuremberg/Helsinki)
- Server Type: [SERVER_TYPE] (CPX11/CPX21/CPX31/CCX13)
- Operating System: Ubuntu 24.04 LTS
- Additional volumes: [VOLUME_SIZE] (if needed)

**Security Requirements:**
- SSH access only (no password authentication)
- Firewall rules: Allow ports [PORT_LIST]
- Automated security updates: Yes
- Backup schedule: Daily

**Required Software:**
- Docker Engine (latest stable)
- Docker Compose V2
- Basic monitoring tools
- Automatic certificate renewal (if web service)

Please provide:

1. **hcloud CLI commands** to create the server with proper configuration
2. **Initial security hardening** steps:
- SSH configuration
- Firewall setup
- Security updates
- User management
3. **Docker installation** commands and verification
4. **Basic monitoring setup** (health checks, disk space alerts)
5. **Backup configuration** and verification steps
6. **Documentation template** for adding this server to `tools/hetzner.md`

Include:
- Error handling for each step
- Verification commands to ensure each step succeeded
- Troubleshooting tips for common issues
- Estimated time for each section
- Post-setup checklist

Format the output with clear sections, code blocks for commands, and explanations for each step.

Variables to Customize

VariableDescriptionExample
[PROJECT_NAME]Hetzner project name"Pacing n8n"
[SERVER_PURPOSE]What this server will do"n8n automation server for client workflows"
[SERVICE_NAME]Specific service/application"n8n", "TwentyCRM", "Notifuse"
[DATACENTER]Geographic locationFalkenstein (fsn1), Nuremberg (nbg1), Helsinki (hel1)
[SERVER_TYPE]Server size and specsCPX11 (2vCPU, 2GB), CPX21 (3vCPU, 4GB), CPX31 (4vCPU, 8GB), CCX13 (2 dedicated vCPU, 8GB)
[VOLUME_SIZE]Additional storage if needed"80GB", "160GB", or "Not needed"
[PORT_LIST]Required open ports"22 (SSH), 80 (HTTP), 443 (HTTPS)" or "22, 5678 (n8n)"

Choosing Server Specifications

CPX11 (Shared vCPU, 2GB RAM) - €4.51/month

  • Use for: Lightweight services, development, testing
  • Examples: Small n8n instances, staging environments

CPX21 (Shared vCPU, 4GB RAM) - €8.82/month

  • Use for: Medium workloads, production services
  • Examples: Notifuse, Remark42, HeadshotAI

CPX31 (Shared vCPU, 8GB RAM) - €16.38/month

  • Use for: Heavy workloads, database servers
  • Examples: TwentyCRM (with PostgreSQL)

CCX13 (Dedicated vCPU, 8GB RAM) - €55.21/month

  • Use for: Performance-critical services
  • Examples: n8n with many concurrent workflows

See Hetzner pricing for full server options.

Choosing Datacenter Location

Falkenstein (fsn1) - Germany 🇩🇪

  • Primary datacenter for most services
  • Best connectivity to UK/Europe
  • Current: n8n, TwentyCRM, Notifuse, Remark42, HeadshotAI

Nuremberg (nbg1) - Germany 🇩🇪

  • Alternative Germany location
  • Similar performance to Falkenstein
  • Current: Notifuse, Stalwart, Remark42

Helsinki (hel1) - Finland 🇫🇮

  • Northern Europe option
  • Lower latency for Nordic clients
  • Currently: No servers

Expected Output

The AI should provide:

1. Server Provisioning Commands

# Example output format
hcloud server create \
--name "n8n2" \
--type cpx31 \
--image ubuntu-24.04 \
--location fsn1 \
--ssh-key "your-key-name" \
--network "your-network"

# Wait for server to be ready
hcloud server list | grep n8n2

2. Security Hardening Script

# SSH configuration, firewall rules, updates
# Should include UFW configuration
# Should disable password auth
# Should set up fail2ban

3. Docker Installation

# Official Docker installation script
# Docker Compose V2 installation
# Verification commands

4. Monitoring Setup

# Disk space monitoring
# Service health checks
# Log aggregation setup

5. Documentation Template

## [Service Name] Server

- **Project**: [PROJECT_NAME]
- **Server name**: [SERVER_NAME]
- **Server type**: [SERVER_TYPE]
- **Location**: [DATACENTER]
- **Public IP**: [IP_ADDRESS]
- **Purpose**: [SERVER_PURPOSE]
- **Monthly cost**: [COST]
- **Created**: [DATE]

Follow-up Actions

After provisioning the server:

1. Document in Hetzner Tool Doc

Add server details to tools/hetzner.md:

### [Service Name] Server

**Project**: [PROJECT_NAME] (project ID: `[PROJECT_ID]`)
**Server**: `[SERVER_NAME]` ([SERVER_TYPE]: [CPU], [RAM], [DISK])
**Location**: [DATACENTER], [COUNTRY]
**Public IP**: `[IP_ADDRESS]`
**Purpose**: [SERVER_PURPOSE]
**Created**: [DATE]
**Monthly cost**: €[COST]

**Services running**:
- [SERVICE_1] - `https://[DOMAIN1]`
- [SERVICE_2] - `https://[DOMAIN2]`

**Access**: SSH via key, managed via hcloud CLI

2. Configure DNS (if web service)

If the server hosts a web service:

  1. Use Cloudflare DNS Setup prompt
  2. Point subdomain to server IP
  3. Set up SSL certificate

3. Deploy Service

If deploying an application:

  1. Use Docker Compose Service prompt
  2. Configure environment variables
  3. Start services and verify

4. Set Up Monitoring

  • Add server to monitoring dashboard
  • Configure alerts for:
    • CPU usage > 80%
    • RAM usage > 90%
    • Disk usage > 85%
    • Service downtime

5. Verify Backups

Test backup restoration:

# List available backups
hcloud server list-backups [SERVER_ID]

# Test restore (to new test server)
hcloud server create-backup-restore \
--backup [BACKUP_ID] \
--name test-restore

6. Update Team Access

  • Document who has SSH access
  • Share access with relevant team members
  • Add to team inventory

Success Criteria

Before considering the server setup complete, verify:

✅ Server is accessible via SSH with key authentication
✅ Password authentication is disabled
✅ Firewall rules are active and correct
✅ Docker Engine and Compose are installed and running
✅ Security updates are configured (unattended-upgrades)
✅ Backups are enabled and tested
✅ Server is documented in tools/hetzner.md
✅ Team has access to server credentials
✅ Monitoring is configured and alerting works
✅ DNS is configured (if web service)

Common Issues

Issue: SSH connection refused

Symptoms: ssh: connect to host [IP] port 22: Connection refused

Solutions:

  1. Check firewall rules allow port 22:
    hcloud firewall list
    hcloud firewall describe [FIREWALL_ID]
  2. Verify SSH service is running:
    systemctl status sshd
  3. Check server is fully booted (wait 1-2 minutes after creation)

Issue: Docker installation fails

Symptoms: E: Unable to locate package docker-ce

Solutions:

  1. Verify Ubuntu version:
    lsb_release -a
    # Should show Ubuntu 24.04 LTS
  2. Check internet connectivity:
    ping -c 3 google.com
  3. Update package lists:
    apt update
    apt upgrade
  4. Use Docker's official installation script:
    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh

Issue: Backup not working

Symptoms: No backups visible in Hetzner Console

Solutions:

  1. Verify backup is enabled:
    hcloud server describe [SERVER_ID] | grep backup_window
  2. Enable backups if disabled:
    hcloud server enable-backup [SERVER_ID]
  3. Check Hetzner project has backup enabled (some projects disable this)
  4. Wait 24 hours for first backup to complete

Issue: Out of disk space

Symptoms: Services failing, "No space left on device" errors

Solutions:

  1. Check disk usage:
    df -h
    du -sh /var/lib/docker/*
  2. Clean Docker resources:
    docker system prune -a --volumes
  3. Add additional volume:
    hcloud volume create \
    --name [VOLUME_NAME] \
    --size 80 \
    --location [DATACENTER]
    hcloud volume attach [VOLUME_ID] [SERVER_ID]

Cost Considerations

Monthly Costs

Server costs (examples):

  • CPX11: €4.51/month
  • CPX21: €8.82/month
  • CPX31: €16.38/month
  • CCX13: €55.21/month

Additional costs:

  • Backups: +20% of server cost
  • Volumes: €0.054/GB/month (e.g., 80GB = €4.32/month)
  • Traffic: 20TB included (additional: €1.19/TB)
  • IPv4 addresses: €0.50/month per IP (first IP free)

Cost Optimization Tips

  1. Right-size servers - Start small, upgrade if needed
  2. Use volumes sparingly - Only add if server disk insufficient
  3. Delete unused servers - Don't keep development/test servers running
  4. Share servers - Run multiple lightweight services on one server
  5. Monitor usage - Set up alerts if traffic approaches limits

Current Infrastructure Costs

See Hetzner Tool Documentation for detailed cost breakdown of all current servers.

Examples

Example 1: New n8n Server

Project: Pacing n8n (12332922)
Purpose: n8n automation server for client workflows
Service: n8n
Location: Falkenstein (fsn1)
Server Type: CCX13 (2 dedicated vCPU, 8GB RAM)
Ports: 22 (SSH), 5678 (n8n)

Result: Server n8n2 at 91.98.150.95, monthly cost €55.21

Example 2: New TwentyCRM Server

Project: CRM1 (12083932)
Purpose: TwentyCRM for internal agency use and client workspaces
Service: TwentyCRM (with PostgreSQL)
Location: Falkenstein (fsn1)
Server Type: CPX31 (4 vCPU, 8GB RAM, 160GB disk)
Ports: 22 (SSH), 80 (HTTP), 443 (HTTPS)

Result: Server twenty-crm-prod-2 at 49.13.82.194, monthly cost €16.38

Example 3: New Remark42 Server

Project: Comments1 (12402044)
Purpose: Remark42 self-hosted commenting system
Service: Remark42
Location: Nuremberg (nbg1)
Server Type: CPX21 (3 vCPU, 4GB RAM, 80GB disk)
Ports: 22 (SSH), 80 (HTTP), 443 (HTTPS)

Result: Server remark42 at 91.98.226.29, monthly cost €8.82


Last updated: 2026-01-07
Tested on: Hetzner Cloud with Ubuntu 24.04 LTS
Estimated time: 30 minutes (provisioning + setup)