LaneshotDocs

Search the docs

Find a page or a section

Open Laneshot

Self-hosting

Deploy with Docker

Run Laneshot on your own infrastructure with Docker Compose or the standalone image, behind HTTPS, with local or S3-compatible storage.

Laneshot is one web server and one PostgreSQL database. Recordings and event logs live on disk or in an S3-compatible bucket. The image prepares everything on boot: it generates its secrets, applies database migrations, and creates the first admin.

Requirements

  • Docker with Compose v2, or any platform that runs containers.
  • PostgreSQL 17 or later. Compose starts one for you.
  • About 1 GB of memory for the web server. Disk or bucket space grows with your recordings; retention keeps it in check.
  • A public HTTPS address if you want GitHub webhooks, public links, or Claude's connector. Everything else works on a private network.

Start with Docker Compose

git clone https://github.com/laneshot/laneshot.git
cd laneshot
APP_URL=https://laneshot.acme.com docker compose up -d
docker compose logs web | grep -A1 "First admin"

The last command prints the first admin's email and a generated password:

First admin created: admin@example.com
Password (shown once): q7Lh2xWb0mZcR4tN

Sign in at your APP_URL, then change the password in Account settings. Without APP_URL, the server answers on http://localhost:3100.

The Compose file runs two services:

Service Image Data
web Built from the repository's Dockerfile The web-data volume, mounted at /data
postgres postgres:17-alpine The postgres-data volume

Set the first admin

To choose the first admin's credentials instead of reading them from the logs, set them before the first start:

ADMIN_EMAIL=maya@acme.com
ADMIN_PASSWORD=a-long-passphrase

They're used only when the database has no users yet. Other people are invited later from Team in the sidebar. See Sign-in and SSO.

Add optional settings

Compose reads optional settings from a .env.docker file next to docker-compose.yml:

# .env.docker
GOOGLE_CLIENT_ID=…
GOOGLE_CLIENT_SECRET=…
GOOGLE_ALLOWED_DOMAIN=acme.com

GITHUB_OAUTH_CLIENT_ID=…
GITHUB_OAUTH_CLIENT_SECRET=…

TRACE_RETENTION_DAYS=90

The configuration reference lists every setting. Restart to apply changes:

docker compose up -d

Set POSTGRES_PASSWORD in your shell or in a .env file, before the first start, to replace the default database password. Set PORT the same way to publish the web server on another host port.

Run the standalone image

Release builds publish an image to the GitHub Container Registry. Use it with your own database:

docker run -d --name laneshot \
  -p 3100:3100 \
  -v laneshot-data:/data \
  -e DATABASE_URL=postgres://laneshot:secret@db.acme.internal:5432/laneshot \
  -e APP_URL=https://laneshot.acme.com \
  -e STORAGE_DIR=/data/storage \
  ghcr.io/laneshot/laneshot:latest

The image runs as the unprivileged node user, listens on port 3100, and keeps its state in /data.

What happens on boot

The entrypoint runs these steps on every start, then starts the server:

  1. Secrets. On the first start, it generates BETTER_AUTH_SECRET and ENCRYPTION_KEY and saves them to /data/secrets.json, readable only by the server. Later starts reuse them. Values you set in the environment take precedence.
  2. Migrations. It applies any pending database migrations. Upgrades need no separate step.
  3. First admin. If the database has no users, it creates the first admin.

Put it behind HTTPS

Run Laneshot behind a reverse proxy that terminates TLS, and set APP_URL to the public address. APP_URL is used for sign-in redirects, links in issues and notifications, MCP setup commands, and webhook registration, so it must match what people type.

laneshot.acme.com {
  reverse_proxy localhost:3100
}

With nginx, allow large uploads, because recordings stream through the proxy:

server {
  listen 443 ssl;
  server_name laneshot.acme.com;
  client_max_body_size 2g;
  proxy_request_buffering off;

  location / {
    proxy_pass http://127.0.0.1:3100;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # Live board updates are a long-lived Server-Sent Events stream.
    proxy_buffering off;
    proxy_read_timeout 1h;
  }
}

Video recordings can reach 2 GB, screenshots 25 MB, and instant replays 200 MB.

Boards update live over Server-Sent Events at /api/projects/<id>/events. Laneshot sends a heartbeat every 25 seconds and tells proxies not to buffer the stream, but a proxy that buffers responses or closes idle connections early delays updates. With several Laneshot instances, events travel between them through Postgres LISTEN/NOTIFY, so no extra service is needed. Each instance holds one more database connection for it.

Storage

Each organization's files live under orgs/<organization id>/:

  • recordings, screenshots, replays, and event logs under orgs/<organization id>/traces/<trace id>/;
  • card attachments under orgs/<organization id>/attachments/<card id>/.

Files stored before organizations existed stay under traces/<trace id>/ and attachments/<card id>/. Laneshot keeps reading and deleting them there, so nothing needs to move.

Local disk

The default. Files go to STORAGE_DIR, which Compose sets to /data/storage inside the web-data volume.

S3-compatible storage

Use AWS S3, Cloudflare R2, MinIO, or any S3-compatible store:

STORAGE_DRIVER=s3
S3_BUCKET=acme-laneshot
S3_REGION=eu-west-1
S3_ACCESS_KEY_ID=…
S3_SECRET_ACCESS_KEY=…

For stores other than AWS, also set the endpoint, and path-style addressing if the store needs it:

S3_ENDPOINT=https://minio.acme.internal:9000
S3_FORCE_PATH_STYLE=true

Without access keys, the AWS SDK's default credential chain is used, such as an instance role. The bucket stays private: media is streamed through Laneshot, which checks access on every request.

Retention

Captures are kept until deleted, unless you set a retention period:

  • TRACE_RETENTION_DAYS sets the default for the whole instance.
  • Each project can override it in Settings, General, Delete traces after.

Laneshot checks once an hour and deletes expired traces with their files. Uploads that never finished are removed after a day, and OpenTelemetry data received from your backends after 72 hours.

Upgrade

With Compose:

git pull
docker compose up -d --build

With the standalone image, pull the new tag and recreate the container. Migrations run on boot. Read the changelog before upgrading across major versions.

Back up

Back up two things together:

  1. The database.
docker compose exec postgres pg_dump -U laneshot laneshot | gzip > laneshot-$(date +%F).sql.gz
  1. The /data volume, which holds secrets.json and, with local storage, every recording. With S3, enable versioning or replication on the bucket instead, and back up secrets.json on its own.

To restore, load the dump into an empty database, restore /data, and start the server.

Run without Docker

For development, or platforms without containers, see the repository's README: install Node.js 22 or later, copy .env.example to .env, then run npm run db:migrate, npm run db:seed, and npm run build -w @laneshot/web.

Troubleshooting

Symptom What to check
The server exits on start with a validation error A required setting is missing or malformed, such as APP_URL without a scheme. See the configuration reference.
Everyone was signed out after a redeploy BETTER_AUTH_SECRET changed. Keep /data on a persistent volume, or set the secret explicitly.
"Unrecognized secret format" or failed decryption ENCRYPTION_KEY changed. Restore the previous key from your backup.
Uploads fail at around 1 MB Your proxy limits request bodies. Raise client_max_body_size or its equivalent.
Sign-in redirects to the wrong address APP_URL doesn't match the public address.
Teammates' changes appear only after a minute, and the dot by the board's avatars stays gray The live stream can't stay open. Turn off response buffering for /api/projects/*/events in your proxy and allow connections to stay idle for at least 30 seconds.