https://github.com/philogicae/self-host-supabase-template
Template to self-host a complete Supabase environment
https://github.com/philogicae/self-host-supabase-template
docker minio pgvector self-host supabase
Last synced: 17 days ago
JSON representation
Template to self-host a complete Supabase environment
- Host: GitHub
- URL: https://github.com/philogicae/self-host-supabase-template
- Owner: philogicae
- Created: 2025-07-21T14:24:28.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-04-22T14:51:31.000Z (about 1 month ago)
- Last Synced: 2026-04-22T15:28:58.554Z (about 1 month ago)
- Topics: docker, minio, pgvector, self-host, supabase
- Language: Shell
- Homepage: https://github.com/supabase/supabase/tree/master/docker
- Size: 137 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Self-Hosted Supabase Template
This repository provides a convenient template for self-hosting a complete Supabase environment using Docker Compose. It includes all the necessary services to run a full-featured Supabase instance, including the `database`, `authentication`, `storage`, and the `Supabase Studio UI`. This template comes with the `pgvector` extension enabled by default for AI applications and includes `rustfs` for local, S3-compatible object storage.
> All credit to [Supabase](https://github.com/supabase/supabase)
> Official Guide: [Self-Hosting](https://supabase.com/docs/guides/self-hosting/docker)
## Prerequisites
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/)
## Getting Started
To get your self-hosted Supabase instance up and running, follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/philogicae/self-host-supabase-template.git
cd self-host-supabase-template
```
2. **Deploy the Supabase stack:**
Copy the `.env.example` file to `.env` and fill it with your own values.
Then run the `deploy.sh` script:
```bash
./deploy.sh
```
- This script will:
- Create the necessary directories for the database and storage volumes.
- Start all the Supabase services in the background using Docker Compose.
3. **Access Supabase Studio:**
Once the services are running, you can access the Supabase Studio by opening your web browser and navigating to `http://localhost:3000`.
## Project Structure
- `.env.example`: An example environment file that you should copy to `.env` and fill with your own values (check `./utils` for generation scripts).
- `compose.yaml`: The main Docker Compose file that defines all the Supabase services.
- `volumes`: Contains initialization scripts and configuration files for the various services.
- `deploy.sh`: A script to deploy the Supabase stack.
- `reset.sh`: A script to reset the Supabase environment by stopping containers, removing volumes, and resetting the git repository.
- `prepare_volumes.sh`: A script to create the necessary volume directories. Note that `deploy.sh` already performs this step.