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

# Server Provisioning

Server provisioning is the process of setting up a dedicated server to run your application. Hydron automates the entire process — from OS installation to Docker setup to security hardening.

## What happens during provisioning

When you approve an infrastructure plan, Hydron executes a series of provisioning steps on your dedicated server:

1. **OS Installation** — Install Ubuntu 22.04 LTS
2. **System Configuration** — Set hostname, configure timezone, update packages
3. **Security Setup** — Configure SSH keys, firewall (UFW), disable root password login, install fail2ban
4. **Docker Installation** — Install Docker Engine, Docker Compose, configure networking
5. **Application Setup** — Create directories, set up reverse proxy, configure SSL, log rotation
6. **Deployment** — Pull/build Docker images, start containers, verify health checks

## Provisioning plans

Each server gets a detailed **provisioning plan** — a sequence of steps that transform a bare server into a ready-to-deploy environment.

### Step types

| Type | Description |
|------|-------------|
| **Layout** | Server configuration and directory structure |
| **Provisioning** | Software installation and system setup |
| **Post-deployment** | Final configuration after containers are running |

### Step details

Each step includes:

- **Description** — What the step does
- **Commands** — Shell commands to execute
- **Expected output** — What successful completion looks like
- **Rollback commands** — How to undo the step if it fails
- **Environment variables** — Variables needed for the step

## Watching provisioning

You can monitor the provisioning process in real-time through the **Runs** tab in the right sidebar:

![The Runs tab showing deployment step progress](/images/docs/sidebar-runs.png)

Each step shows:
- **Status** — Pending, running, completed, or failed
- **Duration** — How long the step took or is taking
- **Logs** — Click to expand and view real-time command output

## SSH access

After provisioning completes, you have full SSH access to your server:

```bash
ssh root@your-server-ip
```

Your SSH credentials are available in:
- The deployment completion message in the chat
- The **Server Inventory** page
- The **Infrastructure** panel under server details

## Provisioning options

### Force OS install

If your server already has an operating system, you can choose to:
- **Keep existing OS** — Skip OS installation (faster, preserves data)
- **Force reinstall** — Wipe and install a fresh OS (clean slate)

### Server location

Hydron provisions servers in multiple datacenter locations. Choose a location close to your users for optimal latency:

| Region | Locations |
|--------|-----------|
| **Europe** | Frankfurt, Paris, London, Amsterdam |
| **North America** | New York, Montreal, San Francisco |
| **Asia-Pacific** | Singapore, Sydney, Tokyo |

## Troubleshooting provisioning

### Step failed

If a provisioning step fails:

1. Check the step's error logs in the Runs panel
2. The AI will suggest fixes based on the error
3. You can ask the AI to retry the failed step
4. Or SSH into the server to investigate manually

### Common issues

**Network timeout during package installation**
The server may have temporary network issues. Retry the step or ask the AI to retry.

**Docker installation failure**
Usually caused by OS compatibility issues. The AI will suggest alternative installation methods.

**SSL certificate provisioning failure**
DNS may not have propagated yet. Wait a few minutes and retry.

### Pausing and resuming

You can **pause** a provisioning run at any time. This stops execution at the current step. When you **resume**, it picks up from where it left off.

You can also **stop** a run entirely if you need to start over. This halts all execution but doesn't undo completed steps.
