Install

Install Ostrakon

Run the server on your own machine with Docker Compose, then add the ostra CLI to talk to it.

Server

  1. 1

    Get the files

    Clone the repository at a release tag. The images are public on ghcr.io, but the .env.example of v0.9.0 still builds them from the clone by default (several minutes the first time). To pull them instead, comment out COMPOSE_FILE and uncomment OSTRAKON_VERSION=v0.9.0 in .env.

    git clone
    git clone --depth 1 --branch v0.9.0 https://github.com/ostrakon-app/ostrakon.git
    cd ostrakon/deploy/selfhost
    cp .env.example .env
    curl
    mkdir ostrakon && cd ostrakon
    base=https://raw.githubusercontent.com/ostrakon-app/ostrakon/v0.9.0/deploy/selfhost
    curl -fsSLO "$base/compose.yaml"
    curl -fsSLO "$base/Caddyfile"
    curl -fsSL "$base/.env.example" -o .env

    Only the files, pinned to a tag

    The images are published, so you can skip the clone: download the three files of deploy/selfhost at the tag, and delete the COMPOSE_FILE line of .env, which only exists to build from a clone.

  2. 2

    Fill the three secrets

    Generate each secret and paste it in .env. The stack refuses to start while one is empty. Back up the pepper with your database: without it nobody can log in again.

    openssl
    openssl rand -base64 48   # OSTRAKON_AUTH_JWT_SECRET
    openssl rand -base64 48   # OSTRAKON_AUTH_OSP_PEPPER
    openssl rand -hex 24      # OSTRAKON_DATABASE_PASSWORD
  3. 3

    Start the stack

    The API applies its own migrations at start. The web app then answers on 127.0.0.1:8080.

    shell
    docker compose build   # first time only, when building from a clone
    docker compose up -d
    docker compose ps      # api, web, postgres, redis: healthy
  4. 4

    Create the admin account

    Open http://localhost:8080 and register, or use ostra. You get a one-shot password (OSP), shown once: keep it.

    Register before you expose the serverOn an empty instance, whoever registers first becomes admin. Create your account, then publish the port or set a domain.
    ostra
    ostra config set endpoint http://localhost:8080/api/v1
    ostra register
    ostra login --osp <osp>

CLI

One line installs the latest ostra into ~/.local/bin.

shell
curl -fsSL https://ostrakon.dev/install.sh | sh
  • No sudo
  • Checked against SHA256SUMS
  • Linux and macOS
  • amd64 and arm64

It needs curl or wget, and sha256sum or shasum.

Read the script before you run itShow

Piping into sh runs whatever the server sends. The script is short: download it from the ostra repository, read it, then run it.

shell
curl -fsSL https://raw.githubusercontent.com/ostrakon-app/ostra/main/install.sh -o install.sh
less install.sh
sh install.sh

Other ways to install

A specific version

Set OSTRA_VERSION to a release tag, for example v0.9.0. OSTRA_INSTALL_DIR changes the target directory.

shell
curl -fsSL https://ostrakon.dev/install.sh | OSTRA_VERSION=v0.9.0 sh
curl -fsSL https://ostrakon.dev/install.sh | OSTRA_INSTALL_DIR="$HOME/bin" sh
Variables
VariableDefaultRole
OSTRA_VERSIONthe latest releaseTag to install, for example v0.9.0.
OSTRA_INSTALL_DIR$HOME/.local/binTarget directory.
OSTRA_BASE_URLhttps://github.com/ostrakon-app/ostra/releasesRoot of the releases, for mirrors and tests.

Manual download

Each GitHub release of ostra carries one archive per OS and architecture, next to SHA256SUMS and VERSION. ostra releases.

Manual download
OSArchArchive
Linuxamd64ostra_<version>_linux_amd64.tar.gz
Linuxarm64ostra_<version>_linux_arm64.tar.gz
macOSamd64ostra_<version>_darwin_amd64.tar.gz
macOSarm64ostra_<version>_darwin_arm64.tar.gz

Verify the checksum

Check the archive against SHA256SUMS before you extract it. SHA256SUMS comes from the same release: it catches a corrupted download, not a compromised release.

Linux
repo=https://github.com/ostrakon-app/ostra/releases
v=$(curl -fsSL "$repo/latest/download/VERSION") os=linux arch=amd64
curl -fsSLO "$repo/download/$v/ostra_${v}_${os}_${arch}.tar.gz"
curl -fsSLO "$repo/download/$v/SHA256SUMS"
sha256sum --ignore-missing -c SHA256SUMS
tar -xzf "ostra_${v}_${os}_${arch}.tar.gz" ostra
install -m 755 ostra ~/.local/bin/ostra
macOS
repo=https://github.com/ostrakon-app/ostra/releases
v=$(curl -fsSL "$repo/latest/download/VERSION") os=darwin arch=arm64
curl -fsSLO "$repo/download/$v/ostra_${v}_${os}_${arch}.tar.gz"
curl -fsSLO "$repo/download/$v/SHA256SUMS"
grep " ostra_${v}_${os}_${arch}.tar.gz$" SHA256SUMS | shasum -a 256 -c -
tar -xzf "ostra_${v}_${os}_${arch}.tar.gz" ostra
install -m 755 ostra ~/.local/bin/ostra

With Go

shell
go install github.com/ostrakon-app/ostra/cmd/ostra@v0.9.0

Check it works

shell
ostra version
ostra update --check   # exit 10 when an update is available

Exit codes

Scripts can read the exit code of ostra.

Exit codes
CodeMeaning
0Success (HTTP 2xx)
1General error: HTTP 400 or 5xx, local error (bad flag, unreadable file, network, csv unsupported)
2Authentication (HTTP 401)
3Forbidden (HTTP 403, or a JWT-only command run with an API key)
4Not found (HTTP 404)
5Conflict (HTTP 409)
6Rate limited (HTTP 429)
7Timeout (--timeout or --connect-timeout exceeded)
10update --check only: an update is available (not an error)