On this pageInstall

Install on Your Server

Install Grengin on any Linux machine you control, on-premises or in any cloud, with one command. It installs as your user, with no root needed, and starts the web app and API for you.

2 min read v1

Self-hosted only

  • OS 64-bit Linux, x86_64 (amd64) or arm64
  • Database PostgreSQL 16 or later, with the pgvector and ltree extensions
  • Tools curl and python3
  • Ports 3000 (web app) and 8080 (API), both on localhost only

Install

  1. Run the install command As your normal user, not root.

    curl --proto '=https' --tlsv1.2 -sSf https://meta.grengin.com/install.sh | sh
    
  2. Answer two questions Your database URL (postgres://…) and the address for sign-in callbacks: the address people open Grengin at. For a first try on this machine, use http://localhost:3000. Secrets are generated for you.

  3. Open Grengin It starts on its own: open http://localhost:3000.

It installs the latest release into ~/.grengin, adds the grengin command to ~/.local/bin, and keeps your settings in ~/.grengin/config.env.

Tip Installing from a script or CI? Set GRENGIN_DATABASE_URL and GRENGIN_REDIRECT_URL first and it won’t ask. GRENGIN_VERSION picks a release; GRENGIN_API_PORT and GRENGIN_WEB_PORT change the ports.

The grengin command

CommandWhat it does
grengin statusIs the web app and API running?
grengin start / stop / restartStart, stop or restart both
grengin updateInstall the latest release, then grengin restart
grengin configureChange the database or callback address
grengin configShow where the settings file is
grengin versionShow the installed version
grengin uninstallRemove Grengin (your database is kept)

Logs are in ~/.grengin/logs.

Open it to your team

Grengin listens on localhost only. To let your team in, put your own web server in front of it, with HTTPS:

  1. Point a domain at the server For example chat.example.com.

  2. Proxy it to Grengin In Nginx, Caddy or similar, send everything for that domain to http://127.0.0.1:3000, with an HTTPS certificate.

  3. Use that address Run grengin configure and enter https://chat.example.com as the callback address. Also add it to CORS_ALLOWED_ORIGINS in the settings file, then grengin restart.

Set up sign-in

Self-hosted installs use your own sign-in app with Google or Microsoft.

  1. Create a sign-in app In the Google Cloud console (OAuth client) or the Microsoft Entra admin center (app registration).

  2. Add the callback address https://<your-domain>/auth/google/callback or https://<your-domain>/auth/azure/callback.

  3. Add its details to the settings file GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, or AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET, as export NAME=value lines in ~/.grengin/config.env. Then grengin restart. Run grengin configure before this step, as it rewrites the settings file.

  4. Sign in The first person to sign in becomes the Super Admin. Then add your AI keys in Control Hub → AI Engines.

Who can join afterwards (allowed domains, automatic sign-up) is set in Authentication (SSO).

Next steps

Was this page helpful?
GitHub (opens in a new tab)