lastlight-server
/lastlight-server
Install and configure a Last Light SERVER — the GitHub maintenance agent plus its docker-compose stack — on a host. Use when the user wants to "set up / install / deploy / stand up a Last Light server or instance", configure its GitHub App, models, managed repos, or domain, or get the agent running for the first time. Drives the `lastlight` CLI; for connecting an existing CLI to a server use lastlight-client instead, and for editing a running deployment's config use lastlight-overlay.
- Author
- nearform ↗
- Repository
- lastlight ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Install and configure a Last Light SERVER — the GitHub maintenance agent plus its docker-compose stack — on a host. Use when the user wants to "set up / install / deploy / stand up a Last Light server or instance", configure its GitHub App, models, managed repos, or domain, or get the agent running for the first time. Drives the `lastlight` CLI; for connecting an existing CLI to a server use lastlight-client instead, and for editing a running deployment's config use lastlight-overlay.
Original author description
Install and configure a Last Light SERVER — the GitHub maintenance agent plus its docker-compose stack — on a host. Use when the user wants to "set up / install / deploy / stand up a Last Light server or instance", configure its GitHub App, models, managed repos, or domain, or get the agent running for the first time. Drives the `lastlight` CLI; for connecting an existing CLI to a server use lastlight-client instead, and for editing a running deployment's config use lastlight-overlay.
How it works
- 1. Check prerequisites
- 2. Gather inputs from the user
- 3. Working directory + overlay
- 4. Write the configuration
- 5. Build and launch
- 6. Hand-off checklist
- Done when
SKILL.md preview
---
name: lastlight-server
description: Install and configure a Last Light SERVER — the GitHub maintenance agent plus its docker-compose stack — on a host. Use when the user wants to "set up / install / deploy / stand up a Last Light server or instance", configure its GitHub App, models, managed repos, or domain, or get the agent running for the first time. Drives the `lastlight` CLI; for connecting an existing CLI to a server use lastlight-client instead, and for editing a running deployment's config use lastlight-overlay.
version: 1.0.0
tags: [lastlight, server, deploy, docker, setup]
---
# Install & configure a Last Light server
A Last Light **server** runs the agent and a docker-compose stack on a host. It
needs: Docker, a GitHub App (so it can act on repos), a model provider API key,
and a list of repos it's allowed to manage. Configuration lives in a private
**overlay** at `instance/` (a `config.yaml` plus `secrets/.env` + `secrets/app.pem`).
Your job: gather the inputs, get the working directory in place, write the
config, then build and launch. Prefer the deterministic file-writing path below
(fully automatable) over the interactive wizard.
## 1. Check prerequisites
Run these and report anything missing before continuing:
```bash
docker info >/dev/null 2>&1 && echo "docker: ok" || echo "docker: NOT running"
git --version; node --version
command -v lastlight >/dev/null && lastlight --help >/dev/null 2>&1 && echo "lastlight: installed" || echo "lastlight: missing"
```
- Docker must be running.
- If `lastlight` is missing: `npm i -g lastlight`.
## 2. Gather inputs from the user
Ask for each of these (don't guess). Group the questions; explain what each is for.
**Required**
- **GitHub App** — App ID, Installation ID, and the path to the App's private
key `.pem` file. (If they don't have a GitHub App yet, point them at GitHub →
Settings → Developer settings → GitHub Apps; it needs webhook + repo
contents/issues/pull-requests/checks permissions, plus **workflows** (read &
write) so it can merge/push PRs that touch `.github/workflows/` — e.g.
dependency PRs bumping GitHub Actions versions. Recommend **actions** (read)
too — a different permission from workflows: it lets the fix workflow read
the actual Actions job logs instead of only check annotations. It is optional,
so an app without it still works; the CI evidence is just weaker, and the
prompt says so. Recommend **commit statuses** (read) as well — again distinct
from checks: it covers the classic statuses external CI posts (CircleCI,
Jenkins), and without it CI is judged on check runs alone. They install it on
their repos to get the Installation ID.)
- **Domain** — the public hostname for webhooks/dashboard, e.g.
`lastlight.example.com`. Ask whether to use the bundled **Caddy** for
automatic TLS (default yes). The GitHub App webhook URL will be
`https://<domain>/webhook`.
- **Managed repos** — one or more `owner/repo` the bot is allowed to act on. The
bot ignores any repo not listed.
- **State database** — **SQLite (recommended, the default)** or an external
Postgres. SQLite is a file in the agent-data volume with nothing to run;
answering it writes no config at all, which is deliberate (the slot resolving
by absence is what lets `STATE_DIR` move the file). Choose Postgres only if
the user already has a server — then they supply a `postgres://user:pass@host:port/db`
URL, which the wizard writes to the gitignored `instance/secrets/.env` and
**never** to `instance/config.yaml` (that file becomes a GitHub repo at the
end of setup). The driver is detected from the host, not asked
(`*.neon.tech` → Neon's serverless driver, else node-postgres). The wizard
only TCP-probes the host; run `lastlight server db check` after the build for
the full credential check. An existing SQLite deployment can move across
later with `lastlight server db migrate` — no need to decide now.
- **Model** — a `provider/model` string (default `anthropic/claude-sonnet-5-5`),
plus the **matching** provider's API key. Last Light is multi-provider: the
`provider/` prefix picks the provider and the model id follows, e.g.
`anthropic/claude-sonnet-5-5`, `openai/gpt-5.5`, `google/gemini-2.5-pro`,
`openrouter/anthropic/claude-sonnet-4.5`. Set **only** the one API-key env var
that matches the provider you chose. Common ones:
- `anthropic/…` → `ANTHROPIC_API_KEY` (`sk-ant-…`)
- `openai/…` → `OPENAI_API_KEY` (`sk-…`)
- `openrouter/…` → `OPENROUTER_API_KEY` (`sk-or-…`) — aggregator, reaches
Anthropic/Google/xAI/… models through one key
- `google/…` → `GEMINI_API_KEY`, `mistral/…` → `MISTRAL_API_KEY`,
`groq/…` → `GROQ_API_KEY`, `xai/…` → `XAI_API_KEY`, `deepseek/…` →
`DEEPSEEK_API_KEY`, and more (Cerebras, Hugging Face, Moonshot, NVIDIA,
Fireworks, Together, Z.AI, Kimi, MiniMax).
The env var name is not always `<PROVIDER>_API_KEY` (e.g. Google uses
`GEMINI_API_KEY`, Hugging Face uses `HF_TOKEN`); the full provider → model
prefix → env-var map is the registry in `src/providers.ts`, echoed in
`references/env-schema.md`.
**Optional**
- Admin dashboard password (≥8 chars) to protect `/admin`.
- Slack: bot token (`xoxb-…`), app token (`xapp-…`), delivery channel id,
allowed user ids.
## 3. Working directory + overlay
The server runs out of a working directory: a checkout of the lastlight repo
plus an `instance/` overlay. Scaffold it (this clones the core repo if needed
and creates/clones the overlay):
```bash
lastlight server setup # interactive: confirms working dir + overlay
```
If you need to do this non-interactively / the user already has a checkout, work
in that directory directly (it has `docker-compose.yml`, `workflows/`, `skills/`,
`config/`). The overlay you write to is `<workdir>/instance/`.
## 4. Write the configuration
Create the overlay files directly (this is the automatable path — it avoids the
TTY wizard). From the working directory:
1. `mkdir -p instance/secrets && chmod 700 instance/secrets`
2. Copy the user's PEM to `instance/secrets/app.pem` and `chmod 600` it.
3. Generate two random secrets: `openssl rand -hex 32` for `WEBHOOK_SECRET` and
again for `ADMIN_SECRET`.
4. Write `instance/secrets/.env` (`chmod 600`) and `instance/config.yaml`
following **`references/env-schema.md`** — it has the exact keys, value
formats, and ready-to-fill templates for both files.
5. If the user declined Caddy, write `instance/docker-compose.override.yml` to
disable it (template in `references/env-schema.md`).
Read `references/env-schema.md` now before writing the files — it has the precise
key list and value formats.
> Alternative (let the user drive): if they'd rather answer prompts themselves,
> have them run `lastlight setup --server` in the working directory — the same
> wizard, interactive. It is a TTY wizard, so you can't fill it in from a script.
## 5. Build and launch
```bash
lastlight server update # build images, bring stack up, restart sidecars, health-check
```
Then verify:
```bash
curl -fsS http://127.0.0.1:8644/health && echo " ← healthy"
lastlight server status # compose state + version drift
```
## 6. Hand-off checklist
Tell the user to:
- Paste the generated `WEBHOOK_SECRET` and the webhook URL
(`https://<domain>/webhook`) into their **GitHub App** settings, and confirm a
test delivery succeeds.
- Visit `https://<domain>/admin` (password is `ADMIN_PASSWORD` if they set one).
- Make later config edits in the overlay, then `lastlight server restart agent`
(no rebuild). See the **lastlight-overlay** skill for forking workflows/assets.
For day-2 operations (start/stop/restart/update, logs, redeploy after a code
change), read **`references/operations.md`**.
## Done when
The stack is up, `GET /health` returns ok, `lastlight server status` shows the
agent running, and the user has the webhook secret + URL to finish GitHub App
setup. Report the webhook URL, dashboard URL, and which config you wrote.
Files in this package (3)
- SKILL.md 8 KB
- references/env-schema.md 5 KB
- references/operations.md 2 KB
Versions
The database has no other skills named lastlight-server.
Database snapshot: 13.11.2026 · package version 966cb22efa05 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100lastlight-client
Install the `lastlight` CLI and connect it as a CLIENT to an existing Last Light server — log in, save the token, and verify the connection. Use when the user wants to "connect / point my lastlight CLI at a server", "log in to Last Light", "set up the lastlight client", or run… - 100lastlight-debug
Debug a running Last Light instance over its admin API with the `lastlight` CLI — no SSH. Use when the user wants to "look at / debug a failed or stuck workflow", "why didn't the bot do X", "check a bad agent run / phase error on <instance>", "tail a session", "search the logs",… - 90deploy-docker-compose
Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host… - 93dd-agent-install-docker
Install the Datadog Agent on a Docker host - standalone Docker (Linux or Windows) or Docker Compose - with infrastructure metrics, container logs, APM trace intake, and DogStatsD on by default, plus optional live processes, tags, hostname, proxy, and container filtering, keeping… - 100generating-docker-compose-files
Execute use when you need to work with Docker Compose. This skill provides Docker Compose file generation with comprehensive guidance and automation. Trigger with phrases like "generate docker-compose", "create compose file", or "configure multi-container app". - 100generating-docker-compose-files
Execute use when you need to work with Docker Compose. This skill provides Docker Compose file generation with comprehensive guidance and automation. Trigger with phrases like "generate docker-compose", "create compose file", or "configure multi-container app".