Install
Install Ostrakon
Run the server on your own machine with Docker Compose, then add the ostra CLI to talk to it.
Server
- 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 clonegit clone --depth 1 --branch v0.9.0 https://github.com/ostrakon-app/ostrakon.git cd ostrakon/deploy/selfhost cp .env.example .envcurlmkdir 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 .envOnly 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
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 rand -base64 48 # OSTRAKON_AUTH_JWT_SECRET openssl rand -base64 48 # OSTRAKON_AUTH_OSP_PEPPER openssl rand -hex 24 # OSTRAKON_DATABASE_PASSWORD - 3
Start the stack
The API applies its own migrations at start. The web app then answers on 127.0.0.1:8080.
docker compose build # first time only, when building from a clone docker compose up -d docker compose ps # api, web, postgres, redis: healthy - 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 config set endpoint http://localhost:8080/api/v1 ostra register ostra login --osp <osp>
CLI
One line installs the latest ostra into ~/.local/bin.
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.
curl -fsSL https://raw.githubusercontent.com/ostrakon-app/ostra/main/install.sh -o install.sh
less install.sh
sh install.shOther 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.
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| Variable | Default | Role |
|---|---|---|
OSTRA_VERSION | the latest release | Tag to install, for example v0.9.0. |
OSTRA_INSTALL_DIR | $HOME/.local/bin | Target directory. |
OSTRA_BASE_URL | https://github.com/ostrakon-app/ostra/releases | Root 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.
| OS | Arch | Archive |
|---|---|---|
| Linux | amd64 | ostra_<version>_linux_amd64.tar.gz |
| Linux | arm64 | ostra_<version>_linux_arm64.tar.gz |
| macOS | amd64 | ostra_<version>_darwin_amd64.tar.gz |
| macOS | arm64 | ostra_<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.
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/ostrarepo=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/ostraWith Go
go install github.com/ostrakon-app/ostra/cmd/ostra@v0.9.0Check it works
ostra version
ostra update --check # exit 10 when an update is availableExit codes
Scripts can read the exit code of ostra.
| Code | Meaning |
|---|---|
0 | Success (HTTP 2xx) |
1 | General error: HTTP 400 or 5xx, local error (bad flag, unreadable file, network, csv unsupported) |
2 | Authentication (HTTP 401) |
3 | Forbidden (HTTP 403, or a JWT-only command run with an API key) |
4 | Not found (HTTP 404) |
5 | Conflict (HTTP 409) |
6 | Rate limited (HTTP 429) |
7 | Timeout (--timeout or --connect-timeout exceeded) |
10 | update --check only: an update is available (not an error) |