+
+ Admin Sync
+
+
+
+ Your instance will have an admin login that matches your pockethost.io
+ login.
+
+
+
+
diff --git a/frontends/lander/content/docs/usage/admin-sync.md b/frontends/lander/content/docs/usage/admin-sync.md
new file mode 100644
index 00000000..87ebf28a
--- /dev/null
+++ b/frontends/lander/content/docs/usage/admin-sync.md
@@ -0,0 +1,19 @@
+---
+title: Admin Sync
+category: usage
+description: Admin Sync keeps your instance secure by syncing your pockethost.io account with the admin account of your instance.
+---
+
+Admin Sync will make sure your instance always has an admin account that matches the login credentials of your pockethost.io account.
+
+## Admin Sync `Enabled` (default)
+
+When Admin Sync is enabled, your pockethost.io account credentials will be copied as an admin login to your instance before the instance is launched.
+
+If you change your pockethost.io credentials while an instance is running, it will not be updated until the next time it is launched. To force your instance to shut down, place it in Maintenance Mode and then wait for the status to show as `idle`.
+
+Admin Sync is enabeld by default. When an instance is first created, it will have an admin account matching your pockethost.io login. This is a security measure to prevent someone from creating the initial admin account before you've had a chance.
+
+## Admin Sync `Disabled`
+
+Your pockethost.io credentails will not be copied to your instance on future invocations.
diff --git a/src/constants.ts b/src/constants.ts
index 3b9aaee8..b2130be4 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -205,10 +205,12 @@ export const INSTANCE_APP_MIGRATIONS_DIR = () =>
/**
* Helpers
*/
-export const MOTHERSHIP_DATA_ROOT = () =>
- join(settings().DATA_ROOT, settings().MOTHERSHIP_NAME)
-export const mkAppUrl = (path = '') => `${settings().APP_URL}${path}`
-export const mkBlogUrl = (path = '') => `${settings().BLOG_URL}${path}`
+export const MOTHERSHIP_DATA_ROOT = () => INSTANCE_DATA_ROOT(MOTHERSHIP_NAME())
+export const INSTANCE_DATA_ROOT = (id: InstanceId) => join(DATA_ROOT(), id)
+export const INSTANCE_DATA_DB = (id: InstanceId) =>
+ join(DATA_ROOT(), id, `pb_data`, `data.db`)
+export const mkAppUrl = (path = '') => `${APP_URL()}${path}`
+export const mkBlogUrl = (path = '') => `${BLOG_URL()}${path}`
export const mkDocUrl = (path = '') => mkBlogUrl(join('/docs', path))
export const mkEdgeSubdomain = (subdomain: string) =>
`${settings().HTTP_PROTOCOL}//${subdomain}.${settings().EDGE_APEX_DOMAIN}`
diff --git a/src/mothership-app/migrations/1699965112_updated_instances.js b/src/mothership-app/migrations/1699965112_updated_instances.js
new file mode 100644
index 00000000..0cd59dc0
--- /dev/null
+++ b/src/mothership-app/migrations/1699965112_updated_instances.js
@@ -0,0 +1,27 @@
+///