Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: restructure overview and add quick setup (#41438)

Andrey A.486dfccf604d
diff --git a/apps/docs/content/guides/self-hosting.mdx b/apps/docs/content/guides/self-hosting.mdx
index 2fa8b7300f8..60d129837ed 100644
--- a/apps/docs/content/guides/self-hosting.mdx
+++ b/apps/docs/content/guides/self-hosting.mdx
@@ -1,34 +1,26 @@
---
title: 'Self-Hosting'
description: 'Host Supabase on your own infrastructure.'
-subtitle: 'Install and run your own Supabase.'
+subtitle: 'Install and run your own Supabase on your computer, server, or cloud infrastructure.'
hideToc: true
---
-Self-hosted Supabase lets you run the entire Supabase stack on your own computer, server, or cloud infrastructure.
+## Get started
-This is different from:
-
-- **Supabase CLI / Local Development**: A lightweight [local environment](/docs/guides/local-development) for development and testing only.
-- **Managed Supabase** platform: If you want to try managed Supabase for free, visit [supabase.com/dashboard](/dashboard).
-
-Self-hosting is a good fit if you need full control over your data, have compliance requirements that prevent using managed services, or want to run Supabase in an isolated environment.
-
-## No telemetry
-
-Self-hosted Supabase does not phone home or collect any telemetry.
-
-## Enterprise
-
-If you're an enterprise using self-hosted Supabase, we'd love to hear from you. Reach out to our [Growth Team](https://forms.supabase.com/enterprise) to discuss your use case, share feedback, or explore design partnership opportunities.
-
-## Officially supported
+The fastest and recommended way to self-host Supabase is using Docker.
<div className="grid md:grid-cols-12 gap-4 not-prose">
- <div className="md:col-span-6 xl:col-span-3 relative" key="/guides/self-hosting/docker">
+ <div className="md:col-span-6 xl:col-span-4 relative" key="/guides/self-hosting/docker">
<Link href="/guides/self-hosting/docker" passHref>
- <GlassPanel title="Docker">
-
+ <GlassPanel icon={'/docs/img/icons/docker'} hasLightIcon={true}
+ title={
+ <span className="flex items-center gap-2">
+ Docker
+ <Badge variant="success">Official</Badge>
+ </span>
+ }
+ showIconBg={true}
+ >
Deploy Supabase within your own infrastructure using Docker Compose.
</GlassPanel>
</Link>
@@ -36,10 +28,10 @@ If you're an enterprise using self-hosted Supabase, we'd love to hear from you.
</div>
</div>
-## Community supported
+## Other deployment options
{/* supa-mdx-lint-disable-next-line Rule004ExcludeWords */}
-There are several community-driven projects to help you deploy Supabase. These projects may be outdated and are seeking active maintainers. If you're interested in maintaining one of these projects, [contact the community team](/open-source/contributing/supasquad).
+There are several other ways to deploy Supabase with the help of community-driven projects. These projects may be outdated and are seeking active maintainers. If you're interested in maintaining one of these projects, [contact the Community team](/open-source/contributing/supasquad).
<div className="grid md:grid-cols-12 gap-4 not-prose">
{community.map((x) => (
@@ -49,9 +41,7 @@ There are several community-driven projects to help you deploy Supabase. These p
title={
<span className="flex items-center gap-2">
{x.name}
- <span className="uppercase text-xs whitespace-nowrap text-foreground-lighter font-mono border rounded-full px-2 py-0.5">
- Maintainer needed
- </span>
+ <Badge>Maintainer needed</Badge>
</span>
}
>
@@ -59,7 +49,9 @@ There are several community-driven projects to help you deploy Supabase. These p
</GlassPanel>
</Link>
</div>
- ))}
+
+))}
+
</div>
export const community = [
@@ -75,7 +67,22 @@ export const community = [
},
]
-## Responsibility model
+## About self-hosting
+
+Self-hosting is a good fit if you need full control over your data, have compliance requirements that prevent using managed services, or want to run Supabase in an isolated environment.
+
+### How self-hosted Supabase differs
+
+Self-hosted Supabase is different from:
+
+- **Supabase CLI** (local development), which is intended for development and testing only.
+- **Managed Supabase** platform, which is fully hosted and operated by Supabase.
+
+### Telemetry
+
+Self-hosted Supabase does not phone home or collect any telemetry.
+
+### Your responsibilities when self-hosting
When you self-host, **you are responsible for**:
@@ -85,14 +92,16 @@ When you self-host, **you are responsible for**:
- Backups and disaster recovery
- Monitoring and uptime
-## Support and troubleshooting
+## Support and community
+
+Self-hosted Supabase is community-supported.
-For resolving common issues, see:
+For resolving common issues:
- [GitHub Discussions](https://github.com/orgs/supabase/discussions?discussions_q=is%3Aopen+label%3Aself-hosted) - Questions, feature requests, and workarounds
- [GitHub Issues](https://github.com/supabase/supabase/issues?q=is%3Aissue%20state%3Aopen%20label%3Aself-hosted) - Known issues
-Self-hosted Supabase is community-supported. Get help and connect with other users:
+Get help and connect with other users:
- [Discord](https://discord.supabase.com) - Real-time chat and community support
{/* supa-mdx-lint-disable-next-line Rule003Spelling */}
@@ -101,3 +110,7 @@ Self-hosted Supabase is community-supported. Get help and connect with other use
Share your self-hosting experience:
- [GitHub Discussions](https://github.com/orgs/supabase/discussions/39820) - "Self-hosting: What's working (and what's not)?"
+
+### Enterprise self-hosting
+
+If you're an enterprise using self-hosted Supabase, we'd love to hear from you. Reach out to our [Growth Team](https://forms.supabase.com/enterprise) to discuss your use case, share feedback, or explore design partnership opportunities.
diff --git a/apps/docs/content/guides/self-hosting/docker.mdx b/apps/docs/content/guides/self-hosting/docker.mdx
index 569c576ad1a..b23c80d6374 100644
--- a/apps/docs/content/guides/self-hosting/docker.mdx
+++ b/apps/docs/content/guides/self-hosting/docker.mdx
@@ -133,13 +133,25 @@ While we provided example placeholder passwords and keys in the `.env.example` f
<Admonition type="danger">
- Follow all of the steps in this section to ensure you have a secure setup, and only then start all services.
+ Review the configuration options below and ensure you set all secrets before starting the services.
</Admonition>
+### Quick setup (experimental)
+
+To generate and apply all secrets at once you can run:
+
+```sh
+sh ./utils/generate-keys.sh
+```
+
+The script is experimental, so review the output before proceeding and also check `.env` after it's updated by the script.
+
+Alternatively, configure all secrets manually as follows.
+
### Configure database password
-Change the placeholder password in the `.env` file **before** starting your Supabase for the first time.
+Change the placeholder password in the `.env` file **before** starting Supabase for the first time.
- `POSTGRES_PASSWORD`: the password for the `postgres` and `supabase_admin` database roles
@@ -264,7 +276,9 @@ psql 'postgres://postgres.[POOLER_TENANT_ID]:[POSTGRES_PASSWORD]@[your-domain]:6
When using `psql` with command-line parameters instead of a connection string to connect to Supavisor, the `-U` parameter should also be `postgres.[POOLER_TENANT_ID]`, and not just `postgres`.
-If for some reason you need to configure Postgres to be directly accessible from the Internet, read [Exposing your Postgres database](#exposing-your-postgres-database) below.
+If you need to configure Postgres to be directly accessible from the Internet, read [Exposing your Postgres database](#exposing-your-postgres-database).
+
+To change the database password, read [Changing database password](#changing-database-password).
### Accessing Edge Functions
@@ -479,6 +493,16 @@ After restarting, you can connect to the database directly using a standard Post
postgres://postgres:[POSTGRES_PASSWORD]@[your-server-ip]:5432/[POSTGRES_DB]
```
+### Changing database password
+
+To change the database password after initial setup, run:
+
+```sh
+sh ./utils/db-passwd.sh
+```
+
+The script generates a new password, updates all database roles, and modifies your `.env` file. After running it, restart the services with `docker compose up -d --force-recreate`.
+
#### File storage backend on macOS
By default, Storage backend is set to `file`, which is to use local files as the storage backend. For macOS compatibility, you need to choose `VirtioFS` as the Docker container file sharing implementation (in Docker Desktop -> Preferences -> General).
diff --git a/apps/docs/features/docs/MdxBase.shared.tsx b/apps/docs/features/docs/MdxBase.shared.tsx
index 41a168c4a22..06af05a873e 100644
--- a/apps/docs/features/docs/MdxBase.shared.tsx
+++ b/apps/docs/features/docs/MdxBase.shared.tsx
@@ -1,6 +1,6 @@
import { ArrowDown, Check, X } from 'lucide-react'
import Link from 'next/link'
-import { Button, Image } from 'ui'
+import { Badge, Button, Image } from 'ui'
import { Admonition, type AdmonitionProps } from 'ui-patterns/admonition'
import { GlassPanel } from 'ui-patterns/GlassPanel'
import { IconPanel } from 'ui-patterns/IconPanel'
@@ -45,6 +45,7 @@ const components = {
AuthSmsProviderConfig,
AppleSecretGenerator,
AuthProviders,
+ Badge,
Button,
ButtonCard,
CodeSampleDummy,
diff --git a/apps/docs/public/img/icons/docker-light.svg b/apps/docs/public/img/icons/docker-light.svg
new file mode 100644
index 00000000000..6c0e9855eca
--- /dev/null
+++ b/apps/docs/public/img/icons/docker-light.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 756.26 596.9"><path d="M743.96 245.25c-18.54-12.48-67.26-17.81-102.68-8.27-1.91-35.28-20.1-65.01-53.38-90.95l-12.32-8.27-8.21 12.4c-16.14 24.5-22.94 57.14-20.53 86.81 1.9 18.28 8.26 38.83 20.53 53.74-46.1 26.74-88.59 20.67-276.77 20.67H.06c-.85 42.49 5.98 124.23 57.96 190.77 5.74 7.35 12.04 14.46 18.87 21.31 42.26 42.32 106.11 73.35 201.59 73.44 145.66.13 270.46-78.6 346.37-268.97 24.98.41 90.92 4.48 123.19-57.88.79-1.05 8.21-16.54 8.21-16.54l-12.3-8.27Zm-554.29-38.86h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm-422.2 0H2.42v81.7h81.7zM189.67 103.2h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm0-103.2h-81.7v81.7h81.7z" style="fill:#1d63ed;stroke-width:0"/></svg>
\ No newline at end of file
diff --git a/apps/docs/public/img/icons/docker.svg b/apps/docs/public/img/icons/docker.svg
new file mode 100644
index 00000000000..6db89f6e495
--- /dev/null
+++ b/apps/docs/public/img/icons/docker.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 756.26 596.9"><path d="M743.96 245.25c-18.54-12.48-67.26-17.81-102.68-8.27-1.91-35.28-20.1-65.01-53.38-90.95l-12.32-8.27-8.21 12.4c-16.14 24.5-22.94 57.14-20.53 86.81 1.9 18.28 8.26 38.83 20.53 53.74-46.1 26.74-88.59 20.67-276.77 20.67H.06c-.85 42.49 5.98 124.23 57.96 190.77 5.74 7.35 12.04 14.46 18.87 21.31 42.26 42.32 106.11 73.35 201.59 73.44 145.66.13 270.46-78.6 346.37-268.97 24.98.41 90.92 4.48 123.19-57.88.79-1.05 8.21-16.54 8.21-16.54l-12.3-8.27Zm-554.29-38.86h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm-422.2 0H2.42v81.7h81.7zM189.67 103.2h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm105.55 0h-81.7v81.7h81.7zm0-103.2h-81.7v81.7h81.7z" style="fill:#fff;stroke-width:0"/></svg>
\ No newline at end of file