{"id":25783120,"url":"https://github.com/singh-inder/supabase-automated-self-host","last_synced_at":"2026-04-02T02:02:02.011Z","repository":{"id":278127641,"uuid":"895417239","full_name":"singh-inder/supabase-automated-self-host","owner":"singh-inder","description":"Self-host Supabase with Nginx/Caddy and Authelia with just ONE bash script.","archived":false,"fork":false,"pushed_at":"2025-04-08T07:12:36.000Z","size":130,"stargazers_count":176,"open_issues_count":1,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-08T07:37:54.837Z","etag":null,"topics":["authelia","caddy","docker","nginx","self-hosted","supabase"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singh-inder.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"_inder1"}},"created_at":"2024-11-28T07:06:03.000Z","updated_at":"2025-04-05T12:29:52.000Z","dependencies_parsed_at":"2025-03-31T16:40:29.431Z","dependency_job_id":"1cda48a9-222f-4060-94a2-5bed6dfd692a","html_url":"https://github.com/singh-inder/supabase-automated-self-host","commit_stats":null,"previous_names":["singh-inder/supabase-automated-self-host"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singh-inder%2Fsupabase-automated-self-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singh-inder%2Fsupabase-automated-self-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singh-inder%2Fsupabase-automated-self-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singh-inder%2Fsupabase-automated-self-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singh-inder","download_url":"https://codeload.github.com/singh-inder/supabase-automated-self-host/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068561,"owners_count":21042516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authelia","caddy","docker","nginx","self-hosted","supabase"],"created_at":"2025-02-27T08:01:18.495Z","updated_at":"2026-04-02T02:02:01.989Z","avatar_url":"https://github.com/singh-inder.png","language":"Shell","funding_links":["https://buymeacoffee.com/_inder1"],"categories":["Community Tools"],"sub_categories":[],"readme":"# Supabase automated self host\n\nDeploy a self-hosted [Supabase](https://github.com/supabase/supabase) instance with:\n\n- [Authelia](https://github.com/authelia/authelia) for secure 2-factor authentication (2FA)\n- [Nginx](https://github.com/JonasAlfredsson/docker-nginx-certbot) or [Caddy](https://github.com/caddyserver/caddy) as the reverse proxy\n- SSL certificates from [Let's Encrypt](https://letsencrypt.org/), issued \u0026 renewed automatically.\n\nAll set up with just **ONE bash script!**\n\n👉 If you find this project helpful, please consider leaving a ⭐ to show your support. You can also support my work by [Buying me a coffee](https://buymeacoffee.com/_inder1). Thankyou!\n\n### Updates\n\n- Publishable/secret API keys \u0026 asymmetric JWTs are now supported. [Learn more](https://github.com/singh-inder/supabase-automated-self-host/discussions/132)\n\n## Prerequisites\n\n- **A Linux Machine with docker installed**: This can be a server or any personal computer running Linux with at least 4 GB RAM and 25 GB Disk space. **The script has been tested only on Linux/WSL.**\n\n- **Own Domain (optional)**: Required only if you're going to expose supabase services to the internet. You can get one for free from [noip](https://www.noip.com). Otherwise you can also run supabase locally (more on this in setup instructions)\n\n## Setup Instructions\n\nIf you prefer a visual guide, check out this video where I deploy a self hosted supabase instance with Authelia to AWS in a few minutes:\n\n[![Self-Host Supabase with 2FA and Caddy](https://imgur.com/wet0kVC.jpg)](https://www.youtube.com/watch?v=XhTBCGb0rTM \"Self-Host Supabase with 2FA and Caddy - Just Run One Script!\")\n\n1. Download `setup.sh` script\n\n   ```bash\n    curl -o setup.sh https://raw.githubusercontent.com/singh-inder/supabase-automated-self-host/refs/heads/main/setup.sh\n   ```\n\n2. Make script executable\n\n   ```bash\n    chmod +x setup.sh\n   ```\n\n3. Execute script\n\n   👉 If you only want basic username and password authentication\n\n   ```bash\n   sudo ./setup.sh\n   ```\n\n   👉 If you want 2-factor authentication setup with authelia\n\n   ```bash\n   sudo ./setup.sh --with-authelia\n   ```\n\n   👉 To use nginx as reverse proxy:\n\n   ```bash\n   sudo ./setup.sh --proxy nginx\n   ```\n\n   For more, you can run script with --help flag:\n\n   ```bash\n   sudo ./setup.sh --help\n   ```\n\n   During script execution, you'll be prompted to enter some details:\n   - **Enter your domain:** Enter the domain name where you want to access the supabase dashboard or make api calls. Make sure to specify the `http` or `https` protocol.\n     For example: `https://supabase.example.com`\n\n     ⭐ If you want to setup supabase locally, refer to this [Guide](https://github.com/singh-inder/supabase-automated-self-host/discussions/6)\n\n   - **Enter username:** Enter your username.\n\n   - **Enter password:** Enter your password.\n\n   - **Do you want to send confirmation emails to register users? `[y/n]`:**\n     - If you enter \"yes\", You'll need to set up your own SMTP server to handle emails. You can read more about it in [supabase docs](https://supabase.com/docs/guides/self-hosting/docker#configuring-an-email-server) or checkout my [YouTube video](https://www.youtube.com/watch?v=0iE-h_Wq2Js\u0026t=1822s) for a practical walkthrough on setting up emails.\n\n     - If you enter \"no\", users will be able to signup with their email \u0026 password without any email verification. Perfect for testing things out.\n\n   The following additional prompts have to be answered only if you've enabled `--with-authelia` flag:\n   - **Enter email:** Used by authelia for setting up 2-factor auth / reset password flow.\n\n     ⭐ If you're not going to setup an SMTP server, you can enter any email here. When not using SMTP server, you can easily view codes sent by authelia in `docker/volumes/authelia/notifications.txt`\n\n   - **Enter Display Name:** Used by authelia in emails and [dashboard](https://gist.github.com/user-attachments/assets/a7a4c0b8-920e-4b61-9bb5-1cae26d5bbe9).\n\n   - **Do you want to setup redis with authelia? [y/n]:** By default, authelia stores session data in memory. If authelia container dies for some reason every user logged into supabase dashboard will be logged out. If you're going to production, Authelia team [recommends](https://www.authelia.com/configuration/session/redis/) to use redis.\n\nThats it!\n\nAfter script completes successfully, cd into `supabase-automated-self-host/docker` directory and run `docker compose up -d`. Wait for containers to be healthy and you're good to go. To access dashboard outside your network, make sure that your firewall allows traffic on ports 80 and 443.\n\n## How this differs from coolify:\n\n- Coolify is a Platform as a Service (PaaS) that provides hosting solutions for various applications, while this project only sets up supabase with nginx/caddy and authelia.\n\n- With coolify, you're only getting basic username password auth. No 2FA.\n\n- This project configures nginx or caddy as a reverse proxy.\n\n- This script is definitely going to be faster than setting up through a GUI.\n\n## Where to ask for help?\n\n- Open a new issue\n- [X/Twitter](https://x.com/_inder1)\n- or stop by my [Discord server](https://discord.gg/Pbpm7NsVjG) anytime.\n\n## License\n\nThis project is licensed under the [Apache 2.0 License](LICENSE).\n\nNote: This project isn't officially supported by Supabase. For any information regarding Supabase itself you can refer to their [docs](https://supabase.com/docs).\n\n## Contributions\n\nFeel free to open issues or submit pull requests if you have suggestions or improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingh-inder%2Fsupabase-automated-self-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingh-inder%2Fsupabase-automated-self-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingh-inder%2Fsupabase-automated-self-host/lists"}