> ## Documentation Index
> Fetch the complete documentation index at: https://www.meilisearch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating to Meilisearch Cloud

> Meilisearch Cloud is the recommended way of using Meilisearch. Move your self-hosted instance, local or in production, to Meilisearch Cloud in one CLI command with meili teleport, or with the export API.

## Requirements

* A running Meilisearch instance, v1.16 or later
* If the instance has a master key, that master key or an API key with the `export` action
* A command-line terminal

You do not need a Meilisearch Cloud account. `meili teleport` creates one for you.

***

## Teleport with the CLI

[Move a self-hosted Meilisearch instance to Meilisearch Cloud with meili teleport](https://www.youtube-nocookie.com/embed/oRMskfcYR2I?rel=0)

### 1. Install the CLI

> [tab] npm
>
> ```bash theme={null}
> npm install -g @meilisearch/cli
> ```
>
> Installing with npm requires Node.js 22 or later.

> [tab] Homebrew
>
> ```bash theme={null}
> brew install meilisearch/tap/meili
>
> # to upgrade
> brew update && brew upgrade meilisearch/tap/meili
> ```

> [tab] Install script
>
> ```bash theme={null}
> curl -fsSL https://raw.githubusercontent.com/meilisearch/cli/main/scripts/install.sh | sh
> ```
>
> The script works on macOS and Linux. Run it again to update the CLI.

### 2. Run `meili teleport`

```bash theme={null}
meili teleport
```

The command asks its questions in the terminal. It:

1. Asks for the instance to move, from your CLI config file or by its URL and API key
2. Checks that the API key can export data
3. Logs you in to Meilisearch Cloud in your browser, and creates your account if you do not have one
4. Creates the Cloud project: a free trial project if your account has not used its free trial yet, or a project on the plan you choose. Paid plans require a payment method in your Cloud account. See the [pricing page](https://www.meilisearch.com/pricing).
5. Adds the new project to your CLI config file
6. Sends your data to the new project and waits until it is indexed

### 3. Verify the migration

Open your [Cloud project](https://cloud.meilisearch.com) and run a few searches to confirm all data transferred correctly.

> [!TIP]
>
> To migrate without questions, for example in a script, first run `meili auth login` yourself: it opens your browser to log in to Meilisearch Cloud. The script can then run `meili project add` and `meili export`. See the [CLI README](https://github.com/meilisearch/cli#readme).

***

## Export API

If you prefer not to use the CLI, the export API pushes your data directly from your self-hosted instance to a remote Meilisearch instance without creating any intermediate files.

### 1. Create a Meilisearch Cloud project

Navigate to [Meilisearch Cloud](https://cloud.meilisearch.com) and create a new project. Once it is ready, note down your project URL and API key from the project overview.

### 2. Run the export

On your self-hosted instance, send a `POST /export` request pointing to your Cloud project:

```bash cURL theme={null}
curl \
  -X POST 'MEILISEARCH_URL/export' \
  -H 'Authorization: Bearer API_KEY' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "url": "TARGET_INSTANCE_URL",
    "indexes": {
      "*": {
        "overrideSettings": true
      }
    }
  }'
```

```bash CLI theme={null}
meili export \
  --project-url MEILISEARCH_URL --project-api-key API_KEY \
  \
  --url TARGET_INSTANCE_URL --indexes '{"*":{"overrideSettings":true}}'
```

```python Python theme={null}
client.export(
  url='https://remote-meilisearch-instance.com',
  api_key='masterKey',
  payload_size='50 MiB',
  indexes={
    'movies*': {},
    'books*': {},
  },
)
```

```java Java theme={null}
Map<String, ExportIndexFilter> indexes = new HashMap<>();
indexes.put("*", ExportIndexFilter.builder().overrideSettings(true).build());
ExportRequest request = ExportRequest.builder().url("TARGET_INSTANCE_URL").indexes(indexes).build();
client.export(request);
```

```dart Dart theme={null}
await client.export(
  ExportQuery(
    url: exportSinkUrl,
    apiKey: 'new_instance_api_key',
    payloadSize: "100 MiB",
  ),
);
```

Replace `TARGET_INSTANCE_URL` with your Cloud project URL and add your Cloud API key via the `apiKey` field or an `Authorization` header.

Meilisearch returns a task object. [Use the `taskUid` to monitor its progress.](https://www.meilisearch.com/docs/capabilities/indexing/tasks_and_batches/async_operations)

### 3. Verify the migration

Once the task status is `succeeded`, open your [Cloud project](https://cloud.meilisearch.com) and run a few searches to confirm all data transferred correctly.

***

> [!WARNING]
>
> Meilisearch Cloud automatically generates a new master key during project creation. If you are using [security keys](https://www.meilisearch.com/docs/resources/self_hosting/security/basic_security.md), update your application to use the newly generated Meilisearch Cloud API keys.

Congratulations, you have migrated to Meilisearch Cloud. If you encounter any problems, reach out to our support team on [Discord](https://discord.meilisearch.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.