Files
supabase/docker
dd512e912a fix(self-hosted): prevent Kong startup failures from CRLF line endings (#44422)
## What changed
- added `docker/volumes/.gitattributes` with `* text=auto eol=lf` to
enforce LF line endings for Docker-mounted volume files
- added a Windows troubleshooting warning to the self-hosting Docker
guide for Kong startup failures caused by CRLF line endings

## Why
Issue #44052 reports `supabase-kong` failing with `exec
/home/kong/kong-entrypoint.sh: no such file or directory`.
A common cause is CRLF conversion on Windows for mounted shell scripts.
Enforcing LF in `docker/volumes` prevents this class of failure for
fresh checkouts/copies.

## Validation
- `git check-attr text eol -- docker/volumes/api/kong-entrypoint.sh
docker/volumes/db/roles.sql docker/volumes/logs/vector.yml`
- `pnpm exec prettier --check
apps/docs/content/guides/self-hosting/docker.mdx`
- attempted `pnpm --prefix apps/docs run lint:mdx` (failed locally due
missing `node-pty` native module in this environment)

Closes #44052


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added warning about Windows CRLF line ending issues with Docker
mounted scripts and resolution steps.

* **Chores**
* Added line ending configuration to enforce LF format in Docker
volumes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-05-15 10:29:04 +02:00
..

License Ask DeepWiki

Self-Hosted Supabase with Docker

This is the official Docker Compose setup for self-hosted Supabase. It provides a complete stack with all Supabase services running locally or on your infrastructure.

Getting Started

Follow the detailed setup guide in our documentation: Self-Hosting with Docker

The guide covers:

  • Prerequisites (Git and Docker)
  • Initial setup and configuration
  • Securing your installation
  • Accessing services
  • Updating your instance

What's Included

This Docker Compose configuration includes the following services:

  • Studio - A dashboard for managing your self-hosted Supabase project
  • Kong - Kong API gateway
  • Auth - JWT-based authentication API for user sign-ups, logins, and session management
  • PostgREST - Web server that turns your PostgreSQL database directly into a RESTful API
  • Realtime - Elixir server that listens to PostgreSQL database changes and broadcasts them over websockets
  • Storage - RESTful API for managing files in S3, with Postgres handling permissions
  • imgproxy - Fast and secure image processing server
  • postgres-meta - RESTful API for managing Postgres (fetch tables, add roles, run queries)
  • PostgreSQL - Object-relational database with over 30 years of active development
  • Edge Runtime - Web server based on Deno runtime for running JavaScript, TypeScript, and WASM services
  • Logflare - Log management and event analytics platform
  • Vector - High-performance observability data pipeline for logs
  • Supavisor - Supabase's Postgres connection pooler

Documentation

Updates

To update your self-hosted Supabase instance:

  1. Review CHANGELOG.md for breaking changes
  2. Check versions.md for new image versions
  3. Update docker-compose.yml if there are configuration changes
  4. Pull the latest images: docker compose pull
  5. Stop services: docker compose down
  6. Start services with new configuration: docker compose up -d

Note: Consider to always backup your database before updating.

Community & Support

For troubleshooting common issues, see:

Self-hosted Supabase is community-supported. Get help and connect with other users:

  • Discord - Real-time chat and community support
  • Reddit - Official Supabase subreddit

Share your self-hosting experience:

Important Notes

Security

⚠️ The default configuration is not secure for production use.

Before deploying to production, you must:

  • Update all default passwords and secrets in the .env file
  • Generate new JWT secrets
  • Review and update CORS settings
  • Consider setting up a secure proxy in front of self-hosted Supabase
  • Review and adjust network security configuration (ACLs, etc.)
  • Set up proper backup procedures

See the security section in the documentation.

License

This repository is licensed under the Apache 2.0 License. See the main Supabase repository for details.