Keeping data in the EU
A workspace keeps its apps’ data in one region, the United States or the European Union. You choose when you create the workspace, and it can’t change afterwards. Every workspace is in the US unless you choose the EU.
The EU is for Enterprise. You can create an EU workspace on any plan, but you can’t create or deploy an app in it until it’s on Enterprise. Write to sales@jiayang.cloud to set that up.
Create a workspace in the EU
Section titled “Create a workspace in the EU”--region needs CLI 0.1.12 or later.
jiayang workspace create acme --region euCreated workspace acme, with its apps' data kept in the EU. You're its owner.In the dashboard, choose European Union under Where its data is kept when you create the workspace. The choice only appears where the EU is available. jiayang workspace show acme and the workspace’s Settings page show where it is.
What stays in the EU
Section titled “What stays in the EU”For an EU workspace, Cloudflare holds these to its EU jurisdiction:
- Each app’s database. It’s a D1 database created in the EU jurisdiction, and its read replicas stay there too.
- Each app’s files. They’re in an R2 bucket created in the EU jurisdiction. Only R2’s EU endpoint can reach it.
- Container apps. The container runs only in EU data centres. The Durable Object in front of it, which starts the container and keeps its state, runs and stores its data in the EU.
- The audit log, once it’s archived. Entries older than 30 days move to an archive bucket in the EU, encrypted with the workspace’s own key. Nothing of an EU workspace’s log is written to the US archive. If the EU archive isn’t available, older entries stay in our database instead.
Cloudflare sets a database’s or a bucket’s jurisdiction when it’s created and never changes it, so a workspace’s region can’t change either.
What doesn’t
Section titled “What doesn’t”Some data is outside the EU, whatever the workspace’s region:
- Our own database. Accounts, members, sharing, settings, encrypted secrets, environment variables and the last 30 days of the audit log are in our Postgres database in AWS us-east-2 (Ohio), as for every workspace.
- Requests and app code. Requests are served by Cloudflare’s data centre nearest the person making them, anywhere in the world, and a Worker app’s code runs there. So does our edge, which keeps a short-lived note there of who may open the app. The app’s own database and files are still in the EU.
- Static sites and container images. A static site’s files and a container app’s image are stored outside the EU.
- Logs. An app’s logs are kept by Workers Logs, which has no jurisdiction, and go wherever a log drain sends them.
- Key-value storage and queues. An app in an EU workspace can’t have them yet, so a deploy that asks for them is refused.
- Your own Postgres. A database you connect stays wherever you keep it. Your SQL and its results pass through Cloudflare on the way, and aren’t stored.
- Cloudflare’s own records. Cloudflare logs a Durable Object’s id outside its jurisdiction for billing and debugging.
If you can’t create or deploy
Section titled “If you can’t create or deploy”error: This workspace keeps its data in the EU, which comes with Enterprise. Write to sales@jiayang.cloud to move it onto Enterprise, then deploy again.The workspace isn’t on Enterprise yet. Its apps that already run keep running.
error: This workspace keeps its data in the EU, and nothing new can be made there right now. Its apps keep running. Write to support@jiayang.cloud.The EU isn’t available on our side at the moment. We never create an EU workspace’s database, files or containers anywhere else instead.
error: Workspaces can't be made in the EU here yet. Make this one in the US, or write to sales@jiayang.cloud to hear when the EU opens.You asked for the EU where it isn’t offered. Nothing was created.
error: This workspace keeps its data in the EU, and key-value storage and queues can't be kept there yet. Nothing was deployed. Take "kv" and "queue" out of jiayang.json to deploy without them.The deploy asked for key-value storage or a queue. Nothing was made for it, here or anywhere else.
error: Cloudflare didn't hold this app's database to the EU, so it was taken off again and the deploy stopped. Write to support@jiayang.cloud.Cloudflare made the app’s new database outside the EU. We check where each one is before the app uses it, so nothing was bound to it or stored in it, and we deleted it. If Cloudflare didn’t let us delete it at once, the error says it’s being taken off, and we keep trying until it’s gone. If we couldn’t make a note of it either, the error says the app’s next deploy takes it off: it stays until someone deploys the app again. Write to support so we can look into it.
error: Cloudflare didn't hold this app's container to the EU, so it was taken off again and the deploy stopped. Write to support@jiayang.cloud.The same for a container app: Cloudflare made its container without holding it to the EU, so the app never used it, and we deleted it or are still deleting it.
error: Cloudflare hasn't yet deleted a database it made for this app and didn't hold to the EU, or another deploy is still checking one. Try again in a few minutes, or write to support@jiayang.cloud.A database an earlier deploy found outside the EU is still waiting to be deleted, or another deploy of the app is still checking its own. This deploy doesn’t make another beside it. Each deploy of the app tries to delete it first, and we keep trying too when we made a note of it, so deploy again in a few minutes. We only delete one with no tables in it: if it has tables, the error stays until we’ve looked at it, so write to support. For a container app, the same error names a container.
error: Workspace acme was made in the US, not the EU, because the platform didn't take the region. A workspace's region can't change: if its data shouldn't be in the US, delete it with `jiayang workspace delete acme`.The platform you reached is from before regions, so it made the workspace in the US. Delete it if that isn’t where its data should be.