<!-- llms-txt: https://hydron.app/llms.txt -->
<!-- llms-full-txt: https://hydron.app/llms-full.txt -->
<!-- canonical: https://hydron.app/docs/templates -->

# Using Templates

Templates provide pre-configured deployment setups for common application stacks. They're the fastest way to get started with Hydron — select a template, customize a few settings, and deploy.

## How templates work

A template includes:

- **Pre-configured services** with optimized settings
- **Dockerfiles** tuned for the specific stack
- **Environment variable** definitions with sensible defaults
- **Health check** configurations
- **Recommended server** specifications

When you choose a template, Hydron sets up everything automatically. You only need to provide your application-specific values (database passwords, API keys, etc.).

## Available template categories

### Web Applications

| Template | Stack | Description |
|----------|-------|-------------|
| **Node.js + Express** | Node.js, Express, MongoDB | REST API with database |
| **React + Node.js** | React, Express, PostgreSQL | Full-stack web application |
| **Next.js** | Next.js, PostgreSQL | Server-rendered React application |
| **Django** | Python, Django, PostgreSQL | Python web framework |
| **Rails** | Ruby on Rails, PostgreSQL | Ruby web framework |
| **Laravel** | PHP, Laravel, MySQL | PHP web framework |
| **Spring Boot** | Java, Spring Boot, PostgreSQL | Java enterprise application |

### Static Sites

| Template | Stack | Description |
|----------|-------|-------------|
| **React SPA** | React, Nginx | Single-page application with Nginx |
| **Vue.js SPA** | Vue.js, Nginx | Vue.js application with Nginx |
| **Static HTML** | HTML/CSS/JS, Nginx | Plain static files served by Nginx |

### Databases & Services

| Template | Stack | Description |
|----------|-------|-------------|
| **PostgreSQL** | PostgreSQL 16 | Managed PostgreSQL database |
| **MySQL** | MySQL 8 | Managed MySQL database |
| **Redis** | Redis 7 | In-memory cache and message broker |
| **MongoDB** | MongoDB 7 | Document database |

## Using a template

1. In a new chat, select **Templates** from the deployment options
2. Browse or search the template gallery
3. Select the template that matches your needs
4. Customize the configuration:
   - Application name
   - Environment variables
   - Server location preference
5. Review the generated infrastructure plan
6. Approve and deploy

![The deployment source selection includes a Templates option](/images/docs/deploy-source-selection.png)

## Customizing templates

Templates are starting points, not rigid configurations. After selecting a template, you can customize everything through the chat:

- "Change the database to MySQL instead of PostgreSQL"
- "Add a Redis cache to this stack"
- "Use a larger server with 32GB RAM"
- "Add an Nginx reverse proxy in front of the API"

The AI will update the infrastructure plan to reflect your changes.

## Templates vs. Git deployment

| Aspect | Templates | Git deployment |
|--------|-----------|---------------|
| **Speed** | Fastest — deploy in minutes | Requires code analysis first |
| **Customization** | Pre-configured, then customizable | Fully analyzed from your code |
| **Best for** | Standard stacks, quick prototypes | Custom applications |
| **Code included** | Template starter code | Your existing codebase |

You can start with a template and later switch to deploying your own code from Git by adding your repository as a service.
