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:
curl -fsSL https://forkbase.tech/install.sh | FORKBASE_ENGINE=1 shforkbase.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
- 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.
- Checks it can write to the install folder,
~/.local/binby default. - 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. - Downloads each file with its size, speed and time left, and retries and resumes a download that stalls.
- Checks each file's SHA-256 against the release's
SHA256SUMS, and its Sigstore signature whencosignis on yourPATH. - 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 (--forcereinstalls). - Checks your
PATH. When the folder isn't on it, it offers to add it to your shell's startup file. When anotherforkbasecomes first on yourPATH, it warns you. - 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 asks | Default | What happens |
|---|---|---|
| Project folder | ./myapp (or myapp-2...) | an existing project there is used as it is; a folder with other files asks first |
| Database | chronos | chronos: the engine, nothing else to run. postgres: it asks for your Postgres URL |
| Start Forkbase now | yes | starts it in the background and waits for /health (up to 3 minutes; the first start sets up the database) |
| Your dashboard sign-in | an email and a password (typed hidden), kept only in this project's database as an Argon2 hash | |
| Share that email with the Forkbase team | no | sends only the email, and only on a yes |
| Open the dashboard in your browser | yes | opens 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:
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| Flag | Variable | What it does |
|---|---|---|
--engine, --no-engine | FORKBASE_ENGINE=1|0 | install the Chronos engine too, or not (asked in a terminal) |
--version <tag> | FORKBASE_VERSION | a release tag such as v0.9.1 (default: the release the script came from, the latest) |
--dir <folder> | FORKBASE_INSTALL_DIR | where the programs go (default ~/.local/bin) |
--add-path | FORKBASE_ADD_PATH=1 | add that folder to your shell's PATH (asked in a terminal) |
--force | FORKBASE_FORCE=1 | reinstall even when the same version is there |
--setup, --no-setup | FORKBASE_SETUP=1|0 | set up a project after installing (asked in a terminal) |
--project <folder> | FORKBASE_PROJECT | the project's folder (default ./myapp) |
--db chronos|postgres | FORKBASE_DB | the project's database |
--database-url <url> | FORKBASE_DATABASE_URL | postgres mode: your database (implies --db postgres) |
--no-start | FORKBASE_START=0 | set the project up but don't start it |
--email <address> | FORKBASE_OWNER_EMAIL | the dashboard sign-in's email. The password comes from FORKBASE_OWNER_PASSWORD, or is asked, hidden |
--share-email, --no-share-email | FORKBASE_SHARE_EMAIL=1|0 | send that email (only) to the Forkbase team (asked in a terminal; never sent unasked) |
--yes, -y | FORKBASE_YES=1 | ask nothing, take the defaults. No project is set up unless --setup |
--quiet, -q | FORKBASE_QUIET=1 | print only errors and the last line |
--no-color | NO_COLOR=1 | plain text |
FORKBASE_VERIFY=1|0 | 1 requires the signature check (and cosign). 0 skips it, with a warning | |
FORKBASE_BASE_URL, FORKBASE_ENGINE_BASE_URL | download 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:
# 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:
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 --yesThen run it as a service: Self-hosting, systemd.
Start a project by hand
If you skipped the project setup:
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-inThen open http://127.0.0.1:8000/dashboard/. The rest is in Getting started.
What init makes:
| Path | What |
|---|---|
forkbase.toml | the configuration (see Configuration) |
.forkbase/secrets.json | the keys that sign API keys and sessions, and the engine's tokens. Back it up; keep it secret |
.forkbase/api-keys.json | the 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.pid | the 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:
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.gzInstall without the script
For a machine with no internet access, or to see each step. The release files are named by target:
| Target | Machine |
|---|---|
aarch64-apple-darwin | macOS, Apple silicon |
x86_64-apple-darwin | macOS, Intel |
x86_64-unknown-linux-musl | Linux, x86-64 |
aarch64-unknown-linux-musl | Linux, ARM64 |
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:
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/forkbaseUpgrade
Run the installer again. It installs the latest release (or FORKBASE_VERSION), and the engine version that release
was tested with. Then restart:
curl -fsSL https://forkbase.tech/install.sh | sh -s -- --yes
cd myapp && forkbase stop && forkbase start --backgroundRead 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:
forkbase uninstall # stops it, deletes forkbase and chronos, keeps your projects
forkbase uninstall --purge # also deletes this folder's data folder and forkbase.tomlIt 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 see | Do this |
|---|---|
no prebuilt binary for <OS> <CPU> yet | use 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 shasum | install that tool (apt install curl, apk add curl...) |
forkbase: command not found after installing | open a new terminal, or add ~/.local/bin to PATH (rerun with --add-path) |
another forkbase comes first on your PATH | remove the old one, or put the install folder first on PATH |
something already answers on http://127.0.0.1:8000 | another Forkbase (or app) runs there: stop it, or change server.listen |
Forkbase stopped while starting | it prints the end of the log: often a wrong Postgres URL or password. Fix it, then forkbase start --background |
didn't answer within 3 minutes | read .forkbase/forkbase.log. A slow first start on a big Postgres can take longer: start it again |
| a checksum or signature fails | don'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.