By the end of this guide you will have a fully operational OpsMind instance running on your machine, a registered user account, a JWT token in hand, and a live monitor actively tracking an HTTP endpoint — all in under five minutes. The only external dependency beyond Docker is a free Google Gemini API key, which powers the AI-based incident diagnosis engine.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LENINMORENO13/OpsMind/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Make sure the following tools are installed and available on your
You do not need Node.js installed locally; everything runs inside Docker containers.
PATH before continuing:| Requirement | Notes |
|---|---|
| Git | For cloning the repository |
| Docker | Engine v24 or newer recommended |
| Docker Compose | Included in Docker Desktop; use docker compose (v2 plugin) |
| Gemini API key | Free tier available — obtain one at https://aistudio.google.com/ |
Configure Environment Variables
Copy the provided example file to create your local Open Update each value as described below:
.env:.env in your editor. It should look like this:.env
| Variable | What to set |
|---|---|
PORT | Leave as 3000 unless that port is already taken on your machine. |
DATABASE_URL | When running via Docker Compose the database host must be db (the Compose service name), not localhost. See the pre-configured value Docker Compose injects for the api service — you only need this file for local non-Docker runs. |
GEMINI_API_KEY | Paste the API key you obtained from Google AI Studio. This is the only value you must change before starting. |
Docker Compose overrides
DATABASE_URL and JWT_SECRET automatically for the api container (see docker-compose.yml). The .env file is primarily used for local development outside of Docker, but GEMINI_API_KEY is read from it by Compose via the ${GEMINI_API_KEY} interpolation, so you must set it there.Start with Docker Compose
Build the images and start both the PostgreSQL database and the API server:Docker Compose will:
- Pull the
postgres:15-alpineimage and start thedbservice. - Build the
apiimage from the localDockerfile(Node 20 Alpine). - Run
npx prisma db pushinside the container to apply the schema to PostgreSQL. - Start the Express server and the
node-cronscheduler.
| URL | Description |
|---|---|
| http://localhost:3000 | API root (redirects to Swagger UI) |
| http://localhost:3000/api-docs | Interactive Swagger documentation |
localhost:5433 | PostgreSQL (mapped from container port 5432) |
Register a User
Create your account by posting to the auth registration endpoint:A successful response returns a
201 status with a JSON body confirming the new user was created.Login and Obtain a JWT
Log in with the credentials you just registered to receive a signed JWT:The response payload looks like this:Copy the value of
Response
data.token — you’ll include it as a Bearer token on every subsequent request to protected endpoints.Create Your First Monitor
Register the first HTTP service you want OpsMind to watch. Replace OpsMind records the monitor and immediately marks it
<YOUR_TOKEN> with the JWT from the previous step:PENDING. The background cron worker will perform the first health check within the next five minutes and update lastStatus to UP, DEGRADED, or DOWN.