# How to Change an App's Datacenter Region App Platform is a fully managed Platform-as-a-Service (PaaS) that deploys applications from Git repositories or container images. It automatically builds, deploys, and scales components while handling all underlying infrastructure. App Platform deploys apps to the datacenter region nearest to you by default. You can change the region to place your app closer to users or to address performance issues. **Warning**: If you migrate an app with a database to a new region, the database remains in the original region and the app is not able to connect to the database. This breaks the connection between the two unless you [disable the database’s trusted sources](https://docs.digitalocean.com/products/databases/postgresql/how-to/secure/index.html.md). If you are using a DigitalOcean Managed Database, we recommend you [relocate the database](https://docs.digitalocean.com/products/databases/postgresql/how-to/relocate/index.html.md) to the app’s new region. If you are not using a managed database, we recommend backing up the contents of your database, creating a new database in the target region, and then restoring the data to the new database. You can change your app’s datacenter region in the control panel or by updating the [app spec](https://docs.digitalocean.com/products/app-platform/reference/app-spec/index.html.md). ## DigitalOcean Control Panel To change an app’s region, go to the [Apps page](https://cloud.digitalocean.com/apps), click your app, then click the **Networking** tab. In the **Private Network** area, click **Edit network**. ![Networking tab with the Edit network button highlighted](https://docs.digitalocean.com/screenshots/app-platform/networking-network.9e10c86680791bdd3762bd5b4b7d8db782f80decba601fe001c3eb94dd0c0304.png) In the **Edit datacenter and VPC network** dialog, select an option in the **Choose a datacenter region** dropdown menu. Select **Connect app to VPC network** to enable secure outbound communication with other resources in the VPC. Click **Save network settings**. ## App Spec Go to the [Apps page](https://cloud.digitalocean.com/apps) in the DigitalOcean Control Panel, click your app, then click the **Settings** tab. In the **App Spec** section, click **Edit**. You can edit the spec directly in the control panel or download and edit it in a text editor. To change the region, set the value of the `region` field to the desired region’s slug, like this: `example-app.yaml` ```yaml name: example-app region: sfo features: - buildpack-stack=ubuntu-22 services: - build_command: npm run build environment_slug: node-js github: branch: master deploy_on_push: true repo: example/app-repo http_port: 8080 instance_count: 2 instance_size_slug: apps-s-1vcpu-1gb name: reactions run_command: npm start source_dir: / ``` Review our [regional availability page](https://docs.digitalocean.com/platform/regional-availability/index.html.md) for a list of regions and their slugs. If you edited the spec in the control panel, click **Save** to update your app. If you downloaded the spec, click **Upload File**, select your updated spec, click **Open**, and then click **Replace**. This automatically triggers a redeployment into the new region.