This is the canonical setup guide for local Marreq environments. It explains how to run marreq-server and marreq-cloud both with Docker and without Docker, and links out to the more specialized references when you need deeper detail.
| Binary | Best for | User onboarding | Typical local entry point |
|---|---|---|---|
marreq-server |
Self-hosted deployments | Admin-created users | Docker SPA on http://localhost:8080 or direct Rocket on http://127.0.0.1:8000 |
marreq-cloud |
Hosted / SaaS-style deployments | Site-admin bootstrap + self-registration | Docker API on http://127.0.0.1:8001 or direct Rocket on http://127.0.0.1:8000 |
For architecture and deployment-mode differences, see workspace-layout.md. Federated login and Server OIDC configuration are documented in authentication.md.
- Rust toolchain (
cargo) - Node.js + npm for the SPA (
frontend/) - PostgreSQL locally, or Docker Compose for the bundled database
- Diesel CLI for schema setup:
cargo install diesel_cli --no-default-features --features postgres
- Optional Ollama if you want embeddings / semantic search
- SMTP if you want
marreq-cloudemail verification and password-reset flows
- Copy the environment template:
cp .env.example .env
- Choose your database target:
- Docker DB: keep the default
DATABASE_URL=postgres://rust:rust@127.0.0.1:5433/marreq - Local PostgreSQL: update
DATABASE_URLin.env
- Docker DB: keep the default
- Initialize the database schema:
./marreq-core/scripts/db_setup.sh
- Optional: load demo projects, users, and traceability data:
./marreq-core/scripts/db_setup.sh --seed
db_setup.shcreates themarreqdatabase if needed and runs Diesel migrations.- On a fresh empty database, the baseline migration creates a default admin user:
alice/ChangeMe123!. --seedadds the rest of the demo users, projects, requirements, verifications, and sample matrix data.
For database internals, reset flows, and manual migration commands, see database-setup.md.
Use this when you want the standard self-hosted stack with the bundled frontend container.
- Prepare
.envand initialize the database:cp .env.example .env ./marreq-core/scripts/db_setup.sh --seed
- Start the stack:
docker compose -f docker/docker-compose.yml up -d
- Open the SPA at
http://localhost:8080. - Log in with
alice/ChangeMe123!or your own admin account.
Notes:
- The Docker frontend proxies
/apitomarreq-server. - The backend is also reachable directly on
http://127.0.0.1:8000/api. - If you do not want demo data, omit
--seed; the baseline adminaliceis still present on a brand-new empty database.
For container-level details, service names, health checks, and direct image builds, see ../../docker/README.md.
Use this when you want to run Rocket directly from your checkout.
- Point
.envat your local PostgreSQL instance if you are not using the Docker DB. - Initialize the database:
./marreq-core/scripts/db_setup.sh --seed
- Start the server binary:
cargo run -p marreq-server
- Either:
- open Rocket directly at
http://127.0.0.1:8000, or - run the SPA dev server:
then use
cd frontend npm install npm run devhttp://localhost:5173.
- open Rocket directly at
Notes:
- The Vite dev proxy already targets
http://127.0.0.1:8000, so it works with the defaultmarreq-serverport. - If you skip
--seed, a brand-new empty database still includes the default adminalice.
Use this when you want the hosted/SaaS deployment binary in containers.
- Prepare
.env:cp .env.example .env
- Set the cloud-only variables in
.env:MARREQ_SITE_ADMIN_EMAILMARREQ_SITE_ADMIN_BOOTSTRAP_PASSWORDMARREQ_PUBLIC_BASE_URLSMTP_HOST,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORD,SMTP_FROM_ADDRESS(required for email verification / reset links to actually send)
- Initialize the database:
./marreq-core/scripts/db_setup.sh
- Start the cloud binary:
docker compose -f docker/docker-compose.yml --profile cloud up -d marreq-cloud frontend-cloud
- Open the SPA at
http://localhost:8082.
Notes:
marreq-cloudbootstraps or promotes the configured site admin at startup.- The cloud Docker frontend proxies
/apitomarreq-cloud. - The backend is also reachable directly on
http://127.0.0.1:8001/api. - Set
MARREQ_PUBLIC_BASE_URLto the actual browser origin that should appear in cloud email links. The Docker compose default ishttp://localhost:8082.
Use this when you want the simplest local cloud-mode setup with the React SPA.
- Prepare
.envand set the same cloud-only variables as above. - Initialize the database:
./marreq-core/scripts/db_setup.sh
- Start the cloud binary:
cargo run -p marreq-cloud
- Optional but recommended: run the SPA locally:
cd frontend npm install npm run dev - Open:
http://localhost:5173for the SPA, orhttp://127.0.0.1:8000/apifor direct API access.
Notes:
- The default Vite proxy target is
http://127.0.0.1:8000, so localmarreq-cloudworks with the SPA without extra proxy changes as long as you keep the default Rocket port. - If you need to run
marreq-serverandmarreq-cloudside by side outside Docker, start one of them on another port, for example:In that case, update your SPA proxy or other client configuration to match.ROCKET_PORT=8001 cargo run -p marreq-cloud
- Without SMTP, the cloud site admin can still be bootstrapped, but end-user email verification and password-reset delivery will not work.