Skip to main content

Crate ordinaryd

Crate ordinaryd 

Source
Expand description

§Ordinary Server

crates.io docs.rs dependency status License: AGPL v3

Server daemon for Ordinary.

§Installation

Prebuilt releases are provided here.

Note: When building from source, esbuild will need to be installed because it is used to bundle the built-in TypeScript/JavaScript files.

§git

## clone
git clone https://codeberg.org/ordinarylabs/Ordinary.git

## install (will take awhile)
cargo install --path Ordinary/core/apps/daemon/ 

§crates.io

cargo install ordinaryd@0.8.2

## OR if your platform has prebuilt binaries in <https://codeberg.org/ordinarylabs/Ordinary/releases>
cargo binstall ordinaryd@0.8.2

§Homebrew

## add the ordinarylabs tap
brew tap ordinarylabs/tap --custom-remote https://codeberg.org/ordinarylabs/homebrew-tap

## trust the ordinarylabs tap
brew trust ordinarylabs/tap

## supported for `aarch64-apple-darwin`, `aarch64-unknown-linux-gnu`, `x86_64-unknown-linux-gnu`
brew install ordinaryd

§Quick Start

Initialize a new instance.

ordinaryd init \
    --password '******' \
    --environment development \
    --api-domain ordinaryd.local \
    --storage-size 10000000

Start initialized instance.

ordinaryd api \
    --environment development \
    --provision localhost \
    --insecure \
    --port 4433 \
    --redirect-port 8080 \
    --storage-size 10000000 \
    --stdio-logs \
    --swagger

§CLI Documentation

ordinaryd --help

See: docs/cli-reference.md.

§On Shutdown (terminate/ctrl-c)

When shutdown, the daemon will “gracefully” shut down all open http1/http2 connections via hyper’s graceful_shutdown method; this should allow for all connection dependent tasks to resolve prior to termination.

Non-connection based background tasks (cache and log syncing) still need to be set up to run a final time prior to termination and after all connections have been closed.

§License

Copyright 2026 Ordinary Labs, LLC

Licensed under the GNU AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html

§Security

THIS CODE HAS NOT BEEN AUDITED OR REVIEWED. USE AT YOUR OWN RISK.

Refer to the Security Policy.

§Command-Line Help for ordinaryd

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

Command Overview:

§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

  • --stored-logs — persists JSON formatted log lines to /logs//

    Default value: false

  • --stdio-logs — logs events to stdio

    Default value: false

  • --stdio-logs-fmt <STDIO_LOGS_FMT> — how to format stdio logs

    Default value: json

    Possible values: concise, pretty, json

  • --journald-logs — logs events to journald (only works on Linux distros that use systemd)

    Default value: false

  • --log-level <LOG_LEVEL> — base log level for every component

    Default value: info

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

  • --log-sizes — whether storage and certain payload sizes are logged

    Default value: false

  • --stdio-logs-timing — whether span timing is 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-ttl-hours <LOG_TTL_HOURS> — max period of time logs are stored

    Default value: 72

  • --log-rotation-file-size <LOG_ROTATION_FILE_SIZE> — max size (in bytes) per log file

    Default value: 10000000

  • --log-rotation-mins <LOG_ROTATION_MINS> — max amount of time a log file is appended to before being compressed and stored

    Default value: 60

  • --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

  • --danger-dns-no-verify — set to true to bypass verification of proxy domain and CNAME DNS TXT records.

    IMPORTANT: should ONLY be used for local development and testing.

    Default value: false

  • --dedicated-ports — give each app its own port

    Default value: false

  • --openapi — whether to expose the OpenAPI JSON at /openapi

    Note: this will automatically be turned on when --swagger is passed.

    Default value: false

  • --swagger — whether to expose the Swagger docs at /swagger

    Default value: false

§ordinaryd app

start an Ordinary Application server

Usage: ordinaryd app [OPTIONS]

§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-ttl-hours <LOG_TTL_HOURS> — max period of time logs are stored

    Default value: 72

  • --log-rotation-file-size <LOG_ROTATION_FILE_SIZE> — max size (in bytes) per log file

    Default value: 10000000

  • --log-rotation-mins <LOG_ROTATION_MINS> — max amount of time a log file is appended to before being compressed and stored

    Default value: 60

  • --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

  • --danger-dns-no-verify — set to true to bypass verification of proxy domain and CNAME DNS TXT records.

    IMPORTANT: should ONLY be used for local development and testing.

    Default value: false

  • -p, --project <PROJECT> — for running a standalone project. (project must already be built)

    Default value: .

  • --domain-override <DOMAIN_OVERRIDE> — use a different domain than what’s in the ordinary.json


This document was generated automatically by clap-markdown.

Modules§

cmds
fmt

Structs§

ApiInit
AppApi
Cli
GlobalArgs

Enums§

Commands
LogFileRotation
LogLevel
ProvisionMode

Functions§

run
setup