Install

The one-line install, what it does step by step, every option, server and offline installs, upgrades and removal.

Forkbase is one program, forkbase. The Chronos engine, chronos, goes beside it: it is the database in chronos mode, and it holds agents' worlds in both modes. This page installs both from a terminal. For containers, see Docker. For what the machine needs, see Requirements.

The one-line install

On macOS or Linux:

shell
curl -fsSL https://forkbase.tech/install.sh | FORKBASE_ENGINE=1 sh

forkbase.tech serves the latest release's installer, the same file as https://github.com/2090-labs/forkbase/releases/latest/download/install.sh. It runs as you, never as root, and changes nothing outside the folder it installs to (and, if you say yes, your shell's startup file, for PATH).

What it does, step by step

  1. Picks the build for your OS and CPU: macOS (Apple silicon or Intel), or Linux (x86-64 or ARM64). Linux builds are static and run on any distribution. Any other platform stops here with a clear message.
  2. Checks it can write to the install folder, ~/.local/bin by default.
  3. Asks whether to install the engine too, about 20 MB, when you didn't say (FORKBASE_ENGINE). If the engine is already in the folder, it is checked and updated without asking.
  4. Downloads each file with its size, speed and time left, and retries and resumes a download that stalls.
  5. Checks each file's SHA-256 against the release's SHA256SUMS, and its Sigstore signature when cosign is on your PATH.
  6. Runs the new program once (--version) before putting it in place, so a broken download never replaces a working install. The same version already there is left as it is (--force reinstalls).
  7. Checks your PATH. When the folder isn't on it, it offers to add it to your shell's startup file. When another forkbase comes first on your PATH, it warns you.
  8. Offers to set up a project (in a terminal only): see below.

Setting up a project

Say yes when it asks Set up a project now? and it walks you through the rest, one question at a time:

It asksDefaultWhat happens
Project folder./myapp (or myapp-2...)an existing project there is used as it is; a folder with other files asks first
Databasechronoschronos: the engine, nothing else to run. postgres: it asks for your Postgres URL
Start Forkbase nowyesstarts it in the background and waits for /health (up to 3 minutes; the first start sets up the database)
Your dashboard sign-inan email and a password (typed hidden), kept only in this project's database as an Argon2 hash
Share that email with the Forkbase teamnosends only the email, and only on a yes
Open the dashboard in your browseryesopens http://127.0.0.1:8000/dashboard/

It picks free ports when 8000 (the API) or 54329 (the engine's SQL port) are taken, and writes them to forkbase.toml. At the end it prints the API and dashboard addresses, the anon key, and the commands to stop, start and uninstall. Forkbase keeps running after the installer ends and after you close the terminal. Logs go to <project>/.forkbase/forkbase.log.

Options

Each option is a flag (after sh -s --) or an environment variable. Both of these do the same:

shell
curl -fsSL https://forkbase.tech/install.sh | sh -s -- --engine --version v0.9.1
curl -fsSL https://forkbase.tech/install.sh | FORKBASE_ENGINE=1 FORKBASE_VERSION=v0.9.1 sh
FlagVariableWhat it does
--engine, --no-engineFORKBASE_ENGINE=1|0install the Chronos engine too, or not (asked in a terminal)
--version <tag>FORKBASE_VERSIONa release tag such as v0.9.1 (default: the release the script came from, the latest)
--dir <folder>FORKBASE_INSTALL_DIRwhere the programs go (default ~/.local/bin)
--add-pathFORKBASE_ADD_PATH=1add that folder to your shell's PATH (asked in a terminal)
--forceFORKBASE_FORCE=1reinstall even when the same version is there
--setup, --no-setupFORKBASE_SETUP=1|0set up a project after installing (asked in a terminal)
--project <folder>FORKBASE_PROJECTthe project's folder (default ./myapp)
--db chronos|postgresFORKBASE_DBthe project's database
--database-url <url>FORKBASE_DATABASE_URLpostgres mode: your database (implies --db postgres)
--no-startFORKBASE_START=0set the project up but don't start it
--email <address>FORKBASE_OWNER_EMAILthe dashboard sign-in's email. The password comes from FORKBASE_OWNER_PASSWORD, or is asked, hidden
--share-email, --no-share-emailFORKBASE_SHARE_EMAIL=1|0send that email (only) to the Forkbase team (asked in a terminal; never sent unasked)
--yes, -yFORKBASE_YES=1ask nothing, take the defaults. No project is set up unless --setup
--quiet, -qFORKBASE_QUIET=1print only errors and the last line
--no-colorNO_COLOR=1plain text
FORKBASE_VERIFY=1|01 requires the signature check (and cosign). 0 skips it, with a warning
FORKBASE_BASE_URL, FORKBASE_ENGINE_BASE_URLdownload from a mirror instead of GitHub

Without questions (CI, scripts, servers)

Piped into sh from a script, with no terminal, the installer asks nothing. To be explicit:

shell
# programs only
curl -fsSL https://forkbase.tech/install.sh | sh -s -- --engine --yes

# programs and a running project on the engine
curl -fsSL https://forkbase.tech/install.sh | FORKBASE_OWNER_PASSWORD="$PW" sh -s -- \
  --engine --yes --setup --project ~/myapp --db chronos --email you@company.com --no-share-email

# over your Postgres
curl -fsSL https://forkbase.tech/install.sh | sh -s -- \
  --engine --yes --setup --project ~/myapp --database-url "$DATABASE_URL"

On a server

Install into /usr/local/bin so every user (and systemd) finds it. The script never asks for root, so download it and run it with sudo yourself:

shell
curl -fsSL https://forkbase.tech/install.sh -o install.sh
less install.sh                                   # read it first
sudo env FORKBASE_INSTALL_DIR=/usr/local/bin FORKBASE_ENGINE=1 sh install.sh --yes

Then run it as a service: Self-hosting, systemd.

Start a project by hand

If you skipped the project setup:

shell
mkdir myapp && cd myapp
forkbase init --db chronos                      # or: --db postgres --database-url postgres://...
forkbase start --background                     # or forkbase start, to keep it in this terminal
forkbase status                                 # {"status": "ok", ...}
forkbase keys                                   # the anon and service_role keys
printf '%s\n' "$PASSWORD" | forkbase owner --email you@company.com   # a dashboard sign-in

Then open http://127.0.0.1:8000/dashboard/. The rest is in Getting started.

What init makes:

PathWhat
forkbase.tomlthe configuration (see Configuration)
.forkbase/secrets.jsonthe keys that sign API keys and sessions, and the engine's tokens. Back it up; keep it secret
.forkbase/api-keys.jsonthe anon and service_role keys, written at each start
.forkbase/chronos/chronos mode: the database
.forkbase/storage/stored files, unless storage is on S3
.forkbase/forkbase.log, forkbase.pidthe background server's log and process id

Check a release by hand

Every release's files are signed keylessly by 2090 Labs' release account. With cosign:

shell
cosign verify-blob --bundle forkbase-x86_64-unknown-linux-musl.tar.gz.sigstore.json \
  --certificate-identity chronos-release@project-7a947b34-cb98-4716-8f2.iam.gserviceaccount.com \
  --certificate-oidc-issuer https://accounts.google.com forkbase-x86_64-unknown-linux-musl.tar.gz

Install without the script

For a machine with no internet access, or to see each step. The release files are named by target:

TargetMachine
aarch64-apple-darwinmacOS, Apple silicon
x86_64-apple-darwinmacOS, Intel
x86_64-unknown-linux-muslLinux, x86-64
aarch64-unknown-linux-muslLinux, ARM64
shell
T=x86_64-unknown-linux-musl V=v0.9.1
curl -fLO https://github.com/2090-labs/forkbase/releases/download/$V/forkbase-$T.tar.gz
curl -fLO https://github.com/2090-labs/forkbase/releases/download/$V/SHA256SUMS
grep " forkbase-$T.tar.gz\$" SHA256SUMS | sha256sum -c -     # macOS: shasum -a 256 -c -
tar -xzf forkbase-$T.tar.gz && install -m 755 forkbase ~/.local/bin/

The engine is the same, from Chronos-DB's releases: get the version the Forkbase release names (its notes say which; 0.9.1 uses v0.9.3) and put chronos beside forkbase, or anywhere and set FORKBASE_CHRONOS_BIN.

Build from source

Needs Rust 1.90+, Node 20+ (for the dashboard) and 8 GB of memory:

shell
git clone https://github.com/2090-labs/forkbase && cd forkbase
(cd dashboard && npm ci && npm run build)      # the dashboard is built into the program
cargo build --profile dist -p forkbase          # target/dist/forkbase

Upgrade

Run the installer again. It installs the latest release (or FORKBASE_VERSION), and the engine version that release was tested with. Then restart:

shell
curl -fsSL https://forkbase.tech/install.sh | sh -s -- --yes
cd myapp && forkbase stop && forkbase start --background

Read the release notes first: releases, or the changelog. Migrations run at start, are append-only and never drop your data. To go back, install the older version with --version (a newer database may not run on an older Forkbase: restore a backup taken before the upgrade).

Uninstall

From the project's folder:

shell
forkbase uninstall            # stops it, deletes forkbase and chronos, keeps your projects
forkbase uninstall --purge    # also deletes this folder's data folder and forkbase.toml

It asks first (--yes doesn't). --purge deletes this project's database, files and keys for good: take a backup first if you may want them. Remove the PATH line from your shell's startup file yourself, if the installer added one.

When something goes wrong

You seeDo this
no prebuilt binary for <OS> <CPU> yetuse Docker, or build from source
can't write to <folder>pick a folder you own with --dir, or run the downloaded script with sudo
needs curl, needs tar, needs sha256sum or shasuminstall that tool (apt install curl, apk add curl...)
forkbase: command not found after installingopen a new terminal, or add ~/.local/bin to PATH (rerun with --add-path)
another forkbase comes first on your PATHremove the old one, or put the install folder first on PATH
something already answers on http://127.0.0.1:8000another Forkbase (or app) runs there: stop it, or change server.listen
Forkbase stopped while startingit prints the end of the log: often a wrong Postgres URL or password. Fix it, then forkbase start --background
didn't answer within 3 minutesread .forkbase/forkbase.log. A slow first start on a big Postgres can take longer: start it again
a checksum or signature failsdon't use the file. Download again; if it fails twice, tell us

More in Troubleshooting.

Something wrong or missing? Edit this page on GitHub or open an issue.

Install · Forkbase