App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.
App Platform deploys apps to the datacenter region nearest to you, by default. You can change which region the app is deployed to by updating the app’s spec. This can be useful if you want to deploy to a region closer to your users or are experiencing performance issues.
We do not support changing an app’s region from the control panel.
Managed Databases and DevDB databases do not support region migration. If you migrate an app with a database a new region, the database remains in the original region and the app is not able to connect to the database.
In this scenario, 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. If you are using a DigitalOcean Managed Database, you can back up your database cluster and restore the cluster in a new region using the control panel.
To change an app’s region, go to the Apps page in the DigitalOcean Control Panel and click your app. Click the Settings tab, scroll to the App Spec section, and click the Edit button. Here, you can download the spec to edit it in your preferred text editor or edit the spec directly in the control panel.
To change the region, set the value of the region
field to the desired region’s slug, like this:
name: example-app
region: sfo2
features:
- buildpack-stack=ubuntu-18
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: professional-xs
name: reactions
run_command: npm start
source_dir: /
Review our regional availability page 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, instead click Upload File, select your updated spec, and click Replace. This automatically triggers a redeployment into the new region.