Skip to content

Docker (self-hosted)

The Docker edition runs the same @logswarm/server engine as a containerized Next.js standalone service. Use it when multiple people should share one Logswarm instance over HTTP.

This is the self-hosted server edition. Desktop remains the recommended starting point for individual operators.

Quick start

From the repository root (or your deployment checkout that includes docker-compose.yml and packages/server/Dockerfile):

export APP_SECRET_KEY='replace-with-a-random-string-at-least-32-chars'
export INITIALIZE_PASSWORD='replace-with-a-strong-init-password'
docker compose up --build -d

Open http://localhost:3000 (or your mapped host port).

Compose layout

The default Compose service:

SettingValue
Image buildpackages/server/Dockerfile (context: repo root)
HTTP port3000:3000
Data volumelogswarm_data/data
DATABASE_URLfile:/data/logswarm.db
LOG_SWARM_DATA_DIR/data
APP_SECRET_KEYrequired secret for the app
INITIALIZE_PASSWORDpassword used during first-time admin initialization

What happens on container start

The entrypoint:

  1. Runs Prisma migrate deploy against the SQLite database.
  2. Ensures an installation id exists under the data directory (created once, then reused).
  3. Starts the Next.js standalone server (node packages/server/server.js) as the nextjs user.

A health check probes GET /api/health on 127.0.0.1:3000.

Persistent data (/data)

Mount a named volume (or bind mount) at /data. Persist at least:

  • SQLite database (logswarm.db)
  • Installation / license material (fingerprint-bound)
  • App secrets generated for this installation

Redeploy tip: keep the same volume when you rebuild the image. License and configuration survive container recreation.

First-run activation

  1. Open the web UI and complete initialization if prompted (INITIALIZE_PASSWORD).
  2. Open License activation. Copy the installation key / fingerprint shown for this server.
  3. Have an administrator issue a server edition .logswarm.lic for that fingerprint.
  4. Sign in as admin → import the license file → confirm status is valid.

Search requires a valid license on the server edition the same way the desktop edition binds to a hardware key.

Operations checklist

  • Change default APP_SECRET_KEY and INITIALIZE_PASSWORD before production use.
  • Expose port 3000 only on trusted networks or behind TLS reverse proxy.
  • Back up the /data volume regularly.
  • After upgrades: docker compose up --build -d with the same volume.

Troubleshooting

SymptomWhat to check
Container unhealthydocker compose logs, health endpoint, Prisma migrate errors
License lost after redeployVolume not remounted / different volume name
Cannot initialize adminINITIALIZE_PASSWORD env value
DB permission errorsownership of /data inside the container (nextjs user)

Next steps