Getting Started

Quick Start

Install your local Gostly stack, record one safe API interaction, and replay it without another upstream request.

Start with a safe upstream

Use a local fixture or an API you have permission to test. Production access is unnecessary. Choose one request with a predictable response so you can verify the result.

Finish with one known response served through Gostly in MOCK, with no additional request at the demo upstream. Check the response source and the upstream observation separately.

Prerequisites

  • Docker Engine running, with Docker Compose available; Docker Engine 26 or later for the Full stack. Check the engine version with docker version --format '{{.Server.Version}}'.
  • A Gostly account, plus git to get the installation files from the public compose repository.
  • An upstream reachable from inside the proxy container. On Docker Desktop, use host.docker.internal for a server on your Mac; localhost inside a container refers to that container. A fresh .env starts the bundled demo upstream instead, so a first recording needs no upstream of your own.

See Install & Deploy for resource sizing, private environment setup, ports, and existing installations. Lite has no AI containers and is the default for every install, including active Pro trials. Full adds AI services and requires additional resources. Both use the same trial deadline; a paid subscription is required to continue after expiry.

Setup

1

Install from the public compose repository

The Compose files and the settings template live in the public Gostly compose repository. On the machine that will host Gostly, get the files, run the setup script, then open http://localhost:3000 and sign in:

git clone https://github.com/gostlyai/gostly-docker-compose gostly-docker-compose && cd gostly-docker-compose
./setup.sh

The script asks for your admin email and password and your license key, checks the key at gostly.ai and writes your workspace ID from it, signs in to the image registry with the key when it needs to download images, and starts the stack. It prints the address to open and the email to sign in with. What it asks, the environment variables it fills and the manual steps are in the README.

Your account dashboard holds the license key, shown once, when it is created; the script needs nothing else from it. For an install without the script, the dashboard's Installing by hand section has the registry login command, whose token is valid for 12 hours.

The Lite stack includes:

ghost-postgres    # local database
ghost-migrate     # one-shot database setup; exits after success
ghost-web         # local dashboard (3000) and control API (8000)
ghost-proxy       # HTTP proxy (8080)
gostly-demo-upstream  # bundled demo upstream; the .env's demo profile starts it

Full adds ghost-inference and ghost-llamacpp; the setup script asks which one to run. Stack selection does not extend a trial or change your license, and both stacks use the same .env.

Expected observation

The script prints the local dashboard address and the email to sign in with. Open that dashboard and use the installation's administrator credentials.

If startup or sign-in is incomplete, check First boot before continuing.

2

Check the stack is ready

The template carries GHOST_API_KEY: API calls to port 8000 send it in the X-API-Key header, and the Compose files already deliver it, so no Compose edit is needed. See service authentication for changing it. Keep password authentication enabled.

docker compose ps -a

Wait for database setup to finish successfully (ghost-migrate exits 0) and the serving containers to be ready. A running container alone does not prove that capture is ready. To upgrade later, run git pull in the directory, then ./setup.sh again; keep your .env.

Readiness checkpoint

ghost-migrate has exited successfully and the serving containers are ready. Capture readiness is checked with the service in the next step.

For incomplete startup, use First boot. For API authentication errors, use service authentication; keep secret values private.

3

Register the service and check capture readiness

Open your local operator dashboard at http://localhost:3000 and sign in with the administrator credentials from your installation. This dashboard is included in both Lite and Full and is separate from the hosted account dashboard.

Add your test service with its upstream URL and a host or path routing rule that matches the request your application sends. Select LEARN mode and wait for the service configuration to reach the proxy. If you see agent_not_ready, missing upstreams, or authentication errors, resolve them before recording. The routing examples cover host and path matching.

For the bundled demo, add a service with upstream http://gostly-demo-upstream:8080 and path rule /gostly-demo, then send GET http://localhost:8080/gostly-demo/get in step 4. Every demo path starts with /gostly-demo/, so demo captures and mocks stay apart from your own service's.

In the dashboard, Add service opens the New service page, where Use the demo fills in these values. Test connection on the demo shows "Reachable, answered 404": the test sends one request to the upstream address itself, and the demo answers only under /gostly-demo/, so the 404 is expected and the service is ready to create. Run the demo on the Overview page creates the same service in one step.

Check the selected route

Your local caller → localhost:8080/gostly-demo/get → registered Gostly service → gostly-demo-upstream:8080

The upstream leg runs in LEARN or PASSTHROUGH. MOCK serves the prepared case instead. Confirm the bundled upstream, the /gostly-demo path rule and effective LEARN mode after the service configuration reaches the proxy.

If the request reaches the wrong service or no service, check the host and path routing examples before recording.

For HTTPS clients

Turn on ENABLE_TLS_INTERCEPTION for the proxy, publish port 8443 (the supplied Compose files do not), and trust the proxy CA in your test client. See TLS setup.

4

Record one interaction, then build and switch to MOCK

Before the first request, open a second terminal in the installation directory and watch the bundled upstream. Count only requests to /gostly-demo/get; startup messages and other paths are separate.

docker compose logs --follow --tail 0 gostly-demo-upstream

Leave that observer running. In your first terminal, send the bundled request through Gostly with the response headers visible:

curl -i http://localhost:8080/gostly-demo/get

Recording checkpoint

The LEARN call should add a matching GET entry to the upstream log. Confirm the successful response and a capture assigned to the service you registered.

If the log entry or service capture is missing, resolve that observation before treating a later silent upstream as replay evidence. Use the routing checks if ownership is wrong.

In the service's dashboard, choose Build mocks. This processes the captured traffic and switches that service to MOCK as part of the same transition. Wait for completion with the expected processed records and no error. Recording traffic alone is not a completed durable build. API users can follow Record & Replay.

Build checkpoint

Continue when the build has completed without an error, the expected processed records are present and the service is in MOCK. A captured row or an accepted mode change alone is not this checkpoint.

For an incomplete or failed build, follow the build transition procedure.

To record more for this service later, open its page and choose Learn from the mode control on the right of the header. This changes that service only; the Default mode on the Services page is a separate control, for services that have no mode of their own.

5

Verify MOCK replay

Confirm the service is in MOCK in the local dashboard, then repeat the same request through the proxy. Keep the upstream observer running separately:

curl -i http://localhost:8080/gostly-demo/get

Replay checkpoint: three separate observations

  • Response. Compare the status and relevant response content with the case just recorded.
  • Source. Inspect X-Gostly-Behavior for the selected service and a stored-response source, such as src=session-verbatim or src=exact. A familiar body alone does not prove replay.
  • Upstream. The separate observer gains no further matching /gostly-demo/get entry during this request. Check this independently of the response headers and the proxy's request counter.

Use the response provenance reference to interpret the source and Server-Timing. If the source is upstream, recheck the route and effective service mode. For a miss or an agent refusal, inspect the status, body and applicable reason before continuing with MOCK recovery. Missing provenance can reflect a disabled service setting; check the reference before declaring success.

Optional: check restart durability. Restart only the disposable test proxy after the successful build and repeat the check. Keep the library, routing settings, and other services in place.

Sharing mocks across environments

Local traffic and replay files may retain upstream bodies, including user data. Keep them private by default. Share only a deliberately reviewed test library; never commit credentials or the cached license.

# .gitignore — private by default
.env
data/traffic/
data/mocks/
data/license_cache.json

For CI, reuse the generated stack and a reviewed library with the same service configuration. Verify ready state and explicit MOCK mode before running tests. See CI integration.

What's next