Install
Install logship-backend
The logship database is available as an OCI container image or as a standalone binary for native deployment.
Docker
Images are published to the Logship container registry:
| Registry | Image |
|---|---|
| Logship Container Registry | cr.logship.io/logship-database |
Pull the image
docker pull cr.logship.io/logship-database:latestRun a local container
docker run -d --name logship-db \
-p 5000:5000 -p 6000:6000 \
-v $PWD/logship:/logship \
cr.logship.io/logship-database:latestdocker run -d --name logship-db `
-p 5000:5000 -p 6000:6000 `
-v ${PWD}/logship:/logship `
cr.logship.io/logship-database:latest- API/UI:
http://localhost:5000 - Cluster port:
6000 - Data persisted under
./logshipon the host
Docker Compose
services:
logship-database:
image: cr.logship.io/logship-database:latest
ports:
- "5000:5000"
- "6000:6000"
volumes:
- ./logship:/logship
environment:
ASPNETCORE_URLS: http://+:5000
restart: unless-stoppedStart and stop:
docker compose up -d
docker compose downProduction deployment
For production, mount a custom configuration file and use a .env file for paths:
.env:
LS_ROOT_DATA_PATH=/logshipdocker compose.yml:
services:
logship-database:
container_name: logship-database
image: cr.logship.io/logship-database:latest
network_mode: host
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
volumes:
- ./config/logship-database/appsettings.Production.json:/app/appsettings.json:ro
- ${LS_ROOT_DATA_PATH}:/logshipVersion pinning
Pin to a specific version instead of latest:
docker pull cr.logship.io/logship-database:0.1.0| Tag | Description |
|---|---|
latest | Latest stable release |
x.y.z | Specific version |
Native install by sh
For native single-host installs, use the deployment installer from logship-deployments:
curl -fsSL https://raw.githubusercontent.com/logship-io/logship-deployments/main/src/shell/install.sh | sh -s -- --databaseBy default this installs under /opt/logship/database, writes appsettings.json, and creates a systemd service on Linux. Add --frontend and --agent to provision the whole stack together.
Health checks
| Endpoint | Ready response | Not-ready response | Purpose |
|---|---|---|---|
GET /health/live | 200 live | — | Liveness — the process is up and accepting HTTP. No dependencies. |
GET /health/ready | 200 ready | 503 not ready | Readiness — the backend can serve database-backed requests. |
Both endpoints are anonymous. /health/ready round-trips the database RPC channel, so it returns 503 during startup until the backend can actually serve auth/data requests — gate traffic on it rather than on /health/live.
curl http://localhost:5000/health/live
curl -i http://localhost:5000/health/readyInvoke-RestMethod http://localhost:5000/health/live
Invoke-WebRequest http://localhost:5000/health/readyConfiguration
The database reads configuration from multiple sources (in priority order):
- Command line arguments
- Environment variables prefixed with
LS_ - Config file specified via
LS_CONFIG_PATH appsettings.json(default)
Mount a custom config into the container:
docker run -d --name logship-db \
-p 5000:5000 -p 6000:6000 \
-v $PWD/logship:/logship \
-v $PWD/appsettings.json:/app/appsettings.json:ro \
cr.logship.io/logship-database:latestSee the Configuration page for full details.
Upgrades
- Container: Pull the new tag and restart. Data volumes are preserved automatically.
- Native: Re-run the shell installer with
--database(and--overwriteif you want to regenerate config), then restart or let systemd restart the service.