Get started

From clone to command console.

SOC Cockpit is a two-tier Node.js app with an embedded SQLite store. There are no external services to provision.

  1. Prerequisites

    Node.js 22.5 or later (the server uses the built-in node:sqlite module) and npm.

    On Windows PowerShell, use npm.cmd if script execution policy blocks npm.

  2. Install and run

    # clone and install
    $ git clone https://github.com/cisco-open/SOC-Cockpit.git
    $ cd SOC-Cockpit && npm install
    # configure (optional: Active Directory, LLM endpoint)
    $ cp .env.example .env
    # web UI on :5173, API on :3001 — first start prints a one-time Admin setup code
    $ npm run dev
    Web UI · http://127.0.0.1:5173/ API · http://127.0.0.1:3001/
  3. Create the first Admin

    Sign-in is required. On first start with no users, the server prints a one-time setup code to its console. Open the app, enter the code and create the first Admin — public setup is then disabled for good.

    ViewerRead-only, may use the assistant
    OperatorRead and edit cockpit data
    AdminEverything, plus user management

    Users are local (password hashed with scrypt) or company (checked against Active Directory). Company users are registered on first sign-in and stay blocked until an Admin approves them in Users. Directory settings can also be managed in the app under Users > Company directory.

  4. Configure

    Configuration is read from .env. Every variable is optional.

    VariableDefaultPurpose
    PORT3001API / production server port.
    NODE_ENVdevelopmentSet to production to serve the built frontend.
    SESSION_TTL_HOURS12How long a sign-in session lasts.
    SESSION_COOKIE_SECUREtrue in productionSend the session cookie over HTTPS only.
    LDAP_URL(unset)ldaps:// URL of Active Directory. Empty = local accounts only.
    LDAP_BASE_DN(unset)Search base for user lookups. Required with LDAP.
    LDAP_BIND_DN / LDAP_BIND_PASSWORD(unset)Read-only service account for user lookups. Required with LDAP.
    LDAP_USER_FILTERsAMAccountName={username}LDAP filter used to find the user.
    LDAP_STARTTLS / LDAP_CA_CERT_PATH / LDAP_ALLOW_INSECUREfalse / (unset) / falseTLS options for LDAP.
    OPENAI_API_KEY(unset)Enables AI features. If empty, a local fallback is used.
    OPENAI_BASE_URLhttps://api.openai.com/v1Base URL of any OpenAI-compatible API.
    OPENAI_MODELgpt-4o-miniModel or deployment name.

    The LLM integration targets the standard POST {OPENAI_BASE_URL}/chat/completions API, so it works with OpenAI, OpenAI-compatible gateways and self-hosted servers such as Ollama or vLLM.

  5. Build for production

    npm run devStart the web app and API together for development.
    npm run buildType-check and build the frontend.
    npm startServe the production build from the API server.

    Production mode serves the built frontend from the Express server. data/, uploads/ andartifacts/ hold local runtime data and are git-ignored — back them up on your normal schedule.

  6. Deploy it safely

    Run Cockpit inside a restricted network reachable only by approved SOC staff. Terminate TLS at a reverse proxy, keep SESSION_COOKIE_SECURE enabled, bind the app to loopback or a private interface, and connect Active Directory over ldaps:// or StartTLS.