# Bulk transfer of project ownership

To aid with the handover for all of a users projects to another user, Server Pro includes a script for bulk transfer of project ownership.

The projects will be added to a new tag in the new project owners account. The tag is named after the current users email address and has prefix "transferred-from", example: "<transferred-from-alice@example.com>".

Added in Server Pro version 5.5.3.

## **Usage**

{% code overflow="wrap" %}

```bash
# Overleaf Toolkit setup:
# email based
toolkit$ bin/run-script modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=alice@example.com --to-user=bob@example.com

# user-id based
tookit$ bin/run-script modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=68880f000000000000000000 --to-user=68880f000000000000000001

# Legacy docker-compose.yml setup:
$ docker exec sharelatex /bin/bash -c "source /etc/overleaf/env.sh && source /etc/container_environment.sh && cd /overleaf/services/web && node ./modules/server-ce-scripts/scripts/transfer-all-projects-to-user.mjs --from-user=alice@example.com --to-user=bob@example.com"
```

{% endcode %}

## **Flags**

| Name          | Description                               |
| ------------- | ----------------------------------------- |
| `--from-user` | Email or user-id of current project owner |
| `--to-user`   | Email or user-id of the new project owner |

## Completion

If the script terminates prematurely due to an error, it will print the error and exit with code 1 to denote that it was unsuccessful.

If the migration is completed successfully it will print "Done" and exit with code 0.


---

# Agent Instructions: 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:

```
GET https://docs.overleaf.com/on-premises/user-and-project-management/project-management/bulk-transfer-of-project-ownership.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
