# Command-Line Help for `ordinaryd`

This document contains the help content for the `ordinaryd` command-line program.

**Command Overview:**

* [`ordinaryd`↴](#ordinaryd)
* [`ordinaryd init`↴](#ordinaryd-init)
* [`ordinaryd api`↴](#ordinaryd-api)
* [`ordinaryd app`↴](#ordinaryd-app)

## `ordinaryd`

Ordinary Server

**Usage:** `ordinaryd [OPTIONS] <COMMAND>`

###### **Subcommands:**

* `init` — initialize the environment for an Ordinary API server
* `api` — start the Ordinary API server
* `app` — start an Ordinary Application server

###### **Options:**

* `--data-dir <DATA_DIR>` — specify the data directory

  Default value: `~/.ordinary`
* `--stdio-logs` — logs events to stdio

  Default value: `false`
* `--stdio-pretty` — whether to pretty print stdio logs

  Default value: `false`
* `--stdio-json` — whether to print stdio logs as json

  Default value: `false`
* `--json-logs` — persists JSON formatted log lines to <data-dir>/logs/

  Default value: `false`
* `--log-level <LOG_LEVEL>` — base log level for every component

  Default value: `info`

  Possible values: `error`, `warn`, `info`, `debug`, `trace`

* `--with-span-timing` — dictates whether timing information should be logged

  Default value: `false`
* `--log-file-rotation <LOG_FILE_ROTATION>` — rate at which new log files are generated

  Default value: `minute`

  Possible values: `day`, `hour`, `minute`, `never`

* `--log-size` — whether storage sizes are logged

  Default value: `false`

## `ordinaryd init`

initialize the environment for an Ordinary API server

**Usage:** `ordinaryd init [OPTIONS] --storage-size <STORAGE_SIZE> --api-domain <API_DOMAIN>`

###### **Options:**

* `--environment <ENVIRONMENT>` — environment (e.g production, development, staging)

  Default value: `staging`
* `--storage-size <STORAGE_SIZE>` — Storage size in bytes (rounded up to nearest OS page size)
* `--api-domain <API_DOMAIN>` — domain name for API console
* `--password <PASSWORD>` — instance user password

  Default value: `password`
* `--mfa-stored` — store the MFA key locally instead of copying a QR code

  Default value: `false`
* `--api-contacts <API_CONTACTS>` — contacts for the API domain cert provisioning
* `--app-domains <APP_DOMAINS>` — domains that apps can subdomain off of.

  i.e. when `example.com` is passed, `my.example.com` is considered a valid app domain.
* `--privileged-domains <PRIVILEGED_DOMAINS>` — list of applications that have access to API server level commands (i.e.
  API server invite token generation)

  currently intended to enable API server admins to set up a web-based registration portal.

## `ordinaryd api`

start the Ordinary API server

**Usage:** `ordinaryd api [OPTIONS] --storage-size <STORAGE_SIZE>`

###### **Options:**

* `--environment <ENVIRONMENT>` — environment (e.g production, development, staging)

  Default value: `staging`
* `--storage-size <STORAGE_SIZE>` — Storage size in bytes (rounded up to nearest OS page size)
* `--provision <PROVISION>` — what mode TLS certs should be provisioned in

  Default value: `localhost`

  Possible values: `staging`, `production`, `localhost`

* `--port <PORT>` — specify HTTP(s) port for server
* `--redirect-port <REDIRECT_PORT>` — specify HTTP port for server when running in secure mode
* `--insecure` — run without HTTPS

  Default value: `false`
* `--insecure-cookies` — run with insecure cookies

  Default value: `false`
* `--log-headers` — whether HTTP request and response headers are logged

  Default value: `false`
* `--log-ips` — whether IP Addresses are logged with HTTP requests

  Default value: `false`
* `--redacted-header-hash <REDACTED_HEADER_HASH>` — "none" | "blake2" | "blake3"

  Default value: `none`
* `--dedicated-ports` — give each app its own port

  Default value: `false`
* `--log-index` — whether to index logs so they can be queried

  Default value: `false`
* `--log-sync-interval-min <LOG_SYNC_INTERVAL_MIN>` — min duration between log indexing operations. (seconds)

  Default value: `15`
* `--log-sync-interval-max <LOG_SYNC_INTERVAL_MAX>` — duration between log indexing operations. (seconds)

  Default value: `45`
* `--log-max-ttl-days <LOG_MAX_TTL_DAYS>` — max period of time logs are indexed/stored

  Default value: `7`
* `--swagger` — Storage size in bytes (rounded up to nearest OS page size)

  Default value: `false`

## `ordinaryd app`

start an Ordinary Application server

**Usage:** `ordinaryd app [OPTIONS] --project-dir <PROJECT_DIR>`

###### **Options:**

* `--provision <PROVISION>` — what mode TLS certs should be provisioned in

  Default value: `localhost`

  Possible values: `staging`, `production`, `localhost`

* `--port <PORT>` — specify HTTP(s) port for server
* `--redirect-port <REDIRECT_PORT>` — specify HTTP port for server when running in secure mode
* `--insecure` — run without HTTPS

  Default value: `false`
* `--insecure-cookies` — run with insecure cookies

  Default value: `false`
* `--log-headers` — whether HTTP request and response headers are logged

  Default value: `false`
* `--log-ips` — whether IP Addresses are logged with HTTP requests

  Default value: `false`
* `--redacted-header-hash <REDACTED_HEADER_HASH>` — "none" | "blake2" | "blake3"

  Default value: `none`
* `--project-dir <PROJECT_DIR>` — for running a standalone project. (project must already be built)
* `--domain-override <DOMAIN_OVERRIDE>` — use a different domain than what's in the `ordinary.json`

<hr/>

<small><i>
This document was generated automatically by
<a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.
</i></small>
