Skip to main content
Templates are pre-configured deployment blueprints that make it easy to create new OpenClaw instances with consistent settings. Instead of manually configuring every deployment, you can start from a template and customize only what you need.

What are Templates?

A template defines the default configuration for a deployment, including:
  • Cloud provider (Hetzner, DigitalOcean, etc.)
  • Server specifications (CPU, RAM, location)
  • AI provider and model (OpenRouter, Anthropic, etc.)
  • Communication channel (Telegram, Discord, etc.)
Templates don’t include secrets like API keys. You’ll be prompted for those during deployment creation.

Template Structure

From the source code at src/types/index.ts:211-233:
interface Template {
  id: string;              // Unique template identifier
  name: string;            // Display name
  description: string;     // What this template is for
  builtIn: boolean;        // Whether this is a built-in template
  createdAt: string;
  provider: "hetzner" | "digitalocean" | "vultr";
  
  // Provider-specific defaults
  hetzner?: {
    serverType: string;    // e.g., "cpx11"
    location: string;      // e.g., "ash" (Ashburn, VA)
    image: string;         // e.g., "ubuntu-24.04"
  };
  digitalocean?: {
    size: string;          // e.g., "s-1vcpu-2gb"
    region: string;        // e.g., "nyc1"
    image: string;         // e.g., "ubuntu-24-04-x64"
  };
  
  // AI configuration defaults
  aiProvider: string;      // e.g., "openrouter"
  model: string;           // e.g., "moonshotai/kimi-k2.5"
  channel: string;         // e.g., "telegram"
}

Built-in Templates

ClawControl comes with pre-configured templates for common scenarios. From src/services/templates.ts:16-51:

Hetzner + OpenRouter Kimi K2.5

{
  "id": "hetzner-telegram-openrouter-kimi",
  "name": "Hetzner + OpenRouter Kimi K2.5",
  "description": "Deploy OpenClaw on Hetzner Cloud (US East) with OpenRouter using Moonshotai Kimi K2.5 model via Telegram",
  "builtIn": true,
  "provider": "hetzner",
  "hetzner": {
    "serverType": "cpx11",
    "location": "ash",
    "image": "ubuntu-24.04"
  },
  "aiProvider": "openrouter",
  "model": "moonshotai/kimi-k2.5",
  "channel": "telegram"
}
Best for: Cost-effective deployment in US East with a powerful AI model

DigitalOcean + OpenRouter Kimi K2.5

{
  "id": "digitalocean-telegram-openrouter-kimi",
  "name": "DigitalOcean + OpenRouter Kimi K2.5",
  "description": "Deploy OpenClaw on DigitalOcean (NYC1) with OpenRouter using Moonshotai Kimi K2.5 model via Telegram",
  "builtIn": true,
  "provider": "digitalocean",
  "digitalocean": {
    "size": "s-1vcpu-2gb",
    "region": "nyc1",
    "image": "ubuntu-24-04-x64"
  },
  "aiProvider": "openrouter",
  "model": "moonshotai/kimi-k2.5",
  "channel": "telegram"
}
Best for: DigitalOcean users or deployments requiring NYC region
Built-in templates are automatically seeded to ~/.clawcontrol/templates/ on first use.

Using Templates

List Available Templates

clawcontrol templates
This shows all templates, with built-in templates listed first.

Create Deployment from Template

When you run clawcontrol new, you’ll be prompted to select a template. The template’s settings become the defaults for your new deployment. You can customize any setting during creation:
# Start from a template, then customize
clawcontrol new
# Select template: Hetzner + OpenRouter Kimi K2.5
# Override defaults as needed

Creating Custom Templates

You can create custom templates by forking existing ones or creating new template files.

Fork an Existing Template

The easiest way to create a custom template:
  1. Use the templates command to view existing templates
  2. Create a deployment from a template
  3. Save your custom configuration as a new template

Manual Template Creation

Create a new file in ~/.clawcontrol/templates/<template-id>.json:
{
  "id": "my-custom-template",
  "name": "My Custom Setup",
  "description": "Custom configuration for my use case",
  "builtIn": false,
  "createdAt": "2025-01-15T10:00:00.000Z",
  "provider": "hetzner",
  "hetzner": {
    "serverType": "cpx21",
    "location": "nbg1",
    "image": "ubuntu-24.04"
  },
  "aiProvider": "anthropic",
  "model": "claude-3-5-sonnet-20241022",
  "channel": "telegram"
}
From src/services/templates.ts:109-113:
export function saveTemplate(template: Template): void {
  ensureTemplatesDir();
  const validated = TemplateSchema.parse(template);
  writeFileSync(getTemplatePath(validated.id), JSON.stringify(validated, null, 2));
}

Managing Templates

Template Storage

All templates are stored in ~/.clawcontrol/templates/:
~/.clawcontrol/
└── templates/
    ├── hetzner-telegram-openrouter-kimi.json
    ├── digitalocean-telegram-openrouter-kimi.json
    └── my-custom-template.json

Deleting Custom Templates

You can delete custom templates by removing their JSON file:
rm ~/.clawcontrol/templates/my-custom-template.json
Built-in templates cannot be deleted. They are automatically re-created if removed.

Template Auto-Seeding

From src/services/templates.ts:63-71:
function seedBuiltInTemplates(): void {
  ensureTemplatesDir();
  for (const template of BUILT_IN_TEMPLATES) {
    const path = getTemplatePath(template.id);
    if (!existsSync(path)) {
      writeFileSync(path, JSON.stringify(template, null, 2));
    }
  }
}
Built-in templates are automatically created when you first use templates, ensuring you always have working starting points.

Why Use Templates?

Consistency

Ensure all your deployments use the same base configuration.

Speed

Skip repetitive configuration and get to deployment faster.

Best Practices

Built-in templates use tested, optimized settings.

Team Sharing

Share template files with your team for standardized deployments.

Template Selection Tips

1

Choose your provider

Select based on your cloud provider preference and region requirements.
2

Consider server specs

Built-in templates use minimal specs (1 vCPU, 2GB RAM). Create custom templates for larger deployments.
3

Match your AI provider

Start with OpenRouter templates if you want access to multiple models through one API.
4

Customize as needed

Templates are starting points - you can override any setting during deployment creation.

Next Steps

Create a Deployment

Use a template to create your first deployment

Providers

Learn about supported cloud providers

Deployments

Understand the full deployment lifecycle

Templates Command

See all template management commands

Build docs developers (and LLMs) love