# Migrate API Signer

This page describes how to migrate your API Signer to a new host.

You might want to migrate your API Signer for a number of reasons—for example, moving from one cloud provider to another (such as Google Cloud to AWS), or moving from a (local setup)[https://docs.fordefi.com/developers/getting-started/set-up-an-api-signer/api-signer-docker] to a cloud host where the Signer can run permanently.

The steps below show you how to move your API Signer to its new home without re-registering your API User keys.

1. Turn off your currently running API Signer.
2. Remove your API Signer from your organization.
Click **Settings** > **API Signer** > **Remove**.

This action requires Admin access.
3. Refresh your browser and click **Add API Signer** to create a new instance.

4. Install the latest API Signer image on the new host by running the install commands described [here](https://docs.fordefi.com/developers/getting-started/set-up-an-api-signer/install-the-api-signer#install-the-api-signer-docker-image).

5. Select **Provision signer** and copy the public key displayed in the terminal, including the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` lines.
6. Go back to the API Signer creation wizard in Fordefi and paste the complete public key, including its header and footer. Then click **Next**.
7. Open the Fordefi mobile app. You should see an **Add API Signer** notification in your inbox.
8. Open the notification, review the public key, and click **Activate**. A success message should appear.
9. Refresh the browser and go to **Settings**. The new API Signer should appear as **Activated**.
10. Once you have successfully activated the new API Signer, run it as before:

```bash
docker run --rm --log-driver local --mount source=vol,destination=/storage -it fordefi.jfrog.io/fordefi/api-signer:latest
```
To run the Docker image as a headless process, issue the following command:

```bash
docker run --rm --log-driver local --mount source=vol,destination=/storage -d fordefi.jfrog.io/fordefi/api-signer:latest /api-signer run
```


Registering API user keys
- You do not need to re-register your API User public keys with the Signer. The registration is recorded on the Fordefi backend and will survive the migration.
- Any API-initiated transaction created during the migration will remain in `Pending signature` state in the Fordefi transaction history. Signing will resume once the new API Signer is running.