Self-Hosting Supabase: Migrating to remote db and Serving Edge Functions Locally #43208
|
Hey, I have built a React project using Supabase, and now I am planning to self-host the Supabase stack. For migrating my existing project, the migrations ran correctly. For reference, I followed this article: https://www.supadex.app/blog/how-to-self-host-supabase-(without-losing-your-mind) Note: The article does not mention that after running the I followed the article exactly as instructed. After that, all the containers started successfully and were running properly. However, I have some questions. 1) Database Migration & Moving to AWS RDSI ran the migration files from my existing project in the project root directory using: All migrations were applied successfully, and the database is currently hosted locally (via Docker). Now, I am planning to move the database to AWS RDS. How can I change the database configuration to use AWS RDS instead of the local Docker database? 2) Edge Functions IssueThe article does not mention anything about functions. In the project root, I ran: Output: However, when I open the self-hosted application dashboard at: I do not see the functions listed there. The tables are synced correctly after running the migration command, but I am unsure how the functions should be handled in a self-hosted setup. Steps to Reproduce the Issue
This command takes the SQL files from the At this step, I want to know how to configure the project to use a remote database (e.g., AWS RDS) instead of the local Docker database. After that, my main doubt is: how do I properly serve and manage the project’s Edge Functions in a self-hosted environment? |
Replies: 2 comments
|
Hi @Pavan-Kumar-KN, to address your questions above:
Hope this helps |
Hi @Pavan-Kumar-KN, to address your questions above:
npx supabaseit should be used for the purposes of local development and testing only, and should never be exposed to any external traffic. The reason for that is that CLI starts Supabase with default placeholder secrets and API keys, access to the UI is not password protected, and the locally running MCP server also doesn't support authentication.