# cscli machines add

## cscli machines add[​](#cscli-machines-add "Direct link to cscli machines add")

add a single machine to the database

### Synopsis[​](#synopsis "Direct link to Synopsis")

Register a new machine in the database. cscli should be on the same machine as LAPI.

TEXTCOPY

```
cscli machines add [flags]
```

### Examples[​](#examples "Direct link to Examples")

TEXTCOPY

```
cscli machines add --auto
cscli machines add MyTestMachine --auto
cscli machines add MyTestMachine --password MyPassword
cscli machines add -f- --auto > /tmp/mycreds.yaml
```

### Options[​](#options "Direct link to Options")

TEXTCOPY

```
  -a, --auto              automatically generate password (and username if not provided)
  -f, --file string       output file destination (defaults to /etc/crowdsec/local_api_credentials.yaml)
      --force             will force add the machine if it already exists
  -h, --help              help for add
  -i, --interactive       interactive mode to enter the password
  -p, --password string   machine password to login to the API
  -u, --url string        URL of the local API
```

### Options inherited from parent commands[​](#options-inherited-from-parent-commands "Direct link to Options inherited from parent commands")

TEXTCOPY

```
      --color string    Output color: yes, no, auto (default "auto")
  -c, --config string   path to crowdsec config file (default "/etc/crowdsec/config.yaml")
      --debug           Set logging to debug
      --error           Set logging to error
      --info            Set logging to info
  -o, --output string   Output format: human, json, raw
      --trace           Set logging to trace
      --warning         Set logging to warning
```

### SEE ALSO[​](#see-also "Direct link to SEE ALSO")

* [cscli machines](https://docs.crowdsec.net/docs/next/cscli/cscli_machines.md) - Manage local API machines \[requires local API]
