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.comandapi.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#
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 --buildGenerate the two 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#
| Service | What it does |
|---|---|
| postgres | Postgres 17 with a named volume. Not exposed outside the compose network. |
| migrate | Runs alembic upgrade head once, then exits. The API waits for it. |
| api | FastAPI: the REST API under /v1 and the MCP server at /mcp. |
| web | The Next.js app and this site. |
| caddy | TLS and reverse proxy. The only service that publishes ports. |
Configuration#
Everything lives in deploy/.env (the template is deploy/.env.example). The main settings:
| Variable | What it sets |
|---|---|
| WEB_HOST, API_HOST | Your two hostnames. MCP is served at https://API_HOST/mcp. |
| POSTGRES_PASSWORD | Database password. Required. |
| RAISEBOOK_SESSION_SECRET | Signs session cookies and CSRF tokens. Required. |
| RAISEBOOK_SESSION_COOKIE_DOMAIN | The parent domain both hosts share, so the session reaches the API. |
| RAISEBOOK_SMTP_HOST, _PORT, _USERNAME, _PASSWORD | Your SMTP provider. |
| RAISEBOOK_EMAIL_FROM | Sender, e.g. "Raisebook <login@raise.example.com>". |
| RAISEBOOK_RATE_LIMIT_BACKEND | postgres (default), memory or off. |
| NEXT_PUBLIC_SPONSOR_URL | The Support link. Point it anywhere, or at nothing. |
Updating#
cd raisebook && git pulldocker compose -f deploy/docker-compose.yml up -d --build# the migrate service applies database migrations before the API startsBackups#
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:
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.comIn 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.