Skip to content

Docs · Operations

Self-hosting

Raisebook is one repository and one Docker Compose file. If you would rather keep your investor list on a machine you control, run your own copy. It is the same software as raisebook.org, with nothing held back.

What you need#

  • A Linux server with Docker and the Compose plugin. A small VM is enough to start.
  • Two hostnames pointing at it, one for the web app and one for the API (for example raise.example.com and api.raise.example.com). Ports 80 and 443 open.
  • An SMTP provider for sign-in links and invites. Any provider works; set up its SPF and DKIM records for your sending domain.

Install#

On the server
git clone https://github.com/gumruyanzh/raisebook.gitcd raisebookcp deploy/.env.example deploy/.env# edit deploy/.env: hosts, POSTGRES_PASSWORD, RAISEBOOK_SESSION_SECRET, SMTPdocker compose -f deploy/docker-compose.yml up -d --build

Generate the two secrets:

Secrets
# POSTGRES_PASSWORDopenssl rand -base64 36 | tr -d '/+=' | cut -c1-40# RAISEBOOK_SESSION_SECRET (changing it later signs everyone out)python3 -c "import secrets; print(secrets.token_urlsafe(48))"

Caddy requests TLS certificates on its own once DNS points at the server. Open the web host, sign in with your email, and create your workspace.

What runs#

Compose services
ServiceWhat it does
postgresPostgres 17 with a named volume. Not exposed outside the compose network.
migrateRuns alembic upgrade head once, then exits. The API waits for it.
apiFastAPI: the REST API under /v1 and the MCP server at /mcp.
webThe Next.js app and this site.
caddyTLS and reverse proxy. The only service that publishes ports.

Configuration#

Everything lives in deploy/.env (the template is deploy/.env.example). The main settings:

Main settings
VariableWhat it sets
WEB_HOST, API_HOSTYour two hostnames. MCP is served at https://API_HOST/mcp.
POSTGRES_PASSWORDDatabase password. Required.
RAISEBOOK_SESSION_SECRETSigns session cookies and CSRF tokens. Required.
RAISEBOOK_SESSION_COOKIE_DOMAINThe parent domain both hosts share, so the session reaches the API.
RAISEBOOK_SMTP_HOST, _PORT, _USERNAME, _PASSWORDYour SMTP provider.
RAISEBOOK_EMAIL_FROMSender, e.g. "Raisebook <login@raise.example.com>".
RAISEBOOK_RATE_LIMIT_BACKENDpostgres (default), memory or off.
NEXT_PUBLIC_SPONSOR_URLThe Support link. Point it anywhere, or at nothing.

Updating#

Update
cd raisebook && git pulldocker compose -f deploy/docker-compose.yml up -d --build# the migrate service applies database migrations before the API starts

Backups#

deploy/backup.sh dumps the database nightly and deletes dumps older than BACKUP_RETENTION_DAYS (14 by default). The hosted service promises that deleted data leaves backups within 14 days; keep the same limit if you make that promise to your team. Run it from cron, as the comment at the top of the script shows.

Also run docker compose -f deploy/docker-compose.yml exec api rbctl housekeeping once a day. It removes expired sign-in links, sessions and old rate-limit counters.

Run it locally#

For development, run the API and the web app directly against a local Postgres 17:

Development
createdb raisebook_devpsql raisebook_dev -c 'CREATE EXTENSION IF NOT EXISTS citext; CREATE EXTENSION IF NOT EXISTS pg_trgm;'# terminal 1, from the repo root: API and MCP on :8000cd backend && uv syncRAISEBOOK_DATABASE_URL=postgresql://localhost/raisebook_dev uv run alembic upgrade headRAISEBOOK_ENV=dev uv run uvicorn --factory raisebook.main:create_app --reload# terminal 2, from the repo root: web on :3000cd web && npm ci && npm run dev# optional, from backend/: a sample workspace with fictional investorsuv run rbctl seed-demo --email you@example.com

In development, the “check your inbox” page shows the sign-in link, so you do not need SMTP. Contributing? Read CONTRIBUTING.md .

The license#

Raisebook is AGPL-3.0. You can run, change and share it freely. If you change it and let other people use your version over a network, you must offer them its source code. Running an unmodified copy asks nothing more of you than keeping the license notices.