---
title: "5. Keep it running"
description: "What happens to the two projects when you close a window and when you quit Tato Studio, how to keep the runtime running at login or as a service, and how to manage projects from a terminal."
type: "docs-page"
url: "https://tatolab.com/docs/tutorial/keep-running"
site: "Tatolab"
section: "Tutorial"
---

# 5. Keep it running

> What happens to the two projects when you close a window and when you quit Tato Studio, how to keep the runtime running at login or as a service, and how to manage projects from a terminal.

Once the streams work, you want them to keep running without you watching.

## A window, a project

Each project window is its project's place in Studio. Close motion-log's window and Studio asks first: closing it stops the project and closes it, every stream unloaded. Nothing is deleted; open it again from the Projects window, press Play, and it carries on. So while you want a project playing, keep its window open, or minimize it.

## Quit Studio

Studio runs the runtime while it's open, so quitting Studio stops the runtime and both projects with it. Quitting isn't closing, though: the runtime records every open project, playing or stopped, and opens each one again, the same way, the next time it starts. Open Studio tomorrow and motion-watcher and motion-log are playing again.

To have that happen without opening Studio yourself, turn on opening Studio at login in **Settings › General**. Studio then starts in the tray when you log in, with the runtime ready and your projects playing as you left them.

## On a machine nobody sits at

A machine by the door, in a rack or on a robot has no one to open Studio. There, run the runtime as a service: [Install on Linux](https://tatolab.com/docs/install/linux) has a systemd unit, and [Deploy to a machine](https://tatolab.com/docs/run/deploy) covers copying a project there and keeping it playing. Studio, on your own machine, uses a runtime that's already running instead of starting its own.

## When one fails

A stream that fails to start shows why, in place of its graph, and the rest of the project's streams keep their state. Fix what it names and press **Play**: a failed stream is loaded again and retried.

If a stream takes the runtime down twice in a row, the runtime holds it stopped the next time it starts, without running any of its code, and starts every other project as normal. Press Play to try it again for real.

## From a terminal

Each of these acts on the project in the current folder, or the one `--dir` names:

```sh
tatolab play      # play it
tatolab pause     # pause every stream of the project, holding its state
tatolab resume    # carry on from where it paused
tatolab stop      # stop playback; the graph stays open
tatolab reload    # read the project from disk again, keeping its playback
tatolab close     # close the project until it's opened again; nothing is deleted
```

They act on the same projects Studio shows: stop motion-log from a terminal, and its window shows it stopped. [Manage projects](https://tatolab.com/docs/run/manage) has the rest.

## Next

Last step: build on the streams with an AI agent, beside Studio. [Build with an agent](https://tatolab.com/docs/tutorial/agents).
