# Adding a project key

## What is a Project Key?

In the `metadata.json` file in your Mapeo configuration, you can include a `projectKey`, which is a random cryptographic string of characters to prevent unwanted devices from getting access to the data.

Once a Mapeo Mobile or Mapeo Desktop device has imported a configuration with a project key, it can only sync with another Mapeo Mobile or Mapeo Desktop device that has the same project key.

You can edit the project key (for example, if you want to make first 4 characters identifiable to a project) but it can only contain letters `a-f` and numbers `0-9`.

It can also only be 64 characters long -- no more, no less.

## Creating a Project Key

To create a `projectKey`, first open the Terminal.

### Using mapeo-settings-builder

{% hint style="info" %}
For instructions on how to install **mapeo-settings-builder**, see Building configuration file [Via the command line](/complete-reference-guide/customization-options/custom-configurations/creating-custom-configurations/coding-configuration/building-configuration-file/preparing-computer.md).
{% endhint %}

Copy and paste the following command into the terminal

```
mapeo-settings-builder generate-key
```

You'll see something like this (but with x replaced with real characters and numbers)

```
'380c02d32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1d'
```

Copy this string and add it to the `metadata.json` file so it looks like this:

```
{
  "dataset_id": "mapeo-jungle",
  "projectKey": "380c02d32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1d"
}
```

Notice that there are double quotes `"` around each value.


---

# 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.mapeo.app/complete-reference-guide/customization-options/custom-configurations/creating-custom-configurations/coding-configuration/adding-a-project-key.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.
