# Connect a cloud provider

Coresmith can create servers in your own account at Hetzner Cloud, DigitalOcean, Vultr or Linode. The servers belong to that account, and the provider bills it for them. A Coresmith plan doesn't include them.

## Connect an account

An Owner or Admin connects a provider with an API token, under **Add server** or on the **Cloud providers** tab of **Settings**. The token needs these permissions:

| Provider      | Token                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Hetzner Cloud | A Read & Write token for the project.                                                                                                         |
| DigitalOcean  | Full access, or custom scopes: read on account, regions, sizes and images, every droplet and SSH key permission, and create and read on tags. |
| Vultr         | An API key whose user can create and manage servers. If access control is on, allow the address Coresmith connects from.                      |
| Linode        | A personal access token with read/write on Linodes and read on Images.                                                                        |

Coresmith stores the token encrypted. Once an account is connected, Owners, Admins and Developers can create servers in it. Only Owners and Admins can add, rename or remove accounts.

## Create a server

Choose **Add server**, pick the account, a region and a size, then choose **Provision server**. Coresmith shows each size's monthly price from the provider. Setup starts as soon as the server boots.

## Resize a server

On a cloud server's page, choose **Resize** and pick the new size. Hetzner Cloud and DigitalOcean power the server off to resize it, so its apps are offline until it starts again. A resize waits for any deploy on the server to finish first.

## Destroy or detach

- **Destroy** deletes the server at the provider. Billing for it stops there, and everything on it is gone.
- **Detach** only removes it from Coresmith. The server keeps running in your account, and you're still billed for it.

If Coresmith can't tell whether the provider created a server, for example after a timeout, it says so. Check your provider's console, and delete the server there if it exists.
