# Create a Linux server

A Debian, Ubuntu, or Fedora server starts from its vendor's cloud image and has no desktop.

## Create a server

1. Choose **File > New Machine**.
2. Select **Debian 13 (trixie)**, **Ubuntu 26.04 LTS**, or **Fedora 44 Cloud**, then click **Continue**.
3. Enter a name. Your public keys from `~/.ssh` are already selected under **Public Keys**.
4. Click **Create**, then start the machine.

The first machine from an image downloads it. The account has your Mac's user name, your SSH keys, and sudo without a password.

To list the images, then create and start a server in Terminal:

```sh
osmates vm images
osmates vm create dev --image debian-13 --ssh-key ~/.ssh/id_ed25519.pub
osmates vm start dev --wait agent
```

Add `--user` for another account name. Connect with `osmates ssh dev`, or [find its address](https://osmates.com/docs/network#check-a-machines-network). For a desktop, see [Create a Linux desktop](https://osmates.com/docs/linux-desktop), or [add a display](https://osmates.com/docs/linux-use#add-a-display) to a server.

## Set the language and keyboard

A server starts with your Mac's language, region, time zone, and keyboard layouts. Change them under **Language & Region**, or in Terminal:

```sh
osmates vm create dev --language de --region DE --time-zone Europe/Berlin --keyboard de
```

- `--keyboard` takes up to 4 layouts, such as `fr` or `us(dvorak)`. Alt+Shift switches between them.
- Fedora 44 Cloud has English locales only, and keeps its own for another language.
- User-data that sets `locale`, `timezone`, or `keyboard` wins.

`osmates vm info dev` shows what the machine got.

## Run a server on the OSMates engine

A server runs on Apple Virtualization unless you choose the OSMates engine at creation. The engine can't change later.

1. In the form, set **Engine** to **OSMates**.
2. Click **Create**.

To do the same in Terminal:

```sh
osmates vm create dev --image debian-13 --engine hypervisor
```

There, a server has sound, your Mac's battery, and back and forward mouse buttons, but no Rosetta or Secure Boot. [What each system supports](https://osmates.com/docs/engines) compares the engines.

## Make one from any disk image

In New Machine, select **Linux from a Disk Image**, click **Continue**, then choose an arm64 disk image. For an image on the web:

1. Under **Disk Image**, set **Source** to **URL**, then enter the URL.
2. Enter the checksum, or click **Use Checksum File** if you see it. Check that the file is the vendor's.

To create one in Terminal from a file, or from a URL and its checksum:

```sh
osmates vm create box --image ~/Downloads/alpine.qcow2
osmates vm create web --image https://download.opensuse.org/distribution/leap/16.0/appliances/Leap-16.0-Minimal-VM.aarch64-Cloud.qcow2 \
    --checksum https://download.opensuse.org/distribution/leap/16.0/appliances/Leap-16.0-Minimal-VM.aarch64-Cloud.qcow2.sha256
```

`--checksum` takes `sha256:<hex>`, `sha512:<hex>`, a bare digest, or a checksum file's URL. Without it, nothing downloads.

| Format | Accepted |
|---|---|
| qcow2 | Without zstd compression, a backing file, or an external data file |
| RAW | Plain or xz-compressed |
| tar | xz-compressed, holding `disk.raw` or a single file |
| ASIF | Yes |

x86_64 images, images the firmware can't start, and [kernels built for 64 KiB pages](https://osmates.com/docs/not-yet#apples-limits) are refused. An image without cloud-init needs the [guest agent installed by hand](https://osmates.com/docs/linux-iso#install-the-guest-agent-by-hand).

## Add your own user-data

1. In New Machine, select a Linux system, then click **Continue**.
2. Under **Advanced**, click **Choose** beside **User Data**, and select your file.

To do the same in Terminal:

```sh
osmates vm create api --user-data setup.yaml
```

User-data runs once, at the first boot, beside OSMates' setup, and your values win. Use up to 1 MiB of cloud-config, a script, or a MIME document, gzipped or not. Another desktop for Debian, Ubuntu, or Fedora goes here too.

- On Fedora, set `fqdn` or `prefer_fqdn_over_hostname: false` with `hostname`.
- A `users` value written as a string or map removes OSMates' account.
- Turning off cloud-init's users or per-boot scripts can remove the account or guest agent.
