Skip to main content
U.S. flag

An official website of the United States government

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Moving apps between spaces

If you have an app that exists in one org/space but you need to move it to another:

  1. Deploy the new application instance using the appropriate steps on the cloning page.

    • Make sure to run cf target -o <NEW_ORG> -s <NEW_SPACE>  before running cf push .
    • If you keep the app name the same, you may need to use a different host  to avoid route conflicts.
  2. Go back to the old space.

    cf target -o <OLD_ORG> -s <OLD_SPACE>
  3. If you are changing orgs, remove the domain/route.

    cf delete-domain <DOMAIN>
    # or
    cf delete-route <SHARED_DOMAIN> -n <HOST>
  4. Go back to the new space.

    cf target -o <NEW_ORG> -s <NEW_SPACE>
  5. If you changed orgs and are using a Domain, re-create it.

    cf create-domain <DOMAIN>
  6. Map the domain/route.

    cf map-route <APP_NAME> <DELEGATED_DOMAIN>
    # or
    cf map-route <APP_NAME> <SHARED_DOMAIN> -n <HOST>
  7. Delete the old app.

    cf target -o <OLD_ORG> -s <OLD_SPACE>
    cf delete <APP_NAME>