# Servers Overview

Source: https://next.coolify.io/docs/core/infrastructure/servers/overview

A server is a machine where Coolify runs applications, databases, and services, or builds application images.

Coolify manages a connected server through SSH. The machine and its provider account remain under your control.

> **Info: Using Coolify Cloud?**
>
> Coolify Cloud users must connect or provision a server before deploying a resource. Self-hosted installations start with a **localhost** server.

## Server roles

- **Localhost**: The server running a self-hosted Coolify instance. It can also run deployed resources.
- **Deployment server**: A remote Linux server that runs applications, databases, and services managed by Coolify.
- **Build server**: A dedicated server that builds application images but cannot run deployed resources.

### Localhost

A self-hosted installation starts with a server named **localhost**. You can deploy resources to it, but those resources share CPU, memory, and storage with the Coolify dashboard.

For production workloads, consider adding a remote server so application activity does not affect Coolify itself. The localhost server cannot be removed.

### Deployment servers

A deployment server is a Linux server that you own or rent and connect to Coolify. Use one to:

* deploy resources with Coolify Cloud
* keep workloads separate from the Coolify dashboard
* deploy resources in another location
* divide workloads across multiple machines

Coolify needs a working SSH path to the server. The server can use a reachable IP address, hostname, or [Cloudflare Tunnel](https://next.coolify.io/docs/integrations/networking/cloudflare/tunnels/server-ssh).

### Build servers

Applications build on their deployment server by default. A separate build server is optional and is useful when builds need dedicated CPU, memory, or storage.

A server marked as a build server cannot host applications, databases, or services. Read [Build Servers](https://next.coolify.io/docs/core/infrastructure/servers/build-servers) before enabling this role.

***

## Choose how to add a server

| Your situation                                                                                 | Guide                                                                           |
| :--------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ |
| You already have a Linux server                                                                | [Add a server manually](https://next.coolify.io/docs/core/infrastructure/servers/add-server)                |
| You want Coolify to purchase and create a server at Hetzner, DigitalOcean, Vultr, or Hostinger | [Provision a cloud server](https://next.coolify.io/docs/core/infrastructure/servers/provision-cloud-server) |
| You need a server used only for application builds                                             | [Configure a build server](https://next.coolify.io/docs/core/infrastructure/servers/build-servers)          |

Both manual and provider-created servers must be validated before Coolify can deploy resources to them. During validation, Coolify checks SSH access, verifies the operating system and required tools, and installs or verifies Docker Engine and Docker Compose.

> **Warning: Validation can change the server**
>
> Validation can install Docker and restart the Docker service. Use a fresh server when possible. Existing containers may be temporarily unavailable.

***

## After connecting a server

- **[Manage server settings](https://next.coolify.io/docs/core/infrastructure/servers/manage-server)**: Update the connection, timezone, wildcard domain, and cloud-provider link.
- **[Patch server packages](https://next.coolify.io/docs/core/infrastructure/servers/server-patching)**: Check for operating-system package updates and choose when to install them.
- **[Configure Docker cleanup](https://next.coolify.io/docs/core/infrastructure/servers/automated-docker-cleanup)**: Schedule cleanup and control which unused Docker data Coolify may remove.
