Codumentor logo Codumentor Enterprise

Self-Hosting Walkthrough

This walkthrough sets up a multi-user Codumentor server for a team: real logins, encrypted per-user secrets, sandboxed conversations, and a reverse proxy in front. One executable, one config file, a handful of environment variables. Each step links to the reference page with the details.

Just want to try it on your laptop? Use Getting Started instead — single user, no auth, no isolation.

Step 1 — Install

Download the Linux installer from the releases page and install it into its own directory, owned by the account that will run the service:

sudo install -d -o <svc-user> -m 755 /opt/codumentor
sudo -u <svc-user> env CODUMENTOR_PREFIX=/opt/codumentor sh ./codumentor-<version>-<edition>-linux-x86_64.run --version

This unpacks the version into /opt/codumentor/versions/ and creates the stable launcher /opt/codumentor/bin/codumentor. Start the service through that launcher, never through a versions/ path: installing a newer .run the same way moves the launcher to the new version.

Prefer containers? Use the image described in Deployment and continue from Step 3.

Install the host packages for sandboxing and the browser-based tools:

sudo apt install bubblewrap ripgrep chromium
sudo -u <svc-user> bwrap --ro-bind / / --unshare-user /bin/true   # must succeed

If the bwrap check fails (typical on Ubuntu 24.04+), see Workspace isolation prerequisites.

Step 2 — Set the secrets

Secrets go in environment variables, never in the config file. Create /opt/codumentor/codumentor.env (mode 600, owned by the service user):

CODUMENTOR_JWT_SECRET=<output of: openssl rand -base64 48>
CODUMENTOR_ADMIN_PASSWORD=<choose one>
OPENAI_API_KEY=<key for your LLM endpoint>

Keep CODUMENTOR_JWT_SECRET stable: it signs sessions and encrypts per-user secrets — see jwt_secret.

Step 3 — Write the config

Create /opt/codumentor/codumentor.yaml:

repos:
  - https://gitea.example.com/org/main-app.git

models:
  agent: "your-chat-model"
  agent_base_url: "https://your-llm-endpoint/v1/"
  agent_api_key: "${OPENAI_API_KEY}"
  embedding: "your-embedding-model"
  embedding_base_url: "https://your-llm-endpoint/v1/"
  embedding_api_key: "${OPENAI_API_KEY}"

api:
  host: "127.0.0.1"            # only the reverse proxy talks to it

auth:
  provider: local
  jwt_secret: "${CODUMENTOR_JWT_SECRET}"
  local:
    users:
      - username: admin
        password: "${CODUMENTOR_ADMIN_PASSWORD}"
        roles: ["admin", "user"]

plugins:
  - { module: codumentor.plugins.workspace_isolation, class: WorkspaceIsolationPlugin, priority: 5, args: { enabled: true } }
  - { module: codumentor.plugins.user_secrets, class: UserSecretsPlugin, args: { enabled: true } }
  - { module: codumentor.plugins.ripgrep, class: RipgrepPlugin }
  - { module: codumentor.plugins.explore, class: ExplorePlugin, args: { enabled: true } }
  - { module: codumentor.plugins.scm_push, class: ScmPushPlugin, priority: 25, dependencies: ["workspace_isolation", "user_secrets"], args: { enabled: true } }
  - { module: codumentor.plugins.configuration_assistant, class: ConfigurationAssistantPlugin, args: { enabled: true } }

A plugins: list replaces the default set, so list every plugin you want. Add more from the plugin catalog; for more users or Gitea/LDAP logins see Authentication; for a self-hosted model see Model Providers. Every option is in Configuration.

Step 4 — Run it

Index the repos once, then start the server:

cd /opt/codumentor
set -a; . ./codumentor.env; set +a
bin/codumentor -c codumentor.yaml ingest
bin/codumentor -c codumentor.yaml api

For running it permanently, Deployment has the systemd unit (use EnvironmentFile=/opt/codumentor/codumentor.env) and the nginx config — the SSE proxy headers there are required.

Step 5 — Verify

  1. Open your proxied URL and log in as admin.
  2. Ask a question and check the answer cites your repos.
  3. Check the startup log has no bubblewrap/overlay error (isolation active) and no auth.jwt_secret … not set error.
  4. Open Settings → User Secrets and save a credential.

Before inviting users, go through the Security checklist.

See also