---
title: "alpacon server create"
description: "Generate Alpamon installation instructions for a server. Select an OS and registration token, choose token-install or Ansible, and optionally request JSON."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# alpacon server create

Generate installation instructions to register a server.

## Usage

`alpacon server create [flags]`

## Key facts

- Choose `token-install` or `ansible` as the registration method.
- Provide `--platform` and `--token` or `--new-token` for non-interactive use.

## Flags

### Registration

| Flag | Type | Description | Default |
| --- | --- | --- | --- |
| `-m, --method` | `string` | Registration method: `token-install` or `ansible`. | `token-install` |
| `-p, --platform` | `string` | Target OS: `debian`, `rhel`, `suse`, `darwin`, or `windows`. `suse` is unavailable with `--method ansible`. | — |

### Token and server

| Flag | Type | Description |
| --- | --- | --- |
| `-t, --token` | `string` | Existing registration token name. |
| `--new-token` | `string` | Create a new registration token with this name. |
| `-n, --name` | `string` | Server name; uses the hostname if omitted. |

### Output and help

| Flag | Type | Description | Default |
| --- | --- | --- | --- |
| `--json` | `bool` | Output the installation guide as structured JSON instead of Markdown. | `false` |
| `--output` | `string` | Output format: `table` or `json`. Inherited by all commands. | `table` |
| `-h, --help` | `bool` | Show command help. | `false` |

## Examples

Generate an installation guide interactively

```bash
alpacon server create
```

Generate a guide for a Debian server with an existing token

```bash
alpacon server create --platform debian --token prod-token
```

Set the server name explicitly (hostname is used if not set)

```bash
alpacon server create --platform rhel --token prod-token --name my-server
```

Generate a guide for an openSUSE or SLES server

```bash
alpacon server create --platform suse --token prod-token
```

Generate a guide for a macOS server

```bash
alpacon server create --platform darwin --token prod-token
```

Generate an Ansible playbook command instead of a token-install guide

```bash
alpacon server create --method ansible --platform debian --token prod-token
```

Output the guide as structured JSON

```bash
alpacon server create -m ansible -p windows -t prod-token --json
```

## Registration methods

- **token-install** (default): the guide includes the Alpamon register command to run on your server.
- **ansible**: the guide produces an `ansible-playbook` command using the `alpacax.alpacon` collection, so you can register one or many servers from a control node.

Supported platforms: `debian`, `rhel`, `suse` (openSUSE and SLES), `darwin`, `windows`. `suse` needs alpacon CLI 1.14.2 or later and works only with the token-install method.

## Non-interactive mode

When `--platform` and either `--token` or `--new-token` are provided, the command runs non-interactively. This is useful for scripts and automation pipelines. Use `--token` to reference an existing registration token by name, or `--new-token` to create a new one on the fly. See [Registration token management](/reference/cli/server/token/) for managing tokens.

Source: https://docs.alpacax.com/reference/cli/server/create/
