# Saving your work

What EugoIDE keeps when your session stops, what starts fresh in every session, and how to keep your setup from one session to the next.

Source: https://docs.eugo.io/docs/platform/saving-your-work/

---

Each time you open EugoIDE, Eugo starts a session for you. A session can stop on its own after it has been idle for a while, so expect every session to end at some point. When you come back, opening EugoIDE starts a new one. Restarting a notebook's kernel does not end your session.

When a session stops, the notebooks and files in your home folder are kept, and most other changes start fresh. This page explains what is kept, what is reset, and how to set things up so you don't lose work.

## At a glance

| What | After your session stops |
|---|---|
| Notebooks and files in your home folder | **Kept** |
| Your preferences in the **Settings Editor** | **Kept**, in an up-to-date workspace |
| Files in the `scratch_work` folder | **Deleted** |
| Packages you install with `pip`, `%pip` or `pip install --user` | Reset |
| Download caches | Reset |
| Terminal and notebook command history | Reset |
| The tabs and panels you had open | Reset |
| Anything saved outside your home folder, including `~` | Reset |

## Your home folder

Your home folder, `/home/<you>`, is the folder the file browser on the left opens in, and a new terminal starts inside it. It is stored on your workspace's own storage, outside the session, so everything you save there, including folders you create, is still there the next time you open EugoIDE.

Two folders inside it work differently: [`scratch_work`](#the-scratch_work-folder) and [`demo_notebooks`](#the-demo_notebooks-folder).

> **Note:** `~` is not your home folder. In a terminal and in your code, `~` and the `$HOME` environment variable point to `/root`, a folder inside the session, not to `/home/<you>`. Anything saved there is lost when the session stops: `cp results.csv ~/`, for example, puts the file somewhere it will not survive. Save into your home folder instead, by its full path or by a path relative to the folder your terminal or notebook is in. To see the full path, run `pwd` in a new terminal.

## Your settings

Preferences you change in EugoIDE's **Settings Editor** are kept from one session to the next. This needs a workspace that is up to date: if yours shows a "New update available" message, apply the update first (see [Workspace updates and versions](/docs/platform/workspaces.md#workspace-updates-and-versions)).

## The scratch_work folder

`scratch_work` appears inside your home folder, but it is not part of it. It is a separate, small disk (10 GiB) that belongs to the current session only. Every session starts with an empty `scratch_work`, and the disk is deleted, together with everything on it, when the session stops.

Use it for temporary files you can recreate. Never keep the only copy of something there: copy anything you want to keep into your home folder as soon as you have it, because the session can stop on its own when it is idle.

## The demo_notebooks folder

`demo_notebooks` holds Eugo's example notebooks. It is read-only, so you cannot save changes there. To run or change an example, first save a copy outside `demo_notebooks` (**File → Save Notebook As…**, then choose a location in your home folder), and work on the copy.

## What starts fresh in every session

Each session starts from a clean copy of the EugoIDE environment. When the session stops, these are reset:

- **Packages you install yourself.** This covers `pip install`, `%pip install` and `pip install --user`, and a virtual environment created outside your home folder. They install into the session, not into your home folder. The details are in [Installing Python packages](/docs/guides/installing-python-packages.md#what-lasts-between-sessions).
- **Download caches.** Files that tools save to their default cache folder under `~`, such as pip's download cache or model files a library downloads for you, are downloaded again in the next session.
- **Command history.** Your terminal history and your notebook input history start empty.
- **Open tabs and panels.** EugoIDE opens with its default layout.
- **Anything else outside your home folder**, including `~`, `/tmp` and changes to system files.

### Why these are reset

This is deliberate:

- **An install that goes wrong does not follow you.** A new session always starts from the original environment, so a package that breaks something is gone the next time you open EugoIDE.
- **Updates apply cleanly.** When your workspace is updated to newer versions of the libraries that come with EugoIDE, your next session uses them, with no leftover installs built for the old versions.
- **Typed secrets do not stay in your history.** Commands can contain passwords or access tokens, and the terminal and notebook history files are not kept after the session ends. A notebook's cells are different: they are saved in the notebook file in your home folder, so keep secrets out of them.

## Keeping your setup between sessions

1. **Check what's already included.** EugoIDE comes with about 1,250 Python packages already installed (see [Libraries](/docs/platform/libraries.md)). Before you add one, read [Installing Python packages](/docs/guides/installing-python-packages.md) for how to add it without replacing Eugo's own builds.
2. **Keep a requirements file in your home folder.** List the extra packages you need in a file such as `requirements.txt` in your home folder, and install them at the start of each session, for example in the first cell of a notebook saved in your home folder:

    ```python
    %pip install -r requirements.txt
    ```

    Or from a terminal in your home folder:

    ```bash
    pip install -r requirements.txt
    ```

3. **Save the results and data you want to keep in your home folder**, not in `scratch_work`, `~` or `/tmp`.
4. **Keep a copy on your own computer** by downloading your notebooks (see [How do I download my notebooks?](/docs/faq.md#how-do-i-download-my-notebooks)).
