# Create and manage servers

Servers are virtual machines with ECC RAM, local NVMe storage, and a public IPv4 and IPv6 address. Each one runs Ubuntu, and you sign in as `root` over SSH.

![Create server form](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/c1035348-0fa7-4055-ab20-dda1ddcf9800/md2x =2100x1610)

## Create a server

1. Go to **Servers** → [Create server](https://cloud.betterstack.com/team/t0/servers/new ";_blank")
2. Enter a **Hostname**. It must be unique in your organization, and the server uses it as its hostname.
3. Pick a **Region** and a **Data center** close to your users. See [Regions](https://betterstack.com/docs/cloud/servers/regions/#choose-a-region).
4. Keep **Regular servers** as the server family. For dedicated vCPUs or discounted spot servers, see [Server families](https://betterstack.com/docs/cloud/servers/families/).
5. Pick a type under **Server size**.
6. Keep **Ubuntu 26.04 LTS** as the **Operating system**.
7. Under **SSH keys & password**, select your SSH keys. No key yet? Click **Add an SSH key** and follow [SSH keys](#ssh-keys).
8. Click **Create server**.

The rest of the form is optional:

| Section | What it does |
|---|---|
| **Number of servers** | Next to **Hostname**, creates up to 10 servers at once with the same settings. |
| **Hardware placement** | Adds the server to a [placement group](https://betterstack.com/docs/cloud/servers/placement-groups/). A server joins a group only when you create it. |
| **Network** | Sets the server's public IPv4 and IPv6 addresses and attaches [private networks](https://betterstack.com/docs/cloud/networks/private-networks/). |
| **Firewalls** | Attaches a [firewall](https://betterstack.com/docs/cloud/networks/firewalls/). |
| **Scheduled snapshots** | Backs the server up automatically. See [Snapshots](https://betterstack.com/docs/cloud/servers/snapshots/#schedule-snapshots). |
| **Extras** | Turns on AI Engineer access, Observability, DDoS protection and Vulnerability monitoring. See [Extras](#extras). |
| **Cloudflare DNS** | Points a record in your [Cloudflare](https://betterstack.com/docs/cloud/integrations/cloudflare/#point-dns-records-at-a-new-server) zone at the server as soon as it boots. |
| **Server initialization** | Runs a cloud-init config or a Bash script at first boot. See [Server initialization](#server-initialization). |
| **Metadata** | Adds up to 10 key-value pairs to organize and filter your servers. |

## Connect to your server

Copy the server's public IP from its page and connect as `root`:

```bash
[label Connect to your server]
ssh root@203.0.113.10
```

## SSH keys

An SSH key you add authorizes `root` logins on the servers you pick. Keys work in every data center.

1. Go to **Security** → **SSH keys** → [Create SSH key](https://cloud.betterstack.com/team/t0/ssh-keys/new ";_blank")
2. Paste your public key into **Public key**, or enter your username under **Fetch SSH keys from GitHub**.
3. Enter a **Name**.
4. To add the key to servers you already run, select them under **Servers**.
5. Click **Create SSH key**.

No key on your computer yet? Generate one and paste the output of the second command:

```bash
[label Generate an SSH key]
ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub
```

To add a key to running servers, or take it off them:

1. In **Security** → **SSH keys**, open the key's menu and click **Add the SSH key to servers**.
2. Select or clear the servers. They must be running.
3. Click **Save changes**.

Take a key off every server before you remove it.

## Extras

Turn these on under **Extras** when you create the server. Vulnerability monitoring can also be changed later, and the others are fixed once the server exists.

- **AI Engineer access** lets the Better Stack [AI Engineer](https://betterstack.com/docs/cloud/integrations/ai-engineer/) SSH into the server to investigate incidents. It's on by default.
- **Observability** installs the Better Stack collector, so the server's logs, metrics and traces flow into Better Stack a few minutes after it starts. See [Observability](https://betterstack.com/docs/cloud/integrations/observability/#logs-metrics-and-traces).
- **DDoS protection** adds always-on mitigation of volumetric attacks at the network edge. See [DDoS protection](https://betterstack.com/docs/cloud/networks/ddos-protection/).
- **Vulnerability monitoring** scans the server every day for services exposed to the internet and for package versions with known vulnerabilities. Open the findings with **View scan** on the server's page.

Observability, DDoS protection and Vulnerability monitoring are billable.

## Server initialization

Under **Server initialization**, pick **Cloud-init** or **Bash** and paste your config or script. The server runs it once, as `root`, at its first boot:

```yaml
[label Install nginx at first boot]
#cloud-config
package_update: true
packages:
  - nginx
runcmd:
  - systemctl enable --now nginx
```

- A cloud-init config starts with `#cloud-config`, a script with `#!`, for example `#!/bin/bash`. The limit is 32 KiB.
- The server shows **Running** before your config finishes. Run `cloud-init status --wait` on the server to wait for it.
- An error doesn't stop the server from starting. The output is in `/var/log/cloud-init-output.log`.
- It never runs again, not after a reboot, a rescale or a restore.
- `root` can read it on the server afterwards, so don't put long-lived credentials in it.

## Manage a server

Open a server from **Servers** to see its details, graphs and activity. These actions sit at the top of its page:

| Action | What it does |
|---|---|
| **Reboot** | Restarts the server. |
| **Power off** | Shuts the server down. **Power on** starts it again. |
| **Rescale** | Moves the server to another type. See [Rescale a server](#rescale-a-server). |
| **Web console** | Opens a root shell in your browser. See [Web console](#web-console). |
| **Rescue mode** | Boots a rescue system so you can repair the server. See [Rescue mode](#rescue-mode). |
| **Take a snapshot** | Saves a copy of the server's disk. See [Snapshots](https://betterstack.com/docs/cloud/servers/snapshots/#take-a-snapshot). |
| **Rename** | Changes the server's name. |
| **Remove** | Deletes the server and its disk. Its snapshots stay. |

**Reboot**, **Power off** and **Remove** ask the operating system to shut down and wait up to 30 seconds before they cut the power, so your shutdown scripts run. A removed server's name is free for a new server right away.

### Rescale a server

1. Open the server and click **Rescale**.
2. Pick the new type.
3. To keep the option of moving back to a smaller type, check **Resize CPU and RAM only**.
4. Click **Rescale server**.

The server restarts and keeps its IP addresses. Its disk can only grow, so you can rescale only to a type whose disk is at least as large as the server's current disk. On the standard disk layout, the file system grows to the new disk size at the restart.

### Web console

**Web console** opens a root shell in your browser. It works when SSH doesn't, for example with a broken `sshd` or a firewall that blocks you. The server must be running. A session closes after 2 hours, so run long jobs in `tmux` or as a systemd service.

### Rescue mode

Use rescue mode when you can't get into the server, for example after a bad `/etc/fstab` entry or wrong firewall rules.

1. Open the server and click **Rescue mode**.
2. Click **Reboot into rescue mode**.
3. Connect to the server's usual IP address as `root`, with one of its SSH keys or the one-time password shown on the server's page.
4. Repair your system, which is mounted at `/mnt/rescue`:

    ```bash
    [label Open a shell in your server's system]
    chroot /mnt/rescue
    ```

5. Click **Exit rescue mode** on the server's page and confirm. The server reboots into its normal system.

- The server's firewall isn't applied in rescue mode, so SSH is open to everyone until you leave it.
- The server leaves rescue mode on its own after 60 minutes.
- Running `reboot` inside the rescue system starts the rescue system again. Run `poweroff` instead, or click **Exit rescue mode**.
- Not mounted? With LVM, several partitions or encryption, find your disk with `lsblk` and mount it yourself.

## Monitor a server

The server's page shows graphs of **CPU usage**, **RAM**, **Disk space**, **Disk I/O** and **Network** for the last hour, day, week or 30 days.

**Activity** lists what happened to the server, such as reboots, snapshots and rescales, and who did it.

For logs, metrics and traces from inside the server, turn on [Observability](https://betterstack.com/docs/cloud/integrations/observability/#logs-metrics-and-traces).

## IP addresses

Each server gets one public IPv4 and one public IPv6 address. They stay with the server through reboots, power offs and rescales.

- **IPv6 only.** Set **IPv4 address** to 0 under **Network**. The server still reaches IPv4-only hosts, such as `github.com`, by hostname. Connections to a hard-coded IPv4 address fail.
- **Keep an address.** Use a [reserved IP](https://betterstack.com/docs/cloud/networks/reserved-ips/) to keep an address when you replace a server.
- **Sending e-mail.** Outbound port 25 is blocked. Send through an e-mail provider on port 587 or 465.

## Limits

| Limit | Value |
|---|---|
| Network bandwidth | Up to 10 Gbps in and 10 Gbps out |
| Tracked connections | 60,000 for each vCPU of the server type |
| Idle TCP connections | Forgotten after 24 hours, so use keepalives shorter than that |
| MTU | 1,500 bytes on every interface |
| Disk writes | 100 MiB/s plus 12.5 MiB/s for each vCPU, up to 1,000 MiB/s |
| Disk reads | Four times the write limit, up to 4,000 MiB/s |

Above the connection limit, new connections are dropped until existing ones close. Use a larger type, more servers or a [load balancer](https://betterstack.com/docs/cloud/load-balancers/) when you need more. Each attached [volume](https://betterstack.com/docs/cloud/volumes/volumes/#performance-and-limits) gets its own disk limit. Need a higher packet rate for a legitimate workload? Let us know.

How many servers, vCPUs and RAM your organization can use is set by your [quotas](https://betterstack.com/docs/cloud/trust-and-safety/quotas/).

## Need help?

Please let us know at hello@betterstack.com.  
We're happy to help! 🙏
