Skip to Content
FontegoDocs

Install

Run fontego-server in Docker or from source, and set up the first admin and workspace without questions.

Fontego is one server with its data in one folder: every workspace (a Git repository each) and an SQLite database with the accounts and the logs. It needs git 2.38 or newer, which the container already has.

In Docker

From a checkout of fontego-app with fontego-cli next to it (the image takes @fontego/core from there):

docker compose up -d --wait

compose.yaml runs the container locked down: it writes only to its data volume and to /tmp, holds no Linux capabilities, can't gain privileges, and has a ceiling of memory, CPU and processes, so whatever happens inside stays inside. Never mount the Docker socket into it.

These variables, in the environment or in a .env file next to compose.yaml, change how it runs:

VariableDefault
FONTEGO_BIND127.0.0.1:8740Where the port is published. Keep it on 127.0.0.1 and put a proxy with HTTPS in front
FONTEGO_PUBLIC_URLhttp://localhost:8740The address people and their CLIs use
FONTEGO_MEMORY1gMemory limit; raise it for big workspaces
FONTEGO_CPUS1.0CPU limit

Mail, a config file and backups go in its environment section; compose.yaml has each one commented. Without Compose:

docker build --build-context fontego-cli=../fontego-cli -t fontego-server .

From source

With Bun 1.3.14 or newer and git 2.38 or newer:

git clone https://github.com/fontego-ai/fontego-app.git
git clone https://github.com/fontego-ai/fontego-cli.git
cd fontego-app && bun install
FONTEGO_DATA_DIR=/var/lib/fontego bun server/src/main.ts serve

The data folder is created with mode 0700: only the server's user may enter it.

The first run

fontego-server init sets up a new instance without asking anything, so a script or an agent can install Fontego from start to finish:

fontego-server init you@example.org --display-name "Our team" --workspace notes --template demo --token
  • The server admin: the email given, with a link to choose a password, which init prints.
  • A token for the CLI, with --token, printed once.
  • The visible name of the web app, with --display-name. An admin can change it later.
  • The first workspace, with --workspace SLUG, and the admin as its admin. It starts empty, or filled from:
    • --template NAME: a template. fontego-server templates lists them; the server ships the ones in examples/, and the config's templatesDir adds your own, one folder each.
    • --from PATH: a folder or a .zip on the server's machine. In Docker, mount it first (the /import volume in compose.yaml).
    • --git URL|PATH: a Git repository, with its history; --branch picks the branch and --no-history takes only its last version.

Each option has its key in the [init] table of the config file, so one file can describe a whole install; options on the command line win. Running init again changes nothing that is already there.

Every file brought in goes through the checks of any write (secrets, size, rejected paths) and the ignore rules the source carries (its .fontegoignore files). What is left out is listed. A failed import leaves no workspace behind.

In Docker, run it inside the container:

docker compose exec server fontego-server init you@example.org --workspace notes --template demo --token

Then

  • Sign in at the link init printed, or with the CLI: fontego login <public URL>.
  • Invite people: People and accounts.
  • Before others use it: Production.

Every command of fontego-server is in the server reference.

On this page