> For the complete documentation index, see [llms.txt](https://intuitem.gitbook.io/ciso-assistant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intuitem.gitbook.io/ciso-assistant/installation/maintenance/updating.md).

# Updating your local instance

How to update your local instance. All docker images are available on ghcr with the specific versions matching the repo tags. The latest tag points to the most recent release for both back and front.

## Hands-free

The easiest way to update your on-prem/local instance (pro or community)

**Run the script&#x20;*****update-ciso-assistant*****:**

```bash
./update-ciso-assistant.sh
```

## Detailled steps

In case of issues (unsupported shell, windows, etc.) here are the steps to consider:

1. backup your db:
   1. if you're using `sqlite`, copy the file under a different name
   2. if it's `postgresql` you can use something like `pg_dump`
2. stop and clean the containers, this won't affect your data

`docker compose rm -fs`

3. restart the compose and let it handle the migration

`docker compose up -d`

## Edge cases

**Force remove the previous docker images to get the new ones**

```bash
docker rmi ghcr.io/intuitem/ciso-assistant-community/backend:latest ghcr.io/intuitem/ciso-assistant-community/frontend:latest 2> /dev/null
```

**Third-party workspaces are consolidated on first boot**

Instances that used the third-party module before the one-workspace-per-entity rule gave each *assessment* its own workspace. The first boot after upgrading merges them, so a vendor assessed several times ends up with a single folder named after it. Only folders move — links, exports and history keep working — but the merge shows up as a longer-than-usual first startup on large instances.

If an entity is skipped, replay it once the conflict is resolved:

```bash
python manage.py consolidate_entity_workspaces --entity "Acme Corp"          # print the plan
python manage.py consolidate_entity_workspaces --entity "Acme Corp" --apply  # write it
```

Without `--entity` the command covers every third party; without `--apply` it changes nothing.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://intuitem.gitbook.io/ciso-assistant/installation/maintenance/updating.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
