# Stopping the local platform

> Stops the local platform serving your project — the one the build-and-test loop starts on demand. Its database stops with it, so nothing is left running in the background.

<!-- id: local-stopping-the-local-platform · area: local · stability: stable · html: https://osysharp.com/reference/local/stopping-the-local-platform/ -->

## Summary        {#summary}

Stops the local platform for your project — the one [Compiling your app](https://osysharp.com/reference/local/compiling-your-app/), [Running tests locally](https://osysharp.com/reference/testing/running-tests-locally/) and
[Launching your app](https://osysharp.com/reference/local/launching-your-app/) start on demand. The platform's database stops with it, so there is nothing left running
after it returns.

## Signature      {#signature}

```console
osy stop [path] [--devname <name>]
```

## Description    {#description}

The loop commands start a local platform in the background when one isn't already running, and leave it up so your next
command is fast ([Running a local platform](https://osysharp.com/reference/local/running-a-local-platform/)). `osy stop` is how you shut that platform down when you're done —
it stops the server and the database it manages, and reports plainly when there was nothing running.

You rarely need it during a normal session: leaving the platform running between commands is the point, and it costs
little. Reach for it when you want a clean slate, are switching away from a project, or want to be sure nothing is
running in the background.

- `path` selects the project (defaults to the current directory).
- `--devname` stops a named server instead of this project's, matching `osyrin dev --devname` (setting `OSY_DEVNAME`
  works too).

It only ever stops a server it can confirm is the one it started: it matches the running process against what the
server recorded about itself, and if the recorded server is already gone it simply reports that and stops nothing — it
will not signal an unrelated process that has since taken over the same slot.

## Examples       {#examples}

```console
osy stop            # stop the local platform for this project
```

## See also       {#see-also}

[Listing your local platforms](https://osysharp.com/reference/local/listing-local-instances/) — see every local platform on this machine, and which are still running.

[Running a local platform](https://osysharp.com/reference/local/running-a-local-platform/) — the local platform this stops, and how the loop starts it for you.

[Compiling your app](https://osysharp.com/reference/local/compiling-your-app/) — compile your source into your app (starts the platform if needed).

[Running tests locally](https://osysharp.com/reference/testing/running-tests-locally/) — run your app's tests locally (starts the platform if needed).
