Installing Faramesh (Self-Hosted)

Run Faramesh on your own infrastructure for full control.

Install

Or from source:

git clone https://github.com/faramesh/faramesh-core.git
cd faramesh-core
pip install -e

git clone https://github.com/faramesh/faramesh-core.git
cd faramesh-core
pip install -e

git clone https://github.com/faramesh/faramesh-core.git
cd faramesh-core
pip install -e

Start the server

API: http://127.0.0.1:8000
Docs: http://127.0.0.1:8000/docs

Database

SQLite (default) — Good for development. Data stored in data/actions.db.

PostgreSQL (production) — Recommended for production:

export FARA_DB_BACKEND=postgres
export FARA_POSTGRES_DSN="postgresql://user:pass@localhost:5432/faramesh"

export FARA_DB_BACKEND=postgres
export FARA_POSTGRES_DSN="postgresql://user:pass@localhost:5432/faramesh"

export FARA_DB_BACKEND=postgres
export FARA_POSTGRES_DSN="postgresql://user:pass@localhost:5432/faramesh"

Migrate SQLite to Postgres

faramesh migrate --from sqlite --to
faramesh migrate --from sqlite --to
faramesh migrate --from sqlite --to

Policy file

By default, Faramesh uses policies/engine_v2.yaml. Place your policy file in the project or point to it when starting.

Approval notifications

To send approval notifications to Slack or email, configure those when starting the server. The Faramesh repo has setup examples for webhook and SMTP configuration.

Environment variables (common)

Variable

Description

FARA_DB_BACKEND

sqlite (default) or postgres

FARA_POSTGRES_DSN

PostgreSQL connection string when using postgres backend

FARA_POLICY_PATH

Path to policy file (default: policies/engine_v2.yaml)

FARA_HOST / FARA_PORT

Bind address and port (default 0.0.0.0:8000)

See the Faramesh server repo or faramesh serve --help for the full list.

Docker

For a containerized run, use the official image (if published) or build from the Faramesh server repo. Example:

docker run -p 8000:8000 -e FARA_DB_BACKEND
docker run -p 8000:8000 -e FARA_DB_BACKEND
docker run -p 8000:8000 -e FARA_DB_BACKEND

For production, mount a volume for SQLite data or set FARA_POSTGRES_DSN and use PostgreSQL. See Docker Compose for a full stack.

Was this helpful?

Was this helpful?

Was this helpful?

Previous

More

Previous

More

Previous

More

Next

More

Next

More

Next

More

Table of content

Table of content

Table of content

Installing Faramesh

Installing Faramesh