> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Add servers

> Join your own Linux server or an Akua server to a hosted Cluster

![The control plane hands a bootstrap token to a new machine, which joins the cluster and fills its scheduling slots](https://docs.akua.dev/images/heros/clusters-add-workers-light.svg)

A hosted Cluster runs your Installs on the servers you join to it. Each server becomes a node of the Cluster. You can join a Linux server you run, or ask Akua for a server.

This page covers hosted Clusters. An [attached cluster](https://docs.akua.dev/clusters/import.md) keeps its own nodes.

## Prerequisites

* A hosted Cluster whose control plane is ready (see [Create a cluster](https://docs.akua.dev/clusters/create.md)).
* For your own server: a Linux server with at least 2 CPU and 4 GB of memory, and root access.

## Join your own server

**1. Create a join command**

In the [Clusters dashboard](https://akua.dev/clusters), click **Add server**, choose the Cluster, choose **Your own server**, and click **Create join command**.

With the CLI, run `akua clusters create-join-token CLUSTER_ID --ttl-seconds 3600`; its `command` field is the join command.

The command is shown once and is for one server: it stops working 15 minutes after its first use, or after one hour if it is not used. Keep it private: anyone who runs it can add a server to your Cluster.

**2. Run the command as root**

Run the command on your server. It installs Kubernetes (k0s) at the Cluster's version and starts the server as a worker.

**3. Check the server**

The server appears in the Cluster's **Servers** list. The Cluster is ready for Installs once a node is ready.

Create more join commands from the Cluster's **Join command** section. Revoking a command stops further servers from using it; servers that already joined stay. To take a joined server out of the Cluster, remove it from the **Servers** list: Akua drains the node and removes it, and your server keeps running.

## Add an Akua server

An Akua server is a server that Akua orders, joins to the Cluster, and deletes with it. In the API it is a [Machine](https://docs.akua.dev/compute/overview#machine-states) created by a node pool.

**1. Start the flow**

Click **Add server**, choose the Cluster, and choose **Akua server**.

**2. Verify a card if asked**

A billing account with a verified card is required. For the free trial server, the card is verified, not charged.

**3. Name the server and create it**

Give the server group a name and click **Add server** (or **Start free trial server**). Akua creates the server and joins it to the Cluster.

Change a server group's size with **Change size** (0 to 10 servers), or delete the group to delete its servers. [Compute](https://docs.akua.dev/compute/overview.md) describes the free trial server and its limits.

## From the CLI or API

```bash
akua clusters create-join-token CLUSTER_ID --ttl-seconds 3600
akua node-pools create CLUSTER_ID --node-pool-id server-1 --machine-type cx23 --node-count 1
akua nodes list CLUSTER_ID
```

A join token lives from 60 seconds to 24 hours, and 15 minutes after its first use it expires: create one token per server. A Cluster holds at most 100 join tokens. Each keeps its place until 15 minutes after the end of its requested lifetime, even when it was used or revoked earlier, and another create answers `429` until one frees its place. A node pool creates its Machines in the Cluster's Region, and `akua node-pools set-size` resizes it. Removing a joined server with `akua nodes remove` drains it first; a node that belongs to a node pool is removed by resizing its pool.

## Troubleshooting

A node or node pool reports what needs attention in its `conditions`:

* `join-timeout`: the server started but never joined.
* `not-ready` or `nodes-not-ready`: Kubernetes reports the node as not ready.
* `billing-required` and `quota-exceeded`: the Workspace has no active billing account, or no Machine capacity left. See [Quotas and limits](https://docs.akua.dev/platform/quotas.md). When a new pool is refused for this, the create request is accepted and its Operation fails: read `error.reason` (`billing-required`, `quota-exceeded`, `service-disabled` or `provider-refused`) and `error.message` from the Operation. An unknown machine type or location is refused with a 400 or 422 at once.
* `trial-ended`: the free trial server was paused. See [Free tier machine lifetime](https://docs.akua.dev/compute/overview#free-tier-machine-lifetime).

If a join command doesn't work, check that the server runs as root, has outbound internet access, and uses a command that hasn't expired or been used for another server. Create a new command if in doubt.

## Related topics

> [card] [Akua servers](https://docs.akua.dev/compute/overview.md)
>
> The free trial server, Machine states and deletion.

> [card] [Quotas and limits](https://docs.akua.dev/platform/quotas.md)
>
> Which limits apply to clusters and servers.

> [card] [Storage](https://docs.akua.dev/storage.md)
>
> Persistent volumes for your Installs.
