Back to Guides

Deploy AnythingMCP on Hetzner Cloud

Launch AnythingMCP on a Hetzner Cloud VPS with Docker Compose and automatic SSL. Affordable European hosting for your MCP gateway.

Prerequisites

  • A Hetzner Cloud accounthetzner.com/cloud
  • A domain name with DNS access
  • An SSH key added to your Hetzner account

Create a Server

In the Hetzner Cloud Console:

  1. Location — Choose the closest region (Falkenstein, Nuremberg, Helsinki, etc.)
  2. Image — Ubuntu 24.04
  3. TypeCX22 (2 vCPU, 4 GB RAM) for small teams, CX32 for heavier workloads
  4. SSH Key — Select your key
  5. Click Create & Buy

Note the public IPv4 address.

Install Docker

ssh root@YOUR_SERVER_IP
curl -fsSL https://get.docker.com | sh

Verify:

docker compose version

Configure DNS

Create an A record pointing your domain to the server IP:

| Type | Name | Value | |------|------|-------| | A | mcp (or @) | YOUR_SERVER_IP |

Deploy AnythingMCP

git clone https://github.com/HelpCode-ai/anythingmcp.git
cd anythingmcp
bash setup.sh

When prompted:

  1. Choose Docker mode
  2. Enter your domain (e.g. mcp.example.com)
  3. Confirm HTTPS — Caddy will handle SSL automatically
  4. Enter an email for Let's Encrypt notifications

The script generates all configuration and starts the services.

Firewall Setup

In the Hetzner Cloud Console, go to Firewalls and create a rule set:

| Port | Protocol | Description | |------|----------|-------------| | 22 | TCP | SSH | | 80 | TCP | HTTP (Caddy redirect) | | 443 | TCP | HTTPS |

Apply the firewall to your server.

Verify & Next Steps

Open https://mcp.example.com in your browser. Register your admin account — the first user becomes administrator.

Your MCP endpoint: https://mcp.example.com/mcp

# View logs
docker compose logs -f

# Update to latest version
git pull && docker compose up -d --build