@thierrynakoa/fire-flow 12.2.1 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CREDITS.md +25 -0
- package/DOMINION-FLOW-OVERVIEW.md +182 -38
- package/README.md +399 -455
- package/TROUBLESHOOTING.md +264 -264
- package/agents/fire-debugger.md +54 -0
- package/agents/fire-executor.md +1610 -1033
- package/agents/fire-fact-checker.md +1 -1
- package/agents/fire-planner.md +85 -17
- package/agents/fire-project-researcher.md +1 -1
- package/agents/fire-researcher.md +4 -22
- package/agents/{fire-phoenix-analyst.md → fire-resurrection-analyst.md} +394 -394
- package/agents/fire-reviewer.md +552 -499
- package/agents/fire-verifier.md +114 -19
- package/bin/cli.js +18 -101
- package/commands/fire-0-orient.md +2 -2
- package/commands/fire-1a-new.md +50 -15
- package/commands/fire-1c-setup.md +33 -5
- package/commands/fire-1d-discuss.md +87 -1
- package/commands/fire-2-plan.md +556 -527
- package/commands/fire-3-execute.md +2046 -1356
- package/commands/fire-4-verify.md +975 -906
- package/commands/fire-5-handoff.md +46 -5
- package/commands/fire-6-resume.md +2 -31
- package/commands/fire-add-new-skill.md +138 -19
- package/commands/fire-autonomous.md +14 -2
- package/commands/fire-complete-milestone.md +1 -1
- package/commands/fire-cost.md +179 -183
- package/commands/fire-debug.md +1 -6
- package/commands/fire-loop-resume.md +2 -2
- package/commands/fire-loop-stop.md +1 -1
- package/commands/fire-loop.md +2 -15
- package/commands/fire-map-codebase.md +1 -1
- package/commands/fire-migrate-database.md +548 -0
- package/commands/fire-new-milestone.md +1 -1
- package/commands/fire-reflect.md +1 -2
- package/commands/fire-research.md +142 -21
- package/commands/{fire-phoenix.md → fire-resurrect.md} +859 -603
- package/commands/fire-scaffold.md +297 -0
- package/commands/fire-search.md +1 -2
- package/commands/fire-security-scan.md +483 -484
- package/commands/fire-setup.md +359 -0
- package/commands/fire-skill.md +770 -0
- package/commands/fire-skills-diff.md +506 -506
- package/commands/fire-skills-history.md +388 -388
- package/commands/fire-skills-rollback.md +7 -7
- package/commands/fire-skills-sync.md +470 -470
- package/commands/fire-test.md +5 -5
- package/commands/fire-todos.md +1 -1
- package/commands/fire-update.md +5 -5
- package/commands/fire-validate-skills.md +282 -0
- package/commands/fire-vuln-scan.md +492 -493
- package/hooks/run-hook.sh +8 -8
- package/hooks/run-session-end.sh +7 -7
- package/hooks/session-end.sh +90 -90
- package/hooks/session-start.sh +1 -1
- package/package.json +4 -24
- package/plugin.json +7 -7
- package/references/autonomy-levels.md +235 -0
- package/references/behavioral-directives.md +95 -3
- package/references/blocker-tracking.md +1 -1
- package/references/circuit-breaker.md +93 -2
- package/references/context-engineering.md +227 -9
- package/references/honesty-protocols.md +70 -1
- package/references/issue-to-pr-pipeline.md +149 -150
- package/references/metrics-and-trends.md +1 -2
- package/references/research-improvements.md +4 -108
- package/references/sdlc-mapping.md +73 -0
- package/references/state-machine.md +151 -0
- package/skills-library/AVAILABLE_TOOLS_REFERENCE.md +333 -0
- package/skills-library/SKILLS-INDEX.md +57 -558
- package/skills-library/SKILLS_LIBRARY_INDEX.md +532 -0
- package/skills-library/_general/api-patterns/api-field-name-mismatch.md +107 -0
- package/skills-library/_general/api-patterns/streaming-command-timeout.md +122 -0
- package/skills-library/_general/api-patterns/streaming-proxy-cors-bypass.md +102 -0
- package/skills-library/_general/automation/settings-gui-generator.md +172 -0
- package/skills-library/_general/database-solutions/data-type-mapping-reference.md +181 -0
- package/skills-library/_general/database-solutions/mysql-limit-offset-string-coercion.md +102 -0
- package/skills-library/_general/database-solutions/mysql-to-pg-migration.md +195 -0
- package/skills-library/_general/database-solutions/orm-schema-portability.md +193 -0
- package/skills-library/_general/database-solutions/persistent-analysis-storage.md +207 -0
- package/skills-library/_general/database-solutions/pg-to-mysql-schema-migration-methodology.md +190 -0
- package/skills-library/_general/database-solutions/sql-dialect-compatibility-matrix.md +306 -0
- package/skills-library/_general/database-solutions/sqlite-to-pg-migration.md +219 -0
- package/skills-library/_general/frontend/canvas-bubble-animation-grouping.md +270 -0
- package/skills-library/_general/frontend/color-token-migration.md +112 -0
- package/skills-library/_general/frontend/framer-motion-layoutid-grouping.md +150 -0
- package/skills-library/_general/frontend/pyqt6-settings-dialog.md +191 -0
- package/skills-library/_general/frontend/react-flow-animated-layout-switching.md +101 -0
- package/skills-library/_general/frontend/react-hooks-order-debugging.md +141 -0
- package/skills-library/_general/frontend/redux-localstorage-auth-desync.md +126 -0
- package/skills-library/_general/frontend/safari-csp-theme-color-debugging.md +124 -0
- package/skills-library/_general/frontend/safari-sw-cache-poisoning.md +138 -0
- package/skills-library/_general/frontend/svg-sparkline-no-charting-library.md +131 -0
- package/skills-library/_general/growth-marketing/oss-daily-growth-intelligence.md +224 -0
- package/skills-library/_general/integrations/claude-code-local-mcp-integration.md +250 -0
- package/skills-library/_general/integrations/mcp-composite-tool-orchestration.md +200 -0
- package/skills-library/_general/methodology/AGENT_SDK_STANDALONE_TOOLING.md +181 -0
- package/skills-library/_general/methodology/AGENT_TEAMS_GUIDE.md +169 -0
- package/skills-library/_general/methodology/ALAS_STATEFUL_EXECUTION.md +207 -0
- package/skills-library/_general/methodology/AUTO_REVIEWER_SUBAGENT.md +211 -0
- package/skills-library/_general/methodology/CONSISTENCY_CHECK_AMBIGUITY_GATE.md +96 -0
- package/skills-library/_general/methodology/DEAD_ENDS_SHELF.md +4 -4
- package/skills-library/_general/methodology/DISTILL_NOT_DUMP.md +108 -0
- package/skills-library/_general/methodology/EXECUTION_PROGRESS_MONITOR.md +157 -0
- package/skills-library/_general/methodology/HIERARCHICAL_REVIEW_MARS.md +122 -0
- package/skills-library/_general/methodology/MCP_INTER_AGENT_BRIDGE.md +207 -0
- package/skills-library/_general/methodology/MERMAID_WIZARD_DIAGRAMS.md +77 -0
- package/skills-library/_general/methodology/MISSING_DIMENSION_DETECTOR.md +89 -0
- package/skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md +397 -0
- package/skills-library/_general/methodology/OBSERVATION_MASKING.md +100 -0
- package/skills-library/_general/methodology/PHOENIX_REBUILD_METHODOLOGY.md +82 -11
- package/skills-library/_general/methodology/REVIEW_BACKTRACK_PANEL.md +140 -0
- package/skills-library/_general/methodology/REVIEW_FIX_LOOP.md +117 -0
- package/skills-library/_general/methodology/VOTING_VERDICT_ARBITRATION.md +155 -0
- package/skills-library/_general/methodology/ZERO_FRICTION_CLI_SETUP.md +2 -2
- package/skills-library/_general/methodology/dead-code-activation.md +123 -0
- package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -240
- package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +1 -1
- package/skills-library/_general/patterns-standards/GOF_DESIGN_PATTERNS_FOR_AI_AGENTS.md +5 -5
- package/skills-library/_general/patterns-standards/cascading-failure-diagnosis.md +119 -0
- package/skills-library/_general/patterns-standards/domain-specific-layout-algorithms.md +209 -0
- package/skills-library/_general/patterns-standards/python-desktop-app-architecture.md +399 -0
- package/skills-library/_general/patterns-standards/realtime-monitoring-dashboard.md +457 -0
- package/skills-library/_general/patterns-standards/togglable-processing-pipeline.md +169 -0
- package/skills-library/_general/performance/liveclock-extraction.md +112 -0
- package/skills-library/_general/performance/ref-based-canvas-animation.md +117 -0
- package/skills-library/_general/performance/use-visible-interval.md +131 -0
- package/skills-library/_general/testing/playwright-firefox-withcredentials-auth-issue.md +104 -0
- package/skills-library/_quarantine/README.md +30 -0
- package/skills-library/api-patterns/BROADCAST_SCHEDULER_SHARED_EXECUTE_FUNCTION.md +150 -0
- package/skills-library/api-patterns/ERROR_RESPONSE_STANDARDS.md +145 -0
- package/skills-library/api-patterns/EXPRESS_ROUTE_ORDERING_MIDDLEWARE_INTERCEPTION.md +326 -0
- package/skills-library/api-patterns/PAGINATION_PATTERNS.md +137 -0
- package/skills-library/api-patterns/PODCAST_PROGRESS_TRACKING_THREE_ROOT_CAUSES.md +277 -0
- package/skills-library/api-patterns/RATE_LIMITING_TOGGLE.md +155 -0
- package/skills-library/api-patterns/graphql-content-queries.md +708 -0
- package/skills-library/appointment-scheduler-design.md +423 -0
- package/skills-library/automation/AUTO_POPULATE_COMPLETE_GUIDE.md +631 -0
- package/skills-library/automation/CC_WORKFLOW_STUDIO.md +83 -0
- package/skills-library/automation/CLAUDE_CODE_SWARM_MODE.md +95 -0
- package/skills-library/automation/DAEMON_TRIGGER_FILE_IPC.md +195 -0
- package/skills-library/automation/scheduled-content-publishing.md +608 -0
- package/skills-library/awesome-workflows/Blogging-Platform-Instructions/view_commands.md +25 -0
- package/skills-library/awesome-workflows/CREDENTIAL-SECURITY-WORKFLOW.md +109 -0
- package/skills-library/awesome-workflows/DEBUGGING-WORKFLOW.md +124 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/README.md +31 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-principles-example.md +129 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-agent.md +107 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-claude-md-snippet.md +24 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-slash-command.md +38 -0
- package/skills-library/awesome-workflows/PARALLEL-RESEARCH-WORKFLOW.md +89 -0
- package/skills-library/awesome-workflows/PHASE-EXECUTION-WORKFLOW.md +97 -0
- package/skills-library/awesome-workflows/SESSION-HANDOFF-WORKFLOW.md +116 -0
- package/skills-library/cms-patterns/content-branch-preview.md +515 -0
- package/skills-library/cms-patterns/inline-visual-editing.md +666 -0
- package/skills-library/cms-patterns/mdx-component-content.md +649 -0
- package/skills-library/cms-patterns/media-manager-abstraction.md +827 -0
- package/skills-library/cms-patterns/schema-driven-form-generator.md +838 -0
- package/skills-library/complexity-metrics/complexity-divider.md +707 -0
- package/skills-library/complexity-metrics/work-with-complexity.md +193 -0
- package/skills-library/creative-multimedia/animation-stack-guide.md +577 -0
- package/skills-library/creative-multimedia/audio-enhancement-pipeline.md +625 -0
- package/skills-library/creative-multimedia/content-repurposing-pipeline.md +1146 -0
- package/skills-library/creative-multimedia/data-visualization-generator.md +862 -0
- package/skills-library/creative-multimedia/doc-to-podcast-pipeline.md +2184 -0
- package/skills-library/creative-multimedia/ffmpeg-command-generator.md +405 -0
- package/skills-library/creative-multimedia/image-optimization-pipeline.md +605 -0
- package/skills-library/creative-multimedia/multi-format-content-generator.md +1759 -0
- package/skills-library/creative-multimedia/og-image-generator.md +635 -0
- package/skills-library/creative-multimedia/podcast-audio-composition.md +1355 -0
- package/skills-library/creative-multimedia/podcast-quality-evaluation.md +1452 -0
- package/skills-library/creative-multimedia/podcast-script-generation.md +1841 -0
- package/skills-library/creative-multimedia/svg-generation.md +750 -0
- package/skills-library/creative-multimedia/text-to-speech-provider-selector.md +1414 -0
- package/skills-library/creative-multimedia/transcription-pipeline-selector.md +677 -0
- package/skills-library/creative-multimedia/video-streaming-setup.md +559 -0
- package/skills-library/database-solutions/AI_RESPONSE_DATABASE_CACHING.md +520 -0
- package/skills-library/database-solutions/CONDITIONAL_SQL_MIGRATION_PATTERN.md +119 -0
- package/skills-library/database-solutions/DATABASE_COLUMN_NAME_MISMATCH.md +393 -0
- package/skills-library/database-solutions/DATABASE_SCHEMA.md +394 -0
- package/skills-library/database-solutions/DATABASE_SCHEMA_VERIFICATION_GUIDE.md +348 -0
- package/skills-library/database-solutions/DATABASE_STRATEGY.md +71 -0
- package/skills-library/database-solutions/ES_MODULE_SEED_SCRIPT_PATTERN.md +52 -0
- package/skills-library/database-solutions/MIGRATION_GUIDE.md +3 -0
- package/skills-library/database-solutions/PLPGSQL_VARIABLE_CONFLICT_FIX.md +208 -0
- package/skills-library/database-solutions/POSTGRESQL_JSONB_DOUBLE_STRINGIFY_FIX.md +245 -0
- package/skills-library/database-solutions/POSTGRESQL_LICENSE_TABLE_DESIGN.md +393 -0
- package/skills-library/database-solutions/POSTGRESQL_UUID_DOCUMENT_RAG_DUAL_SCOPE.md +732 -0
- package/skills-library/database-solutions/POSTGRES_SQL_TEMPLATE_BINDING_ERROR.md +240 -0
- package/skills-library/database-solutions/PRISMA_DB_PUSH_DATA_LOSS_PREVENTION.md +141 -0
- package/skills-library/database-solutions/PRODUCTION_QUERY_OPTIMIZATION_RESTART_FIX.md +389 -0
- package/skills-library/database-solutions/RLS_SECURITY_GUIDE.md +107 -0
- package/skills-library/database-solutions/SCHEMA_ENHANCEMENTS_GUIDE.md +373 -0
- package/skills-library/database-solutions/SCHEMA_MIGRATION_GUIDE.md +368 -0
- package/skills-library/database-solutions/SCHEMA_VERIFICATION_QUICK_REFERENCE.md +104 -0
- package/skills-library/database-solutions/ai-erd-generator.md +1213 -0
- package/skills-library/database-solutions/content-publishing-states.md +631 -0
- package/skills-library/database-solutions/database-schema-designer.md +522 -0
- package/skills-library/database-solutions/er-diagram-components.md +569 -0
- package/skills-library/database-solutions/er-to-ddl-mapping.md +1405 -0
- package/skills-library/database-solutions/erd-creator-textbook-research.md +433 -0
- package/skills-library/database-solutions/erd-react-flow-architecture.md +1965 -0
- package/skills-library/database-solutions/mariadb-aggregate-function-replacement.md +145 -0
- package/skills-library/database-solutions/normalization-validator.md +778 -0
- package/skills-library/database-solutions/postgres-full-text-search-content.md +494 -0
- package/skills-library/database-solutions/postgresql-to-mysql-runtime-translation.md +286 -0
- package/skills-library/database-solutions/regex-alternation-ordering-sql-types.md +92 -0
- package/skills-library/database-solutions/reserved-word-context-aware-quoting.md +142 -0
- package/skills-library/database-solutions/sql-ddl-generator.md +756 -0
- package/skills-library/database-solutions/supabase-connection-pooler-fix.md +102 -0
- package/skills-library/deployment-security/CPANEL_NODE_DEPLOYMENT.md +166 -0
- package/skills-library/deployment-security/DEPLOYMENT.md +275 -0
- package/skills-library/deployment-security/DEPLOYMENT_CHECKLIST.md +363 -0
- package/skills-library/deployment-security/DEPLOYMENT_PLAN.md +669 -0
- package/skills-library/deployment-security/KNEX_DATABASE_ABSTRACTION.md +444 -0
- package/skills-library/deployment-security/LICENSE_KEY_SYSTEM.md +206 -0
- package/skills-library/deployment-security/NODE18_DEPENDENCY_COMPATIBILITY.md +284 -0
- package/skills-library/deployment-security/PHP_INSTALLER_WIZARD_GUIDE.md +315 -0
- package/skills-library/deployment-security/PM2_ENVIRONMENT_VARIABLE_CACHING.md +256 -0
- package/skills-library/deployment-security/PM2_MEMORY_EXHAUSTION_FIX.md +370 -0
- package/skills-library/deployment-security/PRODUCTION_DEPLOYMENT_GUIDE.md +592 -0
- package/skills-library/deployment-security/PRODUCTION_HARDENING_DOCUMENTATION.md +307 -0
- package/skills-library/deployment-security/PRODUCTION_RECOVERY_CHERRY_PICK_PATTERN.md +202 -0
- package/skills-library/deployment-security/PYINSTALLER_CUDA_WHISPER_BUNDLING.md +236 -0
- package/skills-library/deployment-security/SECURITY.md +41 -0
- package/skills-library/deployment-security/SMTP_SSL_HOSTNAME_MISMATCH_SHARED_HOSTING.md +220 -0
- package/skills-library/deployment-security/SPA_SEO_OPTIMIZATION_CPANEL.md +200 -0
- package/skills-library/deployment-security/SUPABASE_EDGE_FUNCTIONS.md +338 -0
- package/skills-library/deployment-security/VERCEL_GITHUB_DEPLOYMENT_GUIDE.md +858 -0
- package/skills-library/deployment-security/VPS_DEPLOYMENT_READINESS.md +356 -0
- package/skills-library/deployment-security/deployment-changes-not-applying.md +241 -0
- package/skills-library/deployment-security/env-file-management-production-local.md +203 -0
- package/skills-library/deployment-security/express-secure-file-downloads.md +413 -0
- package/skills-library/deployment-security/react-production-deployment-desktop-guide.md +2011 -0
- package/skills-library/deployment-security/self-hosted-supabase-coolify-guide.md +1684 -0
- package/skills-library/deployment-security/unique-features-ai-strategy-plaid-security.md +1613 -0
- package/skills-library/deployment-security/vps-deployment.md +135 -0
- package/skills-library/document-processing/WORD_EXPORT_MARKDOWN_FORMATTING.md +482 -0
- package/skills-library/document-processing/document-ai-landingai-integration.md +677 -0
- package/skills-library/document-processing/express-secure-file-downloads-mern.md +413 -0
- package/skills-library/document-processing/express-secure-file-downloads.md +413 -0
- package/skills-library/document-processing/md-to-word-converter.md +318 -0
- package/skills-library/document-processing/pdf-forms-integration/README.md +101 -0
- package/skills-library/document-processing/pdf-forms-integration/SKILL.md +662 -0
- package/skills-library/ecommerce/ADMIN_PRODUCTS_GUIDE.md +428 -0
- package/skills-library/ecommerce/ECOMMERCE_API_REFERENCE.md +776 -0
- package/skills-library/ecommerce/ECOMMERCE_COMPLETION_SUMMARY.md +673 -0
- package/skills-library/ecommerce/ECOMMERCE_IMPLEMENTATION_GUIDE.md +729 -0
- package/skills-library/ecommerce/ECOMMERCE_QUICK_REFERENCE.md +521 -0
- package/skills-library/ecommerce/ECOMMERCE_TESTING_CHECKLIST.md +565 -0
- package/skills-library/ecommerce/ECOMMERCE_WORKFLOW_GUIDE.md +1059 -0
- package/skills-library/ecommerce/PRODUCT_CREATION_EXPANDED.md +522 -0
- package/skills-library/ecommerce/agentic-commerce-protocol.md +203 -0
- package/skills-library/ecommerce/cart-abandonment-recovery.md +236 -0
- package/skills-library/ecommerce/cart-architecture-patterns.md +300 -0
- package/skills-library/ecommerce/cart-item-count-indicator.md +264 -0
- package/skills-library/ecommerce/checkout-ux-conversion.md +227 -0
- package/skills-library/ecommerce/composable-commerce-selection.md +166 -0
- package/skills-library/ecommerce/ecommerce-analytics-patterns.md +167 -0
- package/skills-library/ecommerce/fraud-detection-patterns.md +179 -0
- package/skills-library/ecommerce/inventory-stock-management.md +270 -0
- package/skills-library/ecommerce/order-saga-state-machine.md +336 -0
- package/skills-library/ecommerce/payment-provider-abstraction.md +245 -0
- package/skills-library/ecommerce/pci-compliance-checklist.md +192 -0
- package/skills-library/ecommerce/refund-chargeback-handling.md +177 -0
- package/skills-library/ecommerce/shipping-carrier-integration.md +218 -0
- package/skills-library/ecommerce/webhook-idempotency-patterns.md +253 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/ci.yml +558 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/prompt-gallery.yml +448 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/release.yml +42 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/test-reusable-ci.yml +25 -0
- package/skills-library/excalidraw-diagrams/CLAUDE.md +57 -0
- package/skills-library/excalidraw-diagrams/LICENSE +21 -0
- package/skills-library/excalidraw-diagrams/README.md +178 -0
- package/skills-library/excalidraw-diagrams/SKILL.md +715 -0
- package/skills-library/form-solutions/BUTTON_TYPE_FORM_SUBMISSION.md +336 -0
- package/skills-library/form-solutions/FILLABLE_PDF_IMPLEMENTATION.md +226 -0
- package/skills-library/form-solutions/SURVEYJS_QUESTIONNAIRE_SYSTEM.md +367 -0
- package/skills-library/form-solutions/tiptap-minimal-setup.md +690 -0
- package/skills-library/frontend/scholarly-classification-bubble-map.md +149 -0
- package/skills-library/infrastructure/ci-cd-pipeline-builder.md +517 -0
- package/skills-library/infrastructure/observability-designer.md +264 -0
- package/skills-library/infrastructure/performance-profiler.md +621 -0
- package/skills-library/installer-wizard-patterns.md +249 -0
- package/skills-library/integrations/CLAUDE_CODE_TOKEN_ANALYTICS.md +160 -0
- package/skills-library/integrations/CONFIGURABLE_AI_PROVIDER_SELECTION.md +728 -0
- package/skills-library/integrations/SOCKET_IO_BROADCAST_ALL_VS_ROOM.md +141 -0
- package/skills-library/integrations/VIRTUAL_MEETINGS_IMPLEMENTATION.md +374 -0
- package/skills-library/integrations/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
- package/skills-library/integrations/YOUTUBE_API_SETUP.md +141 -0
- package/skills-library/integrations/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
- package/skills-library/integrations/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
- package/skills-library/integrations/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
- package/skills-library/integrations/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
- package/skills-library/integrations/ai-ml/GEMINI_AI_RAG_PIPELINE_COMPLETE_GUIDE.md +195 -0
- package/skills-library/integrations/ai-ml/GEMINI_IMAGE_GENERATION_SETUP.md +64 -0
- package/skills-library/integrations/cloudflare/cloudflare-turnstile-debugging.md +202 -0
- package/skills-library/integrations/cloudflare/cloudflare-turnstile-implementation.md +476 -0
- package/skills-library/integrations/cloudflare-turnstile-debugging.md +202 -0
- package/skills-library/integrations/cloudflare-turnstile-implementation.md +476 -0
- package/skills-library/integrations/ghost-creator-monetization-pattern.md +454 -0
- package/skills-library/integrations/headless-cms-architecture.md +484 -0
- package/skills-library/integrations/headless-cms-stack-selection.md +183 -0
- package/skills-library/integrations/payload-cms-patterns.md +674 -0
- package/skills-library/integrations/realtimestt-openwakeword-cuda-windows.md +229 -0
- package/skills-library/integrations/rss-podcast-integration.md +300 -0
- package/skills-library/integrations/wordpress/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
- package/skills-library/integrations/youtube/YOUTUBE_API_SETUP.md +141 -0
- package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
- package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
- package/skills-library/integrations/youtube/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
- package/skills-library/integrations/youtube/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
- package/skills-library/marketing/campaign-analytics.md +97 -0
- package/skills-library/marketing/content-creator.md +105 -0
- package/skills-library/marketing/marketing-strategy-pmm.md +94 -0
- package/skills-library/marketing/social-media-analyzer.md +81 -0
- package/skills-library/methodology/ADVANCED_ORCHESTRATION_PATTERNS.md +401 -0
- package/skills-library/methodology/AGENT_SELF_IMPROVEMENT_LOOP.md +179 -0
- package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +1 -1
- package/skills-library/methodology/CLEANSING_CYCLE.md +358 -0
- package/skills-library/methodology/CONFIDENCE_ANNOTATION_PATTERN.md +143 -0
- package/skills-library/methodology/CRITICAL_PATTERNS_DOCUMENTATION_COMPLETE.md +204 -0
- package/skills-library/methodology/DELIVERABLES_SUMMARY.md +341 -0
- package/skills-library/methodology/DIFFICULTY_AWARE_AGENT_ROUTING.md +252 -0
- package/skills-library/methodology/EVOLUTIONARY_SKILL_SYNTHESIS.md +219 -0
- package/skills-library/methodology/GLOMERULUS_DECISION_GATE.md +223 -0
- package/skills-library/methodology/HIBERNATION_SYSTEM.md +231 -0
- package/skills-library/methodology/INSTRUMENTATION_OVER_RESTRICTION.md +192 -0
- package/skills-library/methodology/MASTER_COMPLETION_SUMMARY.md +444 -0
- package/skills-library/methodology/MASTER_SESSION_COMPLETION.md +743 -0
- package/skills-library/methodology/MERN_QUICK_REFERENCE.md +358 -0
- package/skills-library/methodology/ORGAN_AGENT_MAPPING.md +177 -0
- package/skills-library/methodology/PARALLEL_WAVE_BASED_REFACTORING.md +440 -0
- package/skills-library/methodology/QUICK_REFERENCE.md +358 -0
- package/skills-library/methodology/SDFT_ONPOLICY_SELF_DISTILLATION.md +186 -0
- package/skills-library/methodology/SELF_QUESTIONING_TASK_GENERATION.md +270 -0
- package/skills-library/methodology/SESSION_COMPLETION_SUMMARY.md +304 -0
- package/skills-library/methodology/SESSION_SUMMARY.md +432 -0
- package/skills-library/methodology/WARRIOR_WORKFLOW_DEBUGGING_PROTOCOL.md +252 -0
- package/skills-library/methodology/tech-debt-tracker.md +570 -0
- package/skills-library/parallel-debug/SKILL.md +60 -0
- package/skills-library/patterns-standards/API_PATTERN_FIX_SUMMARY.md +236 -0
- package/skills-library/patterns-standards/BATCH_OPERATIONS_WITH_PROGRESS_MODAL.md +362 -0
- package/skills-library/patterns-standards/CRITICAL_CODING_PATTERNS.md +639 -0
- package/skills-library/patterns-standards/DARK_MODE_MODAL_VISIBILITY.md +258 -0
- package/skills-library/patterns-standards/ERROR_RESILIENCE_IMPLEMENTATION.md +375 -0
- package/skills-library/patterns-standards/ES_MODULE_IMPORT_HOISTING_DOTENV.md +298 -0
- package/skills-library/patterns-standards/NESTED_BACKDROP_FILTER_CSS_ARTIFACT_FIX.md +76 -0
- package/skills-library/patterns-standards/ORDERED_DETECTOR_PIPELINE_GRACEFUL_FALLBACK.md +333 -0
- package/skills-library/patterns-standards/PHASE_IMPORT_ERROR_DEBUGGING.md +271 -0
- package/skills-library/patterns-standards/PYNPUT_GLOBAL_HOTKEY_VK_MATCHING.md +252 -0
- package/skills-library/patterns-standards/REACT_USEEFFECT_CASCADE_RESET_FIX.md +132 -0
- package/skills-library/patterns-standards/SUBMENU_HOVER_DROPDOWN_PATTERN.md +225 -0
- package/skills-library/patterns-standards/TAILWIND_TEXT_VISIBILITY_OVERRIDE.md +322 -0
- package/skills-library/patterns-standards/THEME_AWARE_CSS_VARIABLES_PATTERN.md +209 -0
- package/skills-library/patterns-standards/THEME_USER_OBJECT_PROPERTY_NAMING.md +194 -0
- package/skills-library/patterns-standards/TOOLTIP_BLOCKING_CLICKS_FIX.md +267 -0
- package/skills-library/patterns-standards/claude-code-plugin-structure.md +235 -0
- package/skills-library/patterns-standards/react-i18next-setup.md +429 -0
- package/skills-library/patterns-standards/thesys-c1-generative-ui-integration.md +967 -0
- package/skills-library/plugin-development/CLAUDE_CODE_COMMAND_REGISTRATION_SILENT_FAILURE.md +315 -0
- package/skills-library/plugin-development/plugin-command-namespace-vs-global.md +390 -0
- package/skills-library/plugin-development/plugin-doc-auto-generation.md +172 -0
- package/skills-library/security/GITHUB_REPO_SECURITY_AUDIT.md +115 -0
- package/skills-library/security/admin-deletion-safety.md +396 -0
- package/skills-library/security/application-vuln-patterns.md +477 -0
- package/skills-library/security/env-secrets-manager.md +686 -0
- package/skills-library/security/secure-ai-application-templates.md +347 -0
- package/skills-library/security/sql-injection-prevention-postgresjs.md +151 -0
- package/skills-library/supabase-connection-pooler-fix.md +102 -0
- package/skills-library/system-context/POWERSHELL_BASH_INTEROP.md +82 -0
- package/skills-library/system-context/SERVICE_LIFECYCLE_MANAGEMENT.md +119 -0
- package/skills-library/system-context/SKILL.md +40 -0
- package/skills-library/system-context/WINDOWS_DEV_ENVIRONMENT.md +73 -0
- package/skills-library/testing/E2E_PLAYWRIGHT_PATTERNS.md +99 -0
- package/skills-library/testing/INTEGRATION_TEST_STRATEGY.md +82 -0
- package/skills-library/testing/RED_GREEN_BUGFIX_GATE.md +203 -0
- package/skills-library/testing/TEST_DATA_MANAGEMENT.md +69 -0
- package/skills-library/testing/VITEST_UNIT_TEST_PATTERNS.md +75 -0
- package/skills-library/testing/playwright-api-security-tests.md +202 -0
- package/skills-library/toolbox/SKILL.md +84 -0
- package/skills-library/toolbox/code-graph-and-web-scraping-mcps.md +237 -0
- package/skills-library/ui-ux-pro-max/ACCESSIBILITY_ESSENTIALS.md +115 -0
- package/skills-library/ui-ux-pro-max/DESIGN_SYSTEM_SCAFFOLDING.md +133 -0
- package/skills-library/ui-ux-pro-max/RESPONSIVE_LAYOUT_PATTERNS.md +119 -0
- package/skills-library/ui-ux-pro-max/SKILL.md +386 -0
- package/skills-library/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills-library/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills-library/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills-library/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills-library/ui-ux-pro-max/data/products.csv +97 -0
- package/skills-library/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills-library/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills-library/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills-library/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills-library/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills-library/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills-library/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills-library/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills-library/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills-library/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills-library/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills-library/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills-library/wordpress-style-theme-components.md +1526 -0
- package/templates/ASSUMPTIONS.md +1 -1
- package/templates/DECISION_LOG.md +0 -1
- package/templates/phase-prompt.md +1 -1
- package/templates/phoenix-comparison.md +6 -6
- package/templates/skill-api-integration.md +106 -0
- package/templates/skill-architecture-pattern.md +92 -0
- package/templates/skill-debug-pattern.md +98 -0
- package/templates/skill-devops-recipe.md +107 -0
- package/templates/skill-general.md +65 -0
- package/templates/skill-ui-component.md +113 -0
- package/tools/uat-runner.py +179 -0
- package/version.json +7 -3
- package/workflows/handoff-session.md +2 -2
- package/workflows/new-project.md +2 -2
- package/workflows/plan-phase.md +1 -1
- package/.claude-plugin/plugin.json +0 -64
- package/skills-library/_general/methodology/LIVE_BREADCRUMB_PROTOCOL.md +0 -242
- package/skills-library/_general/methodology/llm-judge-memory-crud.md +0 -241
- package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +0 -183
- package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +0 -263
- package/skills-library/methodology/SABBATH_REST_PATTERN.md +0 -267
- package/skills-library/methodology/STONE_AND_SCAFFOLD.md +0 -220
- package/skills-library/specialists/api-architecture/api-designer.md +0 -49
- package/skills-library/specialists/api-architecture/graphql-architect.md +0 -49
- package/skills-library/specialists/api-architecture/mcp-developer.md +0 -51
- package/skills-library/specialists/api-architecture/microservices-architect.md +0 -50
- package/skills-library/specialists/api-architecture/websocket-engineer.md +0 -48
- package/skills-library/specialists/backend/django-expert.md +0 -52
- package/skills-library/specialists/backend/fastapi-expert.md +0 -52
- package/skills-library/specialists/backend/laravel-specialist.md +0 -52
- package/skills-library/specialists/backend/nestjs-expert.md +0 -51
- package/skills-library/specialists/backend/rails-expert.md +0 -53
- package/skills-library/specialists/backend/spring-boot-engineer.md +0 -56
- package/skills-library/specialists/data-ml/fine-tuning-expert.md +0 -48
- package/skills-library/specialists/data-ml/ml-pipeline.md +0 -47
- package/skills-library/specialists/data-ml/pandas-pro.md +0 -47
- package/skills-library/specialists/data-ml/rag-architect.md +0 -51
- package/skills-library/specialists/data-ml/spark-engineer.md +0 -47
- package/skills-library/specialists/frontend/angular-architect.md +0 -52
- package/skills-library/specialists/frontend/flutter-expert.md +0 -51
- package/skills-library/specialists/frontend/nextjs-developer.md +0 -54
- package/skills-library/specialists/frontend/react-native-expert.md +0 -50
- package/skills-library/specialists/frontend/vue-expert.md +0 -51
- package/skills-library/specialists/infrastructure/chaos-engineer.md +0 -74
- package/skills-library/specialists/infrastructure/cloud-architect.md +0 -70
- package/skills-library/specialists/infrastructure/database-optimizer.md +0 -64
- package/skills-library/specialists/infrastructure/devops-engineer.md +0 -70
- package/skills-library/specialists/infrastructure/kubernetes-specialist.md +0 -52
- package/skills-library/specialists/infrastructure/monitoring-expert.md +0 -70
- package/skills-library/specialists/infrastructure/sre-engineer.md +0 -70
- package/skills-library/specialists/infrastructure/terraform-engineer.md +0 -51
- package/skills-library/specialists/languages/cpp-pro.md +0 -74
- package/skills-library/specialists/languages/csharp-developer.md +0 -69
- package/skills-library/specialists/languages/dotnet-core-expert.md +0 -54
- package/skills-library/specialists/languages/golang-pro.md +0 -51
- package/skills-library/specialists/languages/java-architect.md +0 -49
- package/skills-library/specialists/languages/javascript-pro.md +0 -68
- package/skills-library/specialists/languages/kotlin-specialist.md +0 -68
- package/skills-library/specialists/languages/php-pro.md +0 -49
- package/skills-library/specialists/languages/python-pro.md +0 -52
- package/skills-library/specialists/languages/react-expert.md +0 -51
- package/skills-library/specialists/languages/rust-engineer.md +0 -50
- package/skills-library/specialists/languages/sql-pro.md +0 -56
- package/skills-library/specialists/languages/swift-expert.md +0 -69
- package/skills-library/specialists/languages/typescript-pro.md +0 -51
- package/skills-library/specialists/platform/atlassian-mcp.md +0 -52
- package/skills-library/specialists/platform/embedded-systems.md +0 -53
- package/skills-library/specialists/platform/game-developer.md +0 -53
- package/skills-library/specialists/platform/salesforce-developer.md +0 -53
- package/skills-library/specialists/platform/shopify-expert.md +0 -49
- package/skills-library/specialists/platform/wordpress-pro.md +0 -49
- package/skills-library/specialists/quality/code-documenter.md +0 -51
- package/skills-library/specialists/quality/code-reviewer.md +0 -67
- package/skills-library/specialists/quality/debugging-wizard.md +0 -51
- package/skills-library/specialists/quality/fullstack-guardian.md +0 -51
- package/skills-library/specialists/quality/legacy-modernizer.md +0 -50
- package/skills-library/specialists/quality/playwright-expert.md +0 -65
- package/skills-library/specialists/quality/spec-miner.md +0 -56
- package/skills-library/specialists/quality/test-master.md +0 -65
- package/skills-library/specialists/security/secure-code-guardian.md +0 -55
- package/skills-library/specialists/security/security-reviewer.md +0 -53
- package/skills-library/specialists/workflow/architecture-designer.md +0 -53
- package/skills-library/specialists/workflow/cli-developer.md +0 -70
- package/skills-library/specialists/workflow/feature-forge.md +0 -65
- package/skills-library/specialists/workflow/prompt-engineer.md +0 -54
- package/skills-library/specialists/workflow/the-fool.md +0 -62
- /package/skills-library/{performance → _general/performance}/cache-augmented-generation.md +0 -0
- /package/skills-library/{debugging → parallel-debug}/FAILURE_TAXONOMY_CLASSIFICATION.md +0 -0
- /package/skills-library/{debugging → parallel-debug}/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +0 -0
|
@@ -0,0 +1,1684 @@
|
|
|
1
|
+
# Self-Hosted Supabase with Coolify: Complete Setup & Migration Guide
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Overview](#overview)
|
|
6
|
+
2. [Why Self-Host Supabase?](#why-self-host-supabase)
|
|
7
|
+
3. [Requirements](#requirements)
|
|
8
|
+
4. [Installation: Setting Up Coolify](#installation-setting-up-coolify)
|
|
9
|
+
5. [Deploying Supabase on Coolify](#deploying-supabase-on-coolify)
|
|
10
|
+
6. [Migrating from Hosted Supabase](#migrating-from-hosted-supabase)
|
|
11
|
+
7. [Cost Comparison](#cost-comparison)
|
|
12
|
+
8. [Alternative Self-Hosting Solutions](#alternative-self-hosting-solutions)
|
|
13
|
+
9. [Best Practices](#best-practices)
|
|
14
|
+
10. [Security Considerations](#security-considerations)
|
|
15
|
+
11. [Troubleshooting](#troubleshooting)
|
|
16
|
+
12. [Resources](#resources)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
### What is Coolify?
|
|
23
|
+
|
|
24
|
+
**Coolify** is an open-source, self-hostable alternative to Heroku, Netlify, and Vercel. It helps you manage servers, applications, and databases on your own hardware with just an SSH connection.
|
|
25
|
+
|
|
26
|
+
**Key Features:**
|
|
27
|
+
- 🐳 **Docker-based**: All services run in containers
|
|
28
|
+
- 🎨 **Beautiful UI**: No need to write Dockerfiles
|
|
29
|
+
- 🔒 **Auto-SSL**: Automatic Let's Encrypt certificate setup and renewal
|
|
30
|
+
- 🔄 **Git Integration**: Works with GitHub, GitLab, Bitbucket, Gitea
|
|
31
|
+
- 📊 **One-Click Services**: Deploy databases, apps, and services instantly
|
|
32
|
+
- 🆓 **100% Free**: All features included, no premium tiers
|
|
33
|
+
|
|
34
|
+
### What is Supabase?
|
|
35
|
+
|
|
36
|
+
**Supabase** is an open-source Firebase alternative that provides:
|
|
37
|
+
- 🗄️ **PostgreSQL Database**: Full-featured relational database
|
|
38
|
+
- 🔐 **Authentication**: Built-in user authentication system
|
|
39
|
+
- 📦 **Storage**: File storage and CDN
|
|
40
|
+
- ⚡ **Real-time**: Live database subscriptions
|
|
41
|
+
- 🔧 **Auto-generated APIs**: RESTful and GraphQL APIs
|
|
42
|
+
- 🎛️ **Studio**: Web-based database management interface
|
|
43
|
+
|
|
44
|
+
### Why This Combination?
|
|
45
|
+
|
|
46
|
+
Coolify + Supabase = **Full-stack backend infrastructure** you control:
|
|
47
|
+
- Deploy Supabase with a single click in Coolify
|
|
48
|
+
- Manage everything through a beautiful web interface
|
|
49
|
+
- Avoid vendor lock-in and reduce costs significantly
|
|
50
|
+
- Complete control over your data and infrastructure
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Why Self-Host Supabase?
|
|
55
|
+
|
|
56
|
+
### Cost Savings (50-80% reduction)
|
|
57
|
+
|
|
58
|
+
**Supabase Cloud Pricing:**
|
|
59
|
+
- Free tier: Limited to 500MB database, paused after 7 days inactivity
|
|
60
|
+
- Pro tier: $25/month (includes 8GB database, 100GB bandwidth)
|
|
61
|
+
- Team tier: $599/month
|
|
62
|
+
- Enterprise: Custom pricing (can exceed $410/month for high specs)
|
|
63
|
+
|
|
64
|
+
**Self-Hosted VPS Costs:**
|
|
65
|
+
|
|
66
|
+
| VPS Specs | Provider Examples | Monthly Cost | Best For |
|
|
67
|
+
|-----------|------------------|--------------|----------|
|
|
68
|
+
| 2 vCPU, 4GB RAM, 80GB SSD | DigitalOcean, Linode, Vultr | $12-20 | Development/Testing |
|
|
69
|
+
| 4 vCPU, 8GB RAM, 160GB SSD | Hetzner, OVH | $20-30 | Small Production Apps |
|
|
70
|
+
| 8 vCPU, 32GB RAM, 320GB SSD | Hetzner | ~$50 | Large Production Apps |
|
|
71
|
+
| 16 vCPU, 64GB RAM, 640GB SSD | Dedicated servers | $80-150 | Enterprise Scale |
|
|
72
|
+
|
|
73
|
+
**Real-World Example:**
|
|
74
|
+
- Supabase Cloud (100GB database + moderate traffic): **$200+/month**
|
|
75
|
+
- Self-hosted (same specs): **$40-60/month**
|
|
76
|
+
- **Savings: $140-160/month = $1,680-1,920/year** 💰
|
|
77
|
+
|
|
78
|
+
### Full Control & Privacy
|
|
79
|
+
|
|
80
|
+
- **Data sovereignty**: Your data stays on servers you control
|
|
81
|
+
- **Custom configurations**: Tune PostgreSQL, adjust resource limits
|
|
82
|
+
- **No rate limits**: No artificial API throttling or connection limits
|
|
83
|
+
- **Backup control**: Implement your own backup strategy
|
|
84
|
+
- **Compliance**: Meet specific regulatory requirements (HIPAA, GDPR, etc.)
|
|
85
|
+
|
|
86
|
+
### No Vendor Lock-In
|
|
87
|
+
|
|
88
|
+
- **Portable**: Move to any server or cloud provider
|
|
89
|
+
- **Predictable costs**: No surprise bills from bandwidth overages
|
|
90
|
+
- **Long-term stability**: Not dependent on Supabase's pricing changes
|
|
91
|
+
- **Integration freedom**: Connect to any tools or services
|
|
92
|
+
|
|
93
|
+
### When to Self-Host vs. Use Cloud
|
|
94
|
+
|
|
95
|
+
**Use Supabase Cloud if:**
|
|
96
|
+
- ✅ Just getting started with a prototype/MVP
|
|
97
|
+
- ✅ Don't want to manage infrastructure
|
|
98
|
+
- ✅ Need enterprise support and SLA guarantees
|
|
99
|
+
- ✅ Database is small (<8GB) and traffic is low
|
|
100
|
+
|
|
101
|
+
**Self-host if:**
|
|
102
|
+
- ✅ Your app has moderate to high usage (>1000 users)
|
|
103
|
+
- ✅ Database >10GB or growing rapidly
|
|
104
|
+
- ✅ You need full control over data and infrastructure
|
|
105
|
+
- ✅ You have DevOps knowledge or want to learn
|
|
106
|
+
- ✅ Want to reduce costs by 50-80%
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Requirements
|
|
111
|
+
|
|
112
|
+
### Hardware Requirements
|
|
113
|
+
|
|
114
|
+
**Minimum Specs (Development/Testing):**
|
|
115
|
+
- CPU: 2 vCPU cores
|
|
116
|
+
- RAM: 4 GB
|
|
117
|
+
- Storage: 40 GB SSD
|
|
118
|
+
- Network: 1 Gbps connection
|
|
119
|
+
- **Cost: $12-20/month**
|
|
120
|
+
|
|
121
|
+
**Recommended Specs (Small Production):**
|
|
122
|
+
- CPU: 4 vCPU cores
|
|
123
|
+
- RAM: 8 GB
|
|
124
|
+
- Storage: 80-160 GB SSD
|
|
125
|
+
- Network: 1 Gbps connection
|
|
126
|
+
- **Cost: $20-40/month**
|
|
127
|
+
|
|
128
|
+
**Production Specs (Larger Apps):**
|
|
129
|
+
- CPU: 8+ vCPU cores
|
|
130
|
+
- RAM: 16-32 GB
|
|
131
|
+
- Storage: 160-320 GB SSD
|
|
132
|
+
- Network: 1 Gbps connection
|
|
133
|
+
- **Cost: $50-100/month**
|
|
134
|
+
|
|
135
|
+
### Software Requirements
|
|
136
|
+
|
|
137
|
+
**Operating System (VPS):**
|
|
138
|
+
- ✅ Ubuntu 20.04/22.04/24.04 LTS (recommended)
|
|
139
|
+
- ✅ Debian 11/12
|
|
140
|
+
- ✅ CentOS 8+
|
|
141
|
+
- ✅ AlmaLinux, Rocky Linux
|
|
142
|
+
- ✅ Fedora
|
|
143
|
+
|
|
144
|
+
**Prerequisites:**
|
|
145
|
+
- SSH access to your VPS
|
|
146
|
+
- Root or sudo privileges
|
|
147
|
+
- Domain name (optional but recommended for SSL)
|
|
148
|
+
- Docker Engine 24+ (Coolify installer handles this)
|
|
149
|
+
|
|
150
|
+
**Important Notes:**
|
|
151
|
+
- ⚠️ Docker installed via **snap is NOT supported**
|
|
152
|
+
- ⚠️ Non-LTS Ubuntu versions (e.g., 24.10) require manual installation
|
|
153
|
+
- ⚠️ AlmaLinux requires Docker to be pre-installed
|
|
154
|
+
|
|
155
|
+
### VPS Provider Recommendations
|
|
156
|
+
|
|
157
|
+
**Budget-Friendly:**
|
|
158
|
+
- [Hetzner](https://www.hetzner.com/cloud) - €3.29/mo (4GB RAM) - **Best value**
|
|
159
|
+
- [Vultr](https://www.vultr.com/) - $12/mo (4GB RAM)
|
|
160
|
+
- [DigitalOcean](https://www.digitalocean.com/) - $18/mo (4GB RAM)
|
|
161
|
+
|
|
162
|
+
**Developer-Focused:**
|
|
163
|
+
- [Linode (Akamai)](https://www.linode.com/) - $12/mo (4GB RAM)
|
|
164
|
+
- [Hostinger VPS](https://www.hostinger.com/vps) - Starting at $5.99/mo
|
|
165
|
+
|
|
166
|
+
**Enterprise:**
|
|
167
|
+
- [AWS EC2](https://aws.amazon.com/ec2/)
|
|
168
|
+
- [Google Cloud Compute](https://cloud.google.com/compute)
|
|
169
|
+
- [Azure Virtual Machines](https://azure.microsoft.com/en-us/products/virtual-machines)
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Installation: Setting Up Coolify
|
|
174
|
+
|
|
175
|
+
### Step 1: Prepare Your VPS
|
|
176
|
+
|
|
177
|
+
**1.1. Connect to your VPS via SSH:**
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
ssh root@your-server-ip
|
|
181
|
+
# or
|
|
182
|
+
ssh username@your-server-ip
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**1.2. Update system packages:**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# For Ubuntu/Debian
|
|
189
|
+
sudo apt update && sudo apt upgrade -y
|
|
190
|
+
|
|
191
|
+
# For CentOS/RHEL/AlmaLinux
|
|
192
|
+
sudo yum update -y
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**1.3. Set up firewall (optional but recommended):**
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# UFW (Ubuntu/Debian)
|
|
199
|
+
sudo ufw allow 22/tcp # SSH
|
|
200
|
+
sudo ufw allow 80/tcp # HTTP
|
|
201
|
+
sudo ufw allow 443/tcp # HTTPS
|
|
202
|
+
sudo ufw allow 8000/tcp # Coolify dashboard
|
|
203
|
+
sudo ufw enable
|
|
204
|
+
|
|
205
|
+
# firewalld (CentOS/RHEL)
|
|
206
|
+
sudo firewall-cmd --permanent --add-service=ssh
|
|
207
|
+
sudo firewall-cmd --permanent --add-service=http
|
|
208
|
+
sudo firewall-cmd --permanent --add-service=https
|
|
209
|
+
sudo firewall-cmd --permanent --add-port=8000/tcp
|
|
210
|
+
sudo firewall-cmd --reload
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Step 2: Install Coolify (Automatic)
|
|
214
|
+
|
|
215
|
+
**2.1. Run the official installation script:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The installer will:
|
|
222
|
+
- ✅ Check system requirements
|
|
223
|
+
- ✅ Install Docker Engine 24+
|
|
224
|
+
- ✅ Install Docker Compose
|
|
225
|
+
- ✅ Set up Coolify containers
|
|
226
|
+
- ✅ Configure networking
|
|
227
|
+
|
|
228
|
+
**Installation time: ~2-5 minutes**
|
|
229
|
+
|
|
230
|
+
**2.2. Verify installation:**
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
docker ps
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
You should see Coolify containers running:
|
|
237
|
+
```
|
|
238
|
+
CONTAINER ID IMAGE STATUS
|
|
239
|
+
xxxxx ghcr.io/coollabsio/coolify Up 2 minutes
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Step 3: Access Coolify Dashboard
|
|
243
|
+
|
|
244
|
+
**3.1. Open your browser and navigate to:**
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
http://your-server-ip:8000
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**3.2. Create your admin account:**
|
|
251
|
+
|
|
252
|
+
⚠️ **CRITICAL**: Register immediately! The first person to access the registration page becomes the admin. If someone else accesses it first, they gain full control of your server.
|
|
253
|
+
|
|
254
|
+
Fill in:
|
|
255
|
+
- Email address
|
|
256
|
+
- Password (strong password recommended)
|
|
257
|
+
- Server name (optional)
|
|
258
|
+
|
|
259
|
+
**3.3. (Optional) Set up custom domain:**
|
|
260
|
+
|
|
261
|
+
If you have a domain name (e.g., `coolify.yourdomain.com`):
|
|
262
|
+
|
|
263
|
+
1. Create an A record pointing to your server IP:
|
|
264
|
+
```
|
|
265
|
+
A coolify your-server-ip
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
2. In Coolify dashboard:
|
|
269
|
+
- Go to **Settings** → **Configuration**
|
|
270
|
+
- Set **Instance Domain** to `coolify.yourdomain.com`
|
|
271
|
+
- Enable **Auto-SSL** for automatic Let's Encrypt certificate
|
|
272
|
+
|
|
273
|
+
3. Access Coolify at: `https://coolify.yourdomain.com`
|
|
274
|
+
|
|
275
|
+
### Step 4: Configure Coolify Settings
|
|
276
|
+
|
|
277
|
+
**4.1. Set up email notifications (optional):**
|
|
278
|
+
|
|
279
|
+
Go to **Settings** → **Notifications**:
|
|
280
|
+
- SMTP server for alerts
|
|
281
|
+
- Deployment notifications
|
|
282
|
+
- Error notifications
|
|
283
|
+
|
|
284
|
+
**4.2. Configure backup storage (optional):**
|
|
285
|
+
|
|
286
|
+
Go to **Settings** → **Backups**:
|
|
287
|
+
- S3-compatible storage (AWS S3, MinIO, Backblaze B2)
|
|
288
|
+
- Automated backup schedules
|
|
289
|
+
|
|
290
|
+
**4.3. Add SSH keys (if deploying to multiple servers):**
|
|
291
|
+
|
|
292
|
+
Go to **Settings** → **SSH Keys**:
|
|
293
|
+
- Add private keys for accessing remote servers
|
|
294
|
+
- Enable multi-server deployments
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Deploying Supabase on Coolify
|
|
299
|
+
|
|
300
|
+
### Step 1: Create a New Project
|
|
301
|
+
|
|
302
|
+
**1.1. In Coolify dashboard, click the "Projects" tab**
|
|
303
|
+
|
|
304
|
+
**1.2. Click "+ Add" button**
|
|
305
|
+
|
|
306
|
+
**1.3. Provide project details:**
|
|
307
|
+
- **Project Name**: `supabase` (or your preferred name)
|
|
308
|
+
- **Description**: `Self-hosted Supabase backend`
|
|
309
|
+
|
|
310
|
+
**1.4. Create or select environment:**
|
|
311
|
+
- **Environment Name**: `production` (or `development`, `staging`)
|
|
312
|
+
- Click **Continue**
|
|
313
|
+
|
|
314
|
+
### Step 2: Deploy Supabase Service
|
|
315
|
+
|
|
316
|
+
**2.1. Inside your project, click "+ Add New Resource"**
|
|
317
|
+
|
|
318
|
+
**2.2. Select "Services" → "Supabase"**
|
|
319
|
+
|
|
320
|
+
Coolify provides a pre-configured Supabase template with all required services:
|
|
321
|
+
- 🗄️ **PostgreSQL 15** (supabase-db)
|
|
322
|
+
- ⚡ **Kong API Gateway** (supabase-kong)
|
|
323
|
+
- 🔐 **GoTrue Auth** (supabase-auth)
|
|
324
|
+
- 📡 **Realtime Server** (supabase-realtime)
|
|
325
|
+
- 🔧 **PostgREST API** (supabase-rest)
|
|
326
|
+
- 📦 **Storage Server** (supabase-storage)
|
|
327
|
+
- 🎨 **Supabase Studio** (supabase-studio)
|
|
328
|
+
- 📊 **Meta API** (supabase-meta)
|
|
329
|
+
|
|
330
|
+
**2.3. Configure Supabase settings:**
|
|
331
|
+
|
|
332
|
+
**Required Environment Variables** (Coolify auto-generates most):
|
|
333
|
+
- `POSTGRES_PASSWORD` - Database password (auto-generated)
|
|
334
|
+
- `JWT_SECRET` - JWT signing secret (auto-generated)
|
|
335
|
+
- `ANON_KEY` - Anonymous API key (auto-generated)
|
|
336
|
+
- `SERVICE_ROLE_KEY` - Service role API key (auto-generated)
|
|
337
|
+
- `SITE_URL` - Your app URL (e.g., `https://yourdomain.com`)
|
|
338
|
+
- `DASHBOARD_USERNAME` - Studio login username
|
|
339
|
+
- `DASHBOARD_PASSWORD` - Studio login password
|
|
340
|
+
|
|
341
|
+
**Optional Settings:**
|
|
342
|
+
- Custom domain for Studio
|
|
343
|
+
- SMTP configuration for auth emails
|
|
344
|
+
- Storage bucket settings
|
|
345
|
+
|
|
346
|
+
**2.4. Click "Deploy" (top-right corner)**
|
|
347
|
+
|
|
348
|
+
Deployment process:
|
|
349
|
+
1. ✅ Pulls Docker images (~2-5 minutes)
|
|
350
|
+
2. ✅ Creates Docker network
|
|
351
|
+
3. ✅ Starts all services
|
|
352
|
+
4. ✅ Initializes PostgreSQL database
|
|
353
|
+
5. ✅ Generates API keys and secrets
|
|
354
|
+
|
|
355
|
+
**Total deployment time: ~5-10 minutes**
|
|
356
|
+
|
|
357
|
+
### Step 3: Access Supabase Studio
|
|
358
|
+
|
|
359
|
+
**3.1. Get your Supabase Studio URL:**
|
|
360
|
+
|
|
361
|
+
In Coolify, go to **Resource Details** → **Domains**:
|
|
362
|
+
```
|
|
363
|
+
https://supabase-studio-xxxxx.coolify.app
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Or set up custom domain (recommended):
|
|
367
|
+
```
|
|
368
|
+
https://supabase.yourdomain.com
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
**3.2. Log in to Supabase Studio:**
|
|
372
|
+
|
|
373
|
+
- Username: `DASHBOARD_USERNAME` (set in environment variables)
|
|
374
|
+
- Password: `DASHBOARD_PASSWORD` (set in environment variables)
|
|
375
|
+
|
|
376
|
+
⚠️ **IMPORTANT**: Change default credentials immediately after first login!
|
|
377
|
+
|
|
378
|
+
**3.3. Access your API endpoints:**
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# API URL
|
|
382
|
+
https://api-xxxxx.coolify.app
|
|
383
|
+
|
|
384
|
+
# Anonymous Key (for client-side)
|
|
385
|
+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS...
|
|
386
|
+
|
|
387
|
+
# Service Role Key (for server-side)
|
|
388
|
+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS...
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Find these in **Resource Details** → **Environment Variables**
|
|
392
|
+
|
|
393
|
+
### Step 4: Connect Your Application
|
|
394
|
+
|
|
395
|
+
**4.1. Install Supabase client library:**
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
# JavaScript/TypeScript
|
|
399
|
+
npm install @supabase/supabase-js
|
|
400
|
+
|
|
401
|
+
# Python
|
|
402
|
+
pip install supabase
|
|
403
|
+
|
|
404
|
+
# Dart/Flutter
|
|
405
|
+
flutter pub add supabase_flutter
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**4.2. Initialize Supabase client:**
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
// JavaScript/TypeScript
|
|
412
|
+
import { createClient } from '@supabase/supabase-js'
|
|
413
|
+
|
|
414
|
+
const supabaseUrl = 'https://api-xxxxx.coolify.app'
|
|
415
|
+
const supabaseAnonKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
|
|
416
|
+
|
|
417
|
+
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
```python
|
|
421
|
+
# Python
|
|
422
|
+
from supabase import create_client, Client
|
|
423
|
+
|
|
424
|
+
supabase_url = "https://api-xxxxx.coolify.app"
|
|
425
|
+
supabase_key = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
426
|
+
|
|
427
|
+
supabase: Client = create_client(supabase_url, supabase_key)
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**4.3. Test connection:**
|
|
431
|
+
|
|
432
|
+
```typescript
|
|
433
|
+
// JavaScript/TypeScript
|
|
434
|
+
const { data, error } = await supabase
|
|
435
|
+
.from('test_table')
|
|
436
|
+
.select('*')
|
|
437
|
+
|
|
438
|
+
console.log('Connection successful:', data)
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Step 5: Configure PostgreSQL External Access (Optional)
|
|
442
|
+
|
|
443
|
+
If you need to connect to PostgreSQL directly (e.g., for migrations, pgAdmin):
|
|
444
|
+
|
|
445
|
+
**5.1. Edit Docker Compose file:**
|
|
446
|
+
|
|
447
|
+
In Coolify:
|
|
448
|
+
- Go to **Resource Details** → **Configuration**
|
|
449
|
+
- Click **"Edit Compose File"**
|
|
450
|
+
|
|
451
|
+
**5.2. Locate `supabase-db` service and expose port 5432:**
|
|
452
|
+
|
|
453
|
+
```yaml
|
|
454
|
+
supabase-db:
|
|
455
|
+
image: supabase/postgres:15
|
|
456
|
+
ports:
|
|
457
|
+
- "5432:5432" # Add this line
|
|
458
|
+
environment:
|
|
459
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**5.3. Open firewall port:**
|
|
463
|
+
|
|
464
|
+
```bash
|
|
465
|
+
# UFW (Ubuntu/Debian)
|
|
466
|
+
sudo ufw allow 5432/tcp
|
|
467
|
+
|
|
468
|
+
# firewalld (CentOS/RHEL)
|
|
469
|
+
sudo firewall-cmd --permanent --add-port=5432/tcp
|
|
470
|
+
sudo firewall-cmd --reload
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
**5.4. Connect with connection string:**
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
postgresql://postgres:your-password@your-server-ip:5432/postgres
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
⚠️ **Security Warning**: Only expose PostgreSQL port if absolutely necessary. Use SSH tunneling instead:
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
# SSH tunnel (more secure)
|
|
483
|
+
ssh -L 5432:localhost:5432 username@your-server-ip
|
|
484
|
+
|
|
485
|
+
# Then connect locally
|
|
486
|
+
postgresql://postgres:your-password@localhost:5432/postgres
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Migrating from Hosted Supabase
|
|
492
|
+
|
|
493
|
+
### Prerequisites
|
|
494
|
+
|
|
495
|
+
Before migration:
|
|
496
|
+
- ✅ Self-hosted Supabase deployed on Coolify
|
|
497
|
+
- ✅ Hosted Supabase project accessible
|
|
498
|
+
- ✅ Database backup downloaded
|
|
499
|
+
- ✅ PostgreSQL client installed (pg_restore, psql)
|
|
500
|
+
|
|
501
|
+
### Step 1: Backup Hosted Supabase Database
|
|
502
|
+
|
|
503
|
+
**1.1. In hosted Supabase dashboard:**
|
|
504
|
+
|
|
505
|
+
Go to **Settings** → **Database** → **Backups**
|
|
506
|
+
|
|
507
|
+
**1.2. Download latest backup:**
|
|
508
|
+
|
|
509
|
+
Click **"Download"** next to the most recent backup:
|
|
510
|
+
```
|
|
511
|
+
your-project-backup-20251029.backup
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
This is a PostgreSQL custom format backup file.
|
|
515
|
+
|
|
516
|
+
**1.3. (Alternative) Create manual backup:**
|
|
517
|
+
|
|
518
|
+
If no recent backup exists:
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
# Install PostgreSQL tools
|
|
522
|
+
sudo apt install postgresql-client
|
|
523
|
+
|
|
524
|
+
# Create backup
|
|
525
|
+
pg_dump -h db.xxxxxxxxxxxx.supabase.co \
|
|
526
|
+
-U postgres \
|
|
527
|
+
-d postgres \
|
|
528
|
+
-F c \
|
|
529
|
+
-f supabase-backup-$(date +%Y%m%d).backup
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Enter your database password when prompted.
|
|
533
|
+
|
|
534
|
+
### Step 2: Prepare Self-Hosted Database for Migration
|
|
535
|
+
|
|
536
|
+
**2.1. Temporarily expose PostgreSQL port (if not already):**
|
|
537
|
+
|
|
538
|
+
Follow [Step 5: Configure PostgreSQL External Access](#step-5-configure-postgresql-external-access-optional) above.
|
|
539
|
+
|
|
540
|
+
**2.2. Get connection details from Coolify:**
|
|
541
|
+
|
|
542
|
+
Go to **Resource Details** → **Environment Variables**:
|
|
543
|
+
- `POSTGRES_HOST`: Your server IP
|
|
544
|
+
- `POSTGRES_PORT`: `5432`
|
|
545
|
+
- `POSTGRES_USER`: `postgres`
|
|
546
|
+
- `POSTGRES_PASSWORD`: (copy this)
|
|
547
|
+
- `POSTGRES_DB`: `postgres`
|
|
548
|
+
|
|
549
|
+
### Step 3: Restore Database
|
|
550
|
+
|
|
551
|
+
**3.1. Clean existing database (optional, for fresh start):**
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
# Connect to database
|
|
555
|
+
psql -h your-server-ip -U postgres -d postgres
|
|
556
|
+
|
|
557
|
+
# Drop all tables in public schema
|
|
558
|
+
DROP SCHEMA public CASCADE;
|
|
559
|
+
CREATE SCHEMA public;
|
|
560
|
+
GRANT ALL ON SCHEMA public TO postgres;
|
|
561
|
+
GRANT ALL ON SCHEMA public TO public;
|
|
562
|
+
|
|
563
|
+
# Exit
|
|
564
|
+
\q
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
**3.2. Restore backup:**
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
pg_restore -h your-server-ip \
|
|
571
|
+
-U postgres \
|
|
572
|
+
-d postgres \
|
|
573
|
+
--verbose \
|
|
574
|
+
--no-owner \
|
|
575
|
+
--no-acl \
|
|
576
|
+
your-project-backup-20251029.backup
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
Enter password when prompted.
|
|
580
|
+
|
|
581
|
+
**Restoration time:** Depends on database size (1GB ≈ 5-10 minutes)
|
|
582
|
+
|
|
583
|
+
**3.3. Verify restoration:**
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
# Connect to database
|
|
587
|
+
psql -h your-server-ip -U postgres -d postgres
|
|
588
|
+
|
|
589
|
+
# List tables
|
|
590
|
+
\dt
|
|
591
|
+
|
|
592
|
+
# Count rows in a table (example)
|
|
593
|
+
SELECT COUNT(*) FROM your_table_name;
|
|
594
|
+
|
|
595
|
+
# Exit
|
|
596
|
+
\q
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### Step 4: Migrate Storage Files
|
|
600
|
+
|
|
601
|
+
**4.1. Download storage files from hosted Supabase:**
|
|
602
|
+
|
|
603
|
+
There's no official bulk export, so you'll need to:
|
|
604
|
+
|
|
605
|
+
**Option A: Use Supabase CLI:**
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
# Install Supabase CLI
|
|
609
|
+
npm install -g supabase
|
|
610
|
+
|
|
611
|
+
# Login to hosted Supabase
|
|
612
|
+
supabase login
|
|
613
|
+
|
|
614
|
+
# Link to your project
|
|
615
|
+
supabase link --project-ref your-project-ref
|
|
616
|
+
|
|
617
|
+
# Download storage files (requires custom script)
|
|
618
|
+
# Note: This is a conceptual example
|
|
619
|
+
supabase storage download --bucket my-bucket --output ./storage-backup
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**Option B: Write custom script:**
|
|
623
|
+
|
|
624
|
+
```typescript
|
|
625
|
+
// download-storage.ts
|
|
626
|
+
import { createClient } from '@supabase/supabase-js'
|
|
627
|
+
import fs from 'fs'
|
|
628
|
+
import path from 'path'
|
|
629
|
+
|
|
630
|
+
const hostedSupabase = createClient(
|
|
631
|
+
'https://xxxxxxxxxxxx.supabase.co',
|
|
632
|
+
'your-service-role-key'
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
async function downloadBucket(bucketName: string) {
|
|
636
|
+
const { data: files, error } = await hostedSupabase
|
|
637
|
+
.storage
|
|
638
|
+
.from(bucketName)
|
|
639
|
+
.list()
|
|
640
|
+
|
|
641
|
+
for (const file of files || []) {
|
|
642
|
+
const { data, error } = await hostedSupabase
|
|
643
|
+
.storage
|
|
644
|
+
.from(bucketName)
|
|
645
|
+
.download(file.name)
|
|
646
|
+
|
|
647
|
+
if (data) {
|
|
648
|
+
fs.writeFileSync(
|
|
649
|
+
path.join('./storage-backup', bucketName, file.name),
|
|
650
|
+
Buffer.from(await data.arrayBuffer())
|
|
651
|
+
)
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// Run for each bucket
|
|
657
|
+
downloadBucket('avatars')
|
|
658
|
+
downloadBucket('documents')
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
**4.2. Upload files to self-hosted Supabase:**
|
|
662
|
+
|
|
663
|
+
```typescript
|
|
664
|
+
// upload-storage.ts
|
|
665
|
+
import { createClient } from '@supabase/supabase-js'
|
|
666
|
+
import fs from 'fs'
|
|
667
|
+
import path from 'path'
|
|
668
|
+
|
|
669
|
+
const selfHostedSupabase = createClient(
|
|
670
|
+
'https://api-xxxxx.coolify.app',
|
|
671
|
+
'your-service-role-key'
|
|
672
|
+
)
|
|
673
|
+
|
|
674
|
+
async function uploadBucket(bucketName: string, localPath: string) {
|
|
675
|
+
const files = fs.readdirSync(localPath)
|
|
676
|
+
|
|
677
|
+
for (const file of files) {
|
|
678
|
+
const fileBuffer = fs.readFileSync(path.join(localPath, file))
|
|
679
|
+
|
|
680
|
+
const { data, error } = await selfHostedSupabase
|
|
681
|
+
.storage
|
|
682
|
+
.from(bucketName)
|
|
683
|
+
.upload(file, fileBuffer, {
|
|
684
|
+
cacheControl: '3600',
|
|
685
|
+
upsert: true
|
|
686
|
+
})
|
|
687
|
+
|
|
688
|
+
console.log(`Uploaded: ${file}`)
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// Run for each bucket
|
|
693
|
+
uploadBucket('avatars', './storage-backup/avatars')
|
|
694
|
+
uploadBucket('documents', './storage-backup/documents')
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
### Step 5: Update Application Configuration
|
|
698
|
+
|
|
699
|
+
**5.1. Update environment variables in your app:**
|
|
700
|
+
|
|
701
|
+
```bash
|
|
702
|
+
# .env or .env.local
|
|
703
|
+
|
|
704
|
+
# OLD (Hosted Supabase)
|
|
705
|
+
# NEXT_PUBLIC_SUPABASE_URL=https://xxxxxxxxxxxx.supabase.co
|
|
706
|
+
# NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
707
|
+
|
|
708
|
+
# NEW (Self-hosted on Coolify)
|
|
709
|
+
NEXT_PUBLIC_SUPABASE_URL=https://api-xxxxx.coolify.app
|
|
710
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
711
|
+
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
**5.2. Redeploy your application:**
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
npm run build
|
|
718
|
+
npm run start
|
|
719
|
+
# or
|
|
720
|
+
vercel --prod
|
|
721
|
+
# or
|
|
722
|
+
git push (if using CI/CD)
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
**5.3. Test all functionality:**
|
|
726
|
+
|
|
727
|
+
- ✅ User authentication (login, signup, logout)
|
|
728
|
+
- ✅ Database queries (read, write, update, delete)
|
|
729
|
+
- ✅ Real-time subscriptions
|
|
730
|
+
- ✅ File uploads and downloads
|
|
731
|
+
- ✅ Edge Functions (if using)
|
|
732
|
+
|
|
733
|
+
### Step 6: Update DNS (If Using Custom Domains)
|
|
734
|
+
|
|
735
|
+
**6.1. For API domain:**
|
|
736
|
+
|
|
737
|
+
Update your DNS A record:
|
|
738
|
+
```
|
|
739
|
+
A api your-server-ip
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
**6.2. For Supabase Studio domain:**
|
|
743
|
+
|
|
744
|
+
```
|
|
745
|
+
A supabase your-server-ip
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
**6.3. Wait for DNS propagation (5-60 minutes)**
|
|
749
|
+
|
|
750
|
+
**6.4. Verify with:**
|
|
751
|
+
|
|
752
|
+
```bash
|
|
753
|
+
nslookup api.yourdomain.com
|
|
754
|
+
nslookup supabase.yourdomain.com
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
### Step 7: Clean Up Hosted Supabase (Optional)
|
|
758
|
+
|
|
759
|
+
⚠️ **Only after verifying everything works on self-hosted!**
|
|
760
|
+
|
|
761
|
+
**7.1. In hosted Supabase dashboard:**
|
|
762
|
+
|
|
763
|
+
Go to **Settings** → **General** → **Pause Project**
|
|
764
|
+
|
|
765
|
+
**7.2. After 30 days of verification:**
|
|
766
|
+
|
|
767
|
+
Go to **Settings** → **General** → **Delete Project**
|
|
768
|
+
|
|
769
|
+
This will:
|
|
770
|
+
- Stop all billing
|
|
771
|
+
- Delete all data permanently
|
|
772
|
+
- Free up your project slot
|
|
773
|
+
|
|
774
|
+
---
|
|
775
|
+
|
|
776
|
+
## Cost Comparison
|
|
777
|
+
|
|
778
|
+
### Real-World Cost Analysis
|
|
779
|
+
|
|
780
|
+
Let's compare costs for a typical production application:
|
|
781
|
+
|
|
782
|
+
**Application Profile:**
|
|
783
|
+
- Database: 25 GB
|
|
784
|
+
- Monthly active users: 5,000
|
|
785
|
+
- API requests: 10 million/month
|
|
786
|
+
- Storage: 50 GB files
|
|
787
|
+
- Bandwidth: 500 GB/month
|
|
788
|
+
|
|
789
|
+
### Supabase Cloud Costs
|
|
790
|
+
|
|
791
|
+
**Pro Plan ($25/month base) + Overages:**
|
|
792
|
+
|
|
793
|
+
| Resource | Included | Used | Overage Cost | Total |
|
|
794
|
+
|----------|----------|------|--------------|-------|
|
|
795
|
+
| Base price | - | - | - | $25 |
|
|
796
|
+
| Database | 8 GB | 25 GB | $0.125/GB × 17 GB | $2.13 |
|
|
797
|
+
| Bandwidth | 250 GB | 500 GB | $0.09/GB × 250 GB | $22.50 |
|
|
798
|
+
| Storage | 100 GB | 50 GB | Included | $0 |
|
|
799
|
+
| API requests | Unlimited | 10M | Included | $0 |
|
|
800
|
+
|
|
801
|
+
**Total: ~$50/month** (for this moderate usage)
|
|
802
|
+
|
|
803
|
+
For larger applications (100GB database, 2TB bandwidth): **$200-400/month**
|
|
804
|
+
|
|
805
|
+
### Self-Hosted Costs
|
|
806
|
+
|
|
807
|
+
**VPS Cost (Hetzner CPX31):**
|
|
808
|
+
|
|
809
|
+
| Specs | Monthly Cost |
|
|
810
|
+
|-------|-------------|
|
|
811
|
+
| 4 vCPU | |
|
|
812
|
+
| 8 GB RAM | |
|
|
813
|
+
| 160 GB SSD | |
|
|
814
|
+
| 20 TB bandwidth | **€15.90 (~$17.50)** |
|
|
815
|
+
|
|
816
|
+
**Additional Costs:**
|
|
817
|
+
- Domain name: $12/year = $1/month
|
|
818
|
+
- Backups (optional): $5/month (Backblaze B2)
|
|
819
|
+
- **Total: ~$24/month**
|
|
820
|
+
|
|
821
|
+
### Savings Summary
|
|
822
|
+
|
|
823
|
+
| Scenario | Supabase Cloud | Self-Hosted | Savings/Year |
|
|
824
|
+
|----------|---------------|-------------|--------------|
|
|
825
|
+
| Small app (5GB DB) | $25/mo | $12/mo | **$156** |
|
|
826
|
+
| Medium app (25GB DB) | $50/mo | $24/mo | **$312** |
|
|
827
|
+
| Large app (100GB DB) | $200/mo | $50/mo | **$1,800** |
|
|
828
|
+
| Enterprise (500GB DB) | $600+/mo | $100/mo | **$6,000+** |
|
|
829
|
+
|
|
830
|
+
**ROI Calculation:**
|
|
831
|
+
|
|
832
|
+
Even accounting for ~5 hours/month of DevOps maintenance:
|
|
833
|
+
- Cost savings: $26/month
|
|
834
|
+
- Time invested: 5 hours × $50/hr = $250 setup + $20/mo maintenance
|
|
835
|
+
- Break-even: Month 10
|
|
836
|
+
- **Year 1 net savings: ~$62**
|
|
837
|
+
- **Year 2+ net savings: ~$312/year** (no setup cost)
|
|
838
|
+
|
|
839
|
+
For larger applications, savings are even more dramatic.
|
|
840
|
+
|
|
841
|
+
---
|
|
842
|
+
|
|
843
|
+
## Alternative Self-Hosting Solutions
|
|
844
|
+
|
|
845
|
+
### Comparison Table
|
|
846
|
+
|
|
847
|
+
| Platform | Best For | Pros | Cons | Cost |
|
|
848
|
+
|----------|----------|------|------|------|
|
|
849
|
+
| **Coolify** | Modern UI, ease of use | Beautiful dashboard, active development, Docker Compose support | Younger project (less mature) | Free (open-source) |
|
|
850
|
+
| **CapRover** | Stability, multi-server | Mature (100M+ downloads), extensive app library, auto-scaling | Basic UI, limited features vs Coolify | Free (open-source) |
|
|
851
|
+
| **Dokploy** | Lightweight, Git-based | Simple, good Docker integration, lightweight | Smaller community | Free (open-source) |
|
|
852
|
+
| **Dokku** | Minimalism | Smallest footprint, Heroku-like | Command-line only, less features | Free (open-source) |
|
|
853
|
+
| **Portainer** | Docker management | Excellent container management, visual interface | Not a full PaaS | Free + Paid tiers |
|
|
854
|
+
|
|
855
|
+
### Detailed Alternatives
|
|
856
|
+
|
|
857
|
+
#### 1. CapRover
|
|
858
|
+
|
|
859
|
+
**What it is:** A mature, stable PaaS with 100M+ Docker Hub downloads.
|
|
860
|
+
|
|
861
|
+
**Strengths:**
|
|
862
|
+
- ✅ Battle-tested stability
|
|
863
|
+
- ✅ One-click app deployments (100+ apps)
|
|
864
|
+
- ✅ Multi-server clustering with Docker Swarm
|
|
865
|
+
- ✅ Built-in load balancer
|
|
866
|
+
- ✅ Excellent for production
|
|
867
|
+
|
|
868
|
+
**Weaknesses:**
|
|
869
|
+
- ❌ Basic UI (functional but dated)
|
|
870
|
+
- ❌ Limited documentation
|
|
871
|
+
- ❌ Less active development than Coolify
|
|
872
|
+
- ❌ Custom deployment format (captain files)
|
|
873
|
+
|
|
874
|
+
**Installation:**
|
|
875
|
+
|
|
876
|
+
```bash
|
|
877
|
+
docker run -p 80:80 -p 443:443 -p 3000:3000 \
|
|
878
|
+
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
879
|
+
-v /captain:/captain \
|
|
880
|
+
caprover/caprover
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
Access at: `http://your-server-ip:3000`
|
|
884
|
+
|
|
885
|
+
**Best for:** Teams prioritizing stability over modern UI.
|
|
886
|
+
|
|
887
|
+
#### 2. Dokploy
|
|
888
|
+
|
|
889
|
+
**What it is:** A lightweight, Git-focused deployment platform.
|
|
890
|
+
|
|
891
|
+
**Strengths:**
|
|
892
|
+
- ✅ Excellent Docker Compose support
|
|
893
|
+
- ✅ Simple, clean interface
|
|
894
|
+
- ✅ Good Git integration
|
|
895
|
+
- ✅ Lightweight resource usage
|
|
896
|
+
- ✅ Native multi-server support
|
|
897
|
+
|
|
898
|
+
**Weaknesses:**
|
|
899
|
+
- ❌ Smaller community
|
|
900
|
+
- ❌ Fewer built-in services
|
|
901
|
+
- ❌ Limited monitoring compared to Coolify
|
|
902
|
+
|
|
903
|
+
**Installation:**
|
|
904
|
+
|
|
905
|
+
```bash
|
|
906
|
+
curl -sSL https://dokploy.com/install.sh | sh
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
Access at: `http://your-server-ip:3000`
|
|
910
|
+
|
|
911
|
+
**Best for:** Developers who prioritize simplicity and Git workflows.
|
|
912
|
+
|
|
913
|
+
#### 3. Dokku
|
|
914
|
+
|
|
915
|
+
**What it is:** The smallest PaaS you've ever seen (Heroku-inspired).
|
|
916
|
+
|
|
917
|
+
**Strengths:**
|
|
918
|
+
- ✅ Minimal resource footprint
|
|
919
|
+
- ✅ Heroku-like buildpack support
|
|
920
|
+
- ✅ Simple git push deployments
|
|
921
|
+
- ✅ Mature and stable
|
|
922
|
+
|
|
923
|
+
**Weaknesses:**
|
|
924
|
+
- ❌ Command-line only (no web UI)
|
|
925
|
+
- ❌ Manual configuration
|
|
926
|
+
- ❌ Steeper learning curve
|
|
927
|
+
- ❌ No visual monitoring
|
|
928
|
+
|
|
929
|
+
**Installation:**
|
|
930
|
+
|
|
931
|
+
```bash
|
|
932
|
+
wget -NP . https://dokku.com/install/v0.32.3/bootstrap.sh
|
|
933
|
+
sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**Best for:** Terminal enthusiasts and minimalists.
|
|
937
|
+
|
|
938
|
+
#### 4. Direct Docker Compose
|
|
939
|
+
|
|
940
|
+
**What it is:** Managing Supabase directly with Docker Compose (no PaaS layer).
|
|
941
|
+
|
|
942
|
+
**Strengths:**
|
|
943
|
+
- ✅ Full control over every configuration
|
|
944
|
+
- ✅ No abstraction layer
|
|
945
|
+
- ✅ Lightest resource usage
|
|
946
|
+
- ✅ Official Supabase method
|
|
947
|
+
|
|
948
|
+
**Weaknesses:**
|
|
949
|
+
- ❌ No web UI
|
|
950
|
+
- ❌ Manual SSL certificate setup
|
|
951
|
+
- ❌ Requires Docker/DevOps knowledge
|
|
952
|
+
- ❌ Manual updates and monitoring
|
|
953
|
+
|
|
954
|
+
**Installation:**
|
|
955
|
+
|
|
956
|
+
```bash
|
|
957
|
+
# Clone Supabase repository
|
|
958
|
+
git clone --depth 1 https://github.com/supabase/supabase
|
|
959
|
+
cd supabase/docker
|
|
960
|
+
|
|
961
|
+
# Copy example env
|
|
962
|
+
cp .env.example .env
|
|
963
|
+
|
|
964
|
+
# Edit environment variables
|
|
965
|
+
nano .env
|
|
966
|
+
|
|
967
|
+
# Start services
|
|
968
|
+
docker compose up -d
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
Access Studio at: `http://localhost:3000`
|
|
972
|
+
|
|
973
|
+
**Best for:** DevOps engineers who want direct control.
|
|
974
|
+
|
|
975
|
+
### Recommendation Matrix
|
|
976
|
+
|
|
977
|
+
| Your Priority | Recommended Platform |
|
|
978
|
+
|--------------|---------------------|
|
|
979
|
+
| 🎨 **Modern UI & ease of use** | **Coolify** |
|
|
980
|
+
| 🛡️ **Stability & maturity** | CapRover |
|
|
981
|
+
| 🪶 **Lightweight & simple** | Dokploy |
|
|
982
|
+
| 💻 **Terminal-only, minimal** | Dokku |
|
|
983
|
+
| 🔧 **Full control, no PaaS** | Direct Docker Compose |
|
|
984
|
+
|
|
985
|
+
**Our Recommendation:** **Coolify** strikes the best balance for most teams:
|
|
986
|
+
- Modern, intuitive interface
|
|
987
|
+
- Active development and community
|
|
988
|
+
- Docker Compose support
|
|
989
|
+
- Suitable for production
|
|
990
|
+
|
|
991
|
+
---
|
|
992
|
+
|
|
993
|
+
## Best Practices
|
|
994
|
+
|
|
995
|
+
### 1. Security Hardening
|
|
996
|
+
|
|
997
|
+
**Change default credentials immediately:**
|
|
998
|
+
|
|
999
|
+
```bash
|
|
1000
|
+
# In Coolify, update Supabase environment variables:
|
|
1001
|
+
DASHBOARD_USERNAME=your-secure-username
|
|
1002
|
+
DASHBOARD_PASSWORD=your-strong-password-here
|
|
1003
|
+
|
|
1004
|
+
# Regenerate API keys (after initial setup)
|
|
1005
|
+
JWT_SECRET=<new-random-64-char-string>
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
**Enable firewall:**
|
|
1009
|
+
|
|
1010
|
+
```bash
|
|
1011
|
+
# Allow only necessary ports
|
|
1012
|
+
sudo ufw default deny incoming
|
|
1013
|
+
sudo ufw default allow outgoing
|
|
1014
|
+
sudo ufw allow 22/tcp # SSH
|
|
1015
|
+
sudo ufw allow 80/tcp # HTTP
|
|
1016
|
+
sudo ufw allow 443/tcp # HTTPS
|
|
1017
|
+
sudo ufw enable
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
**Restrict PostgreSQL access:**
|
|
1021
|
+
|
|
1022
|
+
```yaml
|
|
1023
|
+
# In docker-compose.yml, do NOT expose port 5432 publicly
|
|
1024
|
+
# Use SSH tunnel instead:
|
|
1025
|
+
ssh -L 5432:localhost:5432 username@your-server-ip
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
**Use strong passwords:**
|
|
1029
|
+
|
|
1030
|
+
```bash
|
|
1031
|
+
# Generate secure passwords
|
|
1032
|
+
openssl rand -base64 32
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
### 2. Backup Strategy
|
|
1036
|
+
|
|
1037
|
+
**Automated PostgreSQL backups:**
|
|
1038
|
+
|
|
1039
|
+
```bash
|
|
1040
|
+
# Create backup script
|
|
1041
|
+
cat > /root/backup-supabase.sh << 'EOF'
|
|
1042
|
+
#!/bin/bash
|
|
1043
|
+
BACKUP_DIR="/backups/supabase"
|
|
1044
|
+
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
|
1045
|
+
mkdir -p $BACKUP_DIR
|
|
1046
|
+
|
|
1047
|
+
# Backup database
|
|
1048
|
+
docker exec supabase-db pg_dump -U postgres postgres > \
|
|
1049
|
+
$BACKUP_DIR/postgres-$TIMESTAMP.sql
|
|
1050
|
+
|
|
1051
|
+
# Compress backup
|
|
1052
|
+
gzip $BACKUP_DIR/postgres-$TIMESTAMP.sql
|
|
1053
|
+
|
|
1054
|
+
# Delete backups older than 30 days
|
|
1055
|
+
find $BACKUP_DIR -name "*.sql.gz" -mtime +30 -delete
|
|
1056
|
+
EOF
|
|
1057
|
+
|
|
1058
|
+
chmod +x /root/backup-supabase.sh
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
**Schedule with cron:**
|
|
1062
|
+
|
|
1063
|
+
```bash
|
|
1064
|
+
# Edit crontab
|
|
1065
|
+
crontab -e
|
|
1066
|
+
|
|
1067
|
+
# Add daily backup at 2 AM
|
|
1068
|
+
0 2 * * * /root/backup-supabase.sh
|
|
1069
|
+
```
|
|
1070
|
+
|
|
1071
|
+
**Offsite backup (S3):**
|
|
1072
|
+
|
|
1073
|
+
```bash
|
|
1074
|
+
# Install AWS CLI
|
|
1075
|
+
sudo apt install awscli
|
|
1076
|
+
|
|
1077
|
+
# Configure AWS credentials
|
|
1078
|
+
aws configure
|
|
1079
|
+
|
|
1080
|
+
# Upload to S3 (add to backup script)
|
|
1081
|
+
aws s3 cp $BACKUP_DIR/postgres-$TIMESTAMP.sql.gz \
|
|
1082
|
+
s3://your-bucket/supabase-backups/
|
|
1083
|
+
```
|
|
1084
|
+
|
|
1085
|
+
### 3. Monitoring & Alerts
|
|
1086
|
+
|
|
1087
|
+
**Set up health checks in Coolify:**
|
|
1088
|
+
|
|
1089
|
+
Go to **Resource Details** → **Health Checks**:
|
|
1090
|
+
- HTTP endpoint: `https://api-xxxxx.coolify.app/health`
|
|
1091
|
+
- Check interval: 60 seconds
|
|
1092
|
+
- Failure threshold: 3 consecutive failures
|
|
1093
|
+
|
|
1094
|
+
**Monitor disk usage:**
|
|
1095
|
+
|
|
1096
|
+
```bash
|
|
1097
|
+
# Check disk space
|
|
1098
|
+
df -h
|
|
1099
|
+
|
|
1100
|
+
# Set up alert (example with simple script)
|
|
1101
|
+
cat > /root/check-disk.sh << 'EOF'
|
|
1102
|
+
#!/bin/bash
|
|
1103
|
+
THRESHOLD=80
|
|
1104
|
+
USAGE=$(df / | tail -1 | awk '{print $5}' | sed 's/%//')
|
|
1105
|
+
|
|
1106
|
+
if [ $USAGE -gt $THRESHOLD ]; then
|
|
1107
|
+
echo "Disk usage is $USAGE% (threshold: $THRESHOLD%)" | \
|
|
1108
|
+
mail -s "Disk Space Alert" your-email@example.com
|
|
1109
|
+
fi
|
|
1110
|
+
EOF
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
**Docker container monitoring:**
|
|
1114
|
+
|
|
1115
|
+
```bash
|
|
1116
|
+
# Check container health
|
|
1117
|
+
docker ps --filter "name=supabase"
|
|
1118
|
+
|
|
1119
|
+
# View logs
|
|
1120
|
+
docker logs supabase-db --tail 100 -f
|
|
1121
|
+
docker logs supabase-kong --tail 100 -f
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
### 4. Performance Optimization
|
|
1125
|
+
|
|
1126
|
+
**Increase PostgreSQL shared_buffers:**
|
|
1127
|
+
|
|
1128
|
+
In Coolify, edit Docker Compose → `supabase-db` service:
|
|
1129
|
+
|
|
1130
|
+
```yaml
|
|
1131
|
+
supabase-db:
|
|
1132
|
+
image: supabase/postgres:15
|
|
1133
|
+
command: >
|
|
1134
|
+
postgres
|
|
1135
|
+
-c shared_buffers=512MB
|
|
1136
|
+
-c effective_cache_size=2GB
|
|
1137
|
+
-c maintenance_work_mem=128MB
|
|
1138
|
+
-c max_connections=200
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
**Enable Redis caching (optional):**
|
|
1142
|
+
|
|
1143
|
+
Add Redis to your Coolify project:
|
|
1144
|
+
- Go to **Resource** → **Add Database** → **Redis**
|
|
1145
|
+
- Update Supabase environment variables to use Redis
|
|
1146
|
+
|
|
1147
|
+
**Use CDN for storage:**
|
|
1148
|
+
|
|
1149
|
+
```typescript
|
|
1150
|
+
// Configure Supabase storage with CDN
|
|
1151
|
+
const { data, error } = await supabase
|
|
1152
|
+
.storage
|
|
1153
|
+
.from('avatars')
|
|
1154
|
+
.getPublicUrl('avatar.png', {
|
|
1155
|
+
transform: {
|
|
1156
|
+
width: 200,
|
|
1157
|
+
height: 200
|
|
1158
|
+
}
|
|
1159
|
+
})
|
|
1160
|
+
```
|
|
1161
|
+
|
|
1162
|
+
### 5. Update Management
|
|
1163
|
+
|
|
1164
|
+
**Update Coolify:**
|
|
1165
|
+
|
|
1166
|
+
```bash
|
|
1167
|
+
# Coolify auto-updates by default
|
|
1168
|
+
# To manually trigger update:
|
|
1169
|
+
docker exec coolify php artisan coolify:update
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
**Update Supabase:**
|
|
1173
|
+
|
|
1174
|
+
In Coolify:
|
|
1175
|
+
1. Go to **Resource Details**
|
|
1176
|
+
2. Edit **Docker Compose file**
|
|
1177
|
+
3. Update image tags to latest versions:
|
|
1178
|
+
```yaml
|
|
1179
|
+
supabase-db:
|
|
1180
|
+
image: supabase/postgres:15.1.0.147 # Update version
|
|
1181
|
+
```
|
|
1182
|
+
4. Click **"Redeploy"**
|
|
1183
|
+
|
|
1184
|
+
**Test updates in staging first:**
|
|
1185
|
+
|
|
1186
|
+
Create a separate Coolify project:
|
|
1187
|
+
- Name: `supabase-staging`
|
|
1188
|
+
- Environment: `staging`
|
|
1189
|
+
- Restore database backup
|
|
1190
|
+
- Test thoroughly before updating production
|
|
1191
|
+
|
|
1192
|
+
### 6. Scaling Strategies
|
|
1193
|
+
|
|
1194
|
+
**Vertical Scaling (increase resources):**
|
|
1195
|
+
|
|
1196
|
+
Upgrade your VPS:
|
|
1197
|
+
- Hetzner: Can resize without data loss
|
|
1198
|
+
- DigitalOcean: Resize droplet
|
|
1199
|
+
- AWS: Change EC2 instance type
|
|
1200
|
+
|
|
1201
|
+
**Horizontal Scaling (multiple servers):**
|
|
1202
|
+
|
|
1203
|
+
Use Coolify's multi-server support:
|
|
1204
|
+
1. Add additional servers in **Settings** → **Servers**
|
|
1205
|
+
2. Deploy read replicas for PostgreSQL
|
|
1206
|
+
3. Use load balancer (Kong is included in Supabase)
|
|
1207
|
+
|
|
1208
|
+
**Database Connection Pooling:**
|
|
1209
|
+
|
|
1210
|
+
Supabase includes PgBouncer for connection pooling:
|
|
1211
|
+
```
|
|
1212
|
+
# Connection string for pooled connections
|
|
1213
|
+
postgresql://postgres:password@your-server:6543/postgres
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1216
|
+
---
|
|
1217
|
+
|
|
1218
|
+
## Security Considerations
|
|
1219
|
+
|
|
1220
|
+
### 1. Network Security
|
|
1221
|
+
|
|
1222
|
+
**Use SSL/TLS everywhere:**
|
|
1223
|
+
|
|
1224
|
+
In Coolify:
|
|
1225
|
+
- Enable **Auto-SSL** for all domains
|
|
1226
|
+
- Force HTTPS redirects
|
|
1227
|
+
- Use Let's Encrypt certificates (auto-renewed)
|
|
1228
|
+
|
|
1229
|
+
**Implement IP whitelisting (optional):**
|
|
1230
|
+
|
|
1231
|
+
```bash
|
|
1232
|
+
# UFW example - allow only specific IPs to access PostgreSQL
|
|
1233
|
+
sudo ufw deny 5432/tcp
|
|
1234
|
+
sudo ufw allow from 203.0.113.100 to any port 5432
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1237
|
+
**Use SSH keys instead of passwords:**
|
|
1238
|
+
|
|
1239
|
+
```bash
|
|
1240
|
+
# Disable password authentication
|
|
1241
|
+
sudo nano /etc/ssh/sshd_config
|
|
1242
|
+
|
|
1243
|
+
# Set:
|
|
1244
|
+
PasswordAuthentication no
|
|
1245
|
+
PubkeyAuthentication yes
|
|
1246
|
+
|
|
1247
|
+
# Restart SSH
|
|
1248
|
+
sudo systemctl restart sshd
|
|
1249
|
+
```
|
|
1250
|
+
|
|
1251
|
+
### 2. Database Security
|
|
1252
|
+
|
|
1253
|
+
**Enable Row Level Security (RLS):**
|
|
1254
|
+
|
|
1255
|
+
```sql
|
|
1256
|
+
-- Enable RLS on all tables
|
|
1257
|
+
ALTER TABLE users ENABLE ROW LEVEL SECURITY;
|
|
1258
|
+
|
|
1259
|
+
-- Create policy
|
|
1260
|
+
CREATE POLICY "Users can only see their own data"
|
|
1261
|
+
ON users
|
|
1262
|
+
FOR SELECT
|
|
1263
|
+
USING (auth.uid() = id);
|
|
1264
|
+
```
|
|
1265
|
+
|
|
1266
|
+
**Use service role key only on server-side:**
|
|
1267
|
+
|
|
1268
|
+
```typescript
|
|
1269
|
+
// ❌ NEVER expose service role key in client-side code
|
|
1270
|
+
const supabase = createClient(url, serviceRoleKey) // DANGEROUS!
|
|
1271
|
+
|
|
1272
|
+
// ✅ Use anonymous key on client-side
|
|
1273
|
+
const supabase = createClient(url, anonKey) // SAFE
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
**Encrypt sensitive data:**
|
|
1277
|
+
|
|
1278
|
+
```sql
|
|
1279
|
+
-- Use pgcrypto extension
|
|
1280
|
+
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|
1281
|
+
|
|
1282
|
+
-- Encrypt column
|
|
1283
|
+
UPDATE users
|
|
1284
|
+
SET ssn = pgp_sym_encrypt(ssn, 'encryption-key');
|
|
1285
|
+
|
|
1286
|
+
-- Decrypt when querying
|
|
1287
|
+
SELECT pgp_sym_decrypt(ssn::bytea, 'encryption-key')
|
|
1288
|
+
FROM users;
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
### 3. Authentication Security
|
|
1292
|
+
|
|
1293
|
+
**Configure JWT expiration:**
|
|
1294
|
+
|
|
1295
|
+
In Coolify environment variables:
|
|
1296
|
+
|
|
1297
|
+
```bash
|
|
1298
|
+
JWT_EXP=3600 # 1 hour (default)
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
**Enable MFA (Multi-Factor Authentication):**
|
|
1302
|
+
|
|
1303
|
+
```typescript
|
|
1304
|
+
// Enable MFA for a user
|
|
1305
|
+
const { data, error } = await supabase.auth.mfa.enroll({
|
|
1306
|
+
factorType: 'totp',
|
|
1307
|
+
friendlyName: 'My Phone'
|
|
1308
|
+
})
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
**Configure password requirements:**
|
|
1312
|
+
|
|
1313
|
+
In Supabase Studio:
|
|
1314
|
+
- Go to **Authentication** → **Settings**
|
|
1315
|
+
- Set minimum password length
|
|
1316
|
+
- Require special characters
|
|
1317
|
+
|
|
1318
|
+
### 4. API Security
|
|
1319
|
+
|
|
1320
|
+
**Rate limiting (Kong includes this):**
|
|
1321
|
+
|
|
1322
|
+
```yaml
|
|
1323
|
+
# In Coolify, edit Kong configuration
|
|
1324
|
+
_format_version: "2.1"
|
|
1325
|
+
services:
|
|
1326
|
+
- name: supabase-rest
|
|
1327
|
+
plugins:
|
|
1328
|
+
- name: rate-limiting
|
|
1329
|
+
config:
|
|
1330
|
+
minute: 100
|
|
1331
|
+
hour: 1000
|
|
1332
|
+
```
|
|
1333
|
+
|
|
1334
|
+
**CORS configuration:**
|
|
1335
|
+
|
|
1336
|
+
```bash
|
|
1337
|
+
# In Coolify environment variables
|
|
1338
|
+
ADDITIONAL_REDIRECT_URLS=https://yourdomain.com,https://app.yourdomain.com
|
|
1339
|
+
```
|
|
1340
|
+
|
|
1341
|
+
**API key rotation:**
|
|
1342
|
+
|
|
1343
|
+
```bash
|
|
1344
|
+
# Periodically regenerate JWT_SECRET
|
|
1345
|
+
# Then update all client applications
|
|
1346
|
+
JWT_SECRET=<new-64-char-secret>
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
### 5. Compliance & Data Privacy
|
|
1350
|
+
|
|
1351
|
+
**GDPR Compliance:**
|
|
1352
|
+
|
|
1353
|
+
```typescript
|
|
1354
|
+
// Implement data export
|
|
1355
|
+
const { data, error } = await supabase
|
|
1356
|
+
.from('users')
|
|
1357
|
+
.select('*')
|
|
1358
|
+
.eq('id', userId)
|
|
1359
|
+
|
|
1360
|
+
// Implement right to deletion
|
|
1361
|
+
const { error } = await supabase
|
|
1362
|
+
.from('users')
|
|
1363
|
+
.delete()
|
|
1364
|
+
.eq('id', userId)
|
|
1365
|
+
```
|
|
1366
|
+
|
|
1367
|
+
**Audit logging:**
|
|
1368
|
+
|
|
1369
|
+
```sql
|
|
1370
|
+
-- Create audit log table
|
|
1371
|
+
CREATE TABLE audit_logs (
|
|
1372
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
1373
|
+
user_id UUID REFERENCES auth.users(id),
|
|
1374
|
+
action TEXT,
|
|
1375
|
+
table_name TEXT,
|
|
1376
|
+
record_id UUID,
|
|
1377
|
+
timestamp TIMESTAMPTZ DEFAULT NOW()
|
|
1378
|
+
);
|
|
1379
|
+
|
|
1380
|
+
-- Create trigger function
|
|
1381
|
+
CREATE OR REPLACE FUNCTION log_audit()
|
|
1382
|
+
RETURNS TRIGGER AS $$
|
|
1383
|
+
BEGIN
|
|
1384
|
+
INSERT INTO audit_logs (user_id, action, table_name, record_id)
|
|
1385
|
+
VALUES (auth.uid(), TG_OP, TG_TABLE_NAME, NEW.id);
|
|
1386
|
+
RETURN NEW;
|
|
1387
|
+
END;
|
|
1388
|
+
$$ LANGUAGE plpgsql;
|
|
1389
|
+
|
|
1390
|
+
-- Attach to tables
|
|
1391
|
+
CREATE TRIGGER users_audit
|
|
1392
|
+
AFTER INSERT OR UPDATE OR DELETE ON users
|
|
1393
|
+
FOR EACH ROW EXECUTE FUNCTION log_audit();
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
---
|
|
1397
|
+
|
|
1398
|
+
## Troubleshooting
|
|
1399
|
+
|
|
1400
|
+
### Common Issues & Solutions
|
|
1401
|
+
|
|
1402
|
+
#### 1. Coolify Installation Fails
|
|
1403
|
+
|
|
1404
|
+
**Error:** `Docker installation failed`
|
|
1405
|
+
|
|
1406
|
+
**Solution:**
|
|
1407
|
+
```bash
|
|
1408
|
+
# Manually install Docker
|
|
1409
|
+
curl -fsSL https://get.docker.com -o get-docker.sh
|
|
1410
|
+
sudo sh get-docker.sh
|
|
1411
|
+
|
|
1412
|
+
# Verify installation
|
|
1413
|
+
docker --version
|
|
1414
|
+
|
|
1415
|
+
# Re-run Coolify installer
|
|
1416
|
+
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
**Error:** `Permission denied (Docker socket)`
|
|
1420
|
+
|
|
1421
|
+
**Solution:**
|
|
1422
|
+
```bash
|
|
1423
|
+
# Add user to docker group
|
|
1424
|
+
sudo usermod -aG docker $USER
|
|
1425
|
+
|
|
1426
|
+
# Log out and back in, or run:
|
|
1427
|
+
newgrp docker
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
#### 2. Supabase Deployment Issues
|
|
1431
|
+
|
|
1432
|
+
**Error:** `Service health check failed`
|
|
1433
|
+
|
|
1434
|
+
**Solution:**
|
|
1435
|
+
```bash
|
|
1436
|
+
# Check container logs
|
|
1437
|
+
docker logs supabase-db
|
|
1438
|
+
docker logs supabase-kong
|
|
1439
|
+
|
|
1440
|
+
# Common causes:
|
|
1441
|
+
# - Insufficient RAM (need 4GB+)
|
|
1442
|
+
# - Port conflicts (5432, 8000, 8443)
|
|
1443
|
+
# - Invalid environment variables
|
|
1444
|
+
|
|
1445
|
+
# Check port usage
|
|
1446
|
+
sudo netstat -tulpn | grep LISTEN
|
|
1447
|
+
```
|
|
1448
|
+
|
|
1449
|
+
**Error:** `Database initialization failed`
|
|
1450
|
+
|
|
1451
|
+
**Solution:**
|
|
1452
|
+
```bash
|
|
1453
|
+
# Restart PostgreSQL container
|
|
1454
|
+
docker restart supabase-db
|
|
1455
|
+
|
|
1456
|
+
# Check PostgreSQL logs
|
|
1457
|
+
docker logs supabase-db --tail 100
|
|
1458
|
+
|
|
1459
|
+
# If corrupted, redeploy:
|
|
1460
|
+
# In Coolify: Resource → Force Redeploy
|
|
1461
|
+
```
|
|
1462
|
+
|
|
1463
|
+
#### 3. Connection Issues
|
|
1464
|
+
|
|
1465
|
+
**Error:** `Could not connect to Supabase`
|
|
1466
|
+
|
|
1467
|
+
**Solution:**
|
|
1468
|
+
|
|
1469
|
+
Check firewall:
|
|
1470
|
+
```bash
|
|
1471
|
+
sudo ufw status
|
|
1472
|
+
# Ensure ports 80 and 443 are allowed
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
Check DNS:
|
|
1476
|
+
```bash
|
|
1477
|
+
nslookup api-xxxxx.coolify.app
|
|
1478
|
+
# Should return your server IP
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
Check SSL certificate:
|
|
1482
|
+
```bash
|
|
1483
|
+
curl -I https://api-xxxxx.coolify.app
|
|
1484
|
+
# Should return 200 OK
|
|
1485
|
+
```
|
|
1486
|
+
|
|
1487
|
+
**Error:** `CORS policy blocked`
|
|
1488
|
+
|
|
1489
|
+
**Solution:**
|
|
1490
|
+
|
|
1491
|
+
Update environment variables in Coolify:
|
|
1492
|
+
```bash
|
|
1493
|
+
ADDITIONAL_REDIRECT_URLS=https://yourdomain.com,https://app.yourdomain.com
|
|
1494
|
+
```
|
|
1495
|
+
|
|
1496
|
+
Restart Supabase services.
|
|
1497
|
+
|
|
1498
|
+
#### 4. Performance Issues
|
|
1499
|
+
|
|
1500
|
+
**Error:** `Database queries are slow`
|
|
1501
|
+
|
|
1502
|
+
**Solution:**
|
|
1503
|
+
|
|
1504
|
+
Increase shared_buffers:
|
|
1505
|
+
```yaml
|
|
1506
|
+
# Edit Docker Compose
|
|
1507
|
+
supabase-db:
|
|
1508
|
+
command: postgres -c shared_buffers=512MB -c effective_cache_size=2GB
|
|
1509
|
+
```
|
|
1510
|
+
|
|
1511
|
+
Add indexes:
|
|
1512
|
+
```sql
|
|
1513
|
+
-- Find missing indexes
|
|
1514
|
+
SELECT schemaname, tablename, attname
|
|
1515
|
+
FROM pg_stats
|
|
1516
|
+
WHERE correlation < 0.1
|
|
1517
|
+
AND n_distinct > 100;
|
|
1518
|
+
|
|
1519
|
+
-- Create index
|
|
1520
|
+
CREATE INDEX idx_users_email ON users(email);
|
|
1521
|
+
```
|
|
1522
|
+
|
|
1523
|
+
**Error:** `Server running out of disk space`
|
|
1524
|
+
|
|
1525
|
+
**Solution:**
|
|
1526
|
+
|
|
1527
|
+
Clean Docker:
|
|
1528
|
+
```bash
|
|
1529
|
+
# Remove unused containers, images, volumes
|
|
1530
|
+
docker system prune -a --volumes
|
|
1531
|
+
|
|
1532
|
+
# Check disk usage
|
|
1533
|
+
df -h
|
|
1534
|
+
```
|
|
1535
|
+
|
|
1536
|
+
Resize VPS storage (depends on provider).
|
|
1537
|
+
|
|
1538
|
+
#### 5. Migration Issues
|
|
1539
|
+
|
|
1540
|
+
**Error:** `pg_restore: error: could not connect`
|
|
1541
|
+
|
|
1542
|
+
**Solution:**
|
|
1543
|
+
|
|
1544
|
+
Verify PostgreSQL is accessible:
|
|
1545
|
+
```bash
|
|
1546
|
+
# Test connection
|
|
1547
|
+
psql -h your-server-ip -U postgres -d postgres
|
|
1548
|
+
|
|
1549
|
+
# If fails, check:
|
|
1550
|
+
# 1. Port 5432 exposed in Docker Compose
|
|
1551
|
+
# 2. Firewall allows port 5432
|
|
1552
|
+
# 3. Correct password
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
**Error:** `Restore failed: permission denied`
|
|
1556
|
+
|
|
1557
|
+
**Solution:**
|
|
1558
|
+
|
|
1559
|
+
Use `--no-owner` and `--no-acl` flags:
|
|
1560
|
+
```bash
|
|
1561
|
+
pg_restore \
|
|
1562
|
+
--no-owner \
|
|
1563
|
+
--no-acl \
|
|
1564
|
+
-h your-server-ip \
|
|
1565
|
+
-U postgres \
|
|
1566
|
+
-d postgres \
|
|
1567
|
+
backup.backup
|
|
1568
|
+
```
|
|
1569
|
+
|
|
1570
|
+
#### 6. SSL Certificate Issues
|
|
1571
|
+
|
|
1572
|
+
**Error:** `Certificate validation failed`
|
|
1573
|
+
|
|
1574
|
+
**Solution:**
|
|
1575
|
+
|
|
1576
|
+
Regenerate certificate in Coolify:
|
|
1577
|
+
1. Go to **Resource Details** → **Domains**
|
|
1578
|
+
2. Click **"Generate Certificate"**
|
|
1579
|
+
3. Wait 1-2 minutes
|
|
1580
|
+
|
|
1581
|
+
Check Let's Encrypt rate limits:
|
|
1582
|
+
```bash
|
|
1583
|
+
# Let's Encrypt limits: 5 certificates per domain per week
|
|
1584
|
+
# If hit limit, wait 7 days or use staging environment
|
|
1585
|
+
```
|
|
1586
|
+
|
|
1587
|
+
---
|
|
1588
|
+
|
|
1589
|
+
## Resources
|
|
1590
|
+
|
|
1591
|
+
### Official Documentation
|
|
1592
|
+
|
|
1593
|
+
- **Coolify Docs**: https://coolify.io/docs
|
|
1594
|
+
- **Supabase Docs**: https://supabase.com/docs
|
|
1595
|
+
- **Supabase Self-Hosting**: https://supabase.com/docs/guides/self-hosting
|
|
1596
|
+
|
|
1597
|
+
### Tutorials & Guides
|
|
1598
|
+
|
|
1599
|
+
- [How to self-host Supabase with Coolify](https://msof.me/blog/how-to-self-host-supabase-with-coolify-and-migrate-your-project-from-the-official-supabase-platform/)
|
|
1600
|
+
- [Coolify + Supabase on DEV.to](https://dev.to/musayazlik/harnessing-the-power-of-self-hosted-supabase-on-coolify-a-complete-guide-to-server-setup-and-oauth-34c5)
|
|
1601
|
+
- [Self-host Supabase for $3](https://blog.melbournedev.com/blog/post/how-to-self-host-supabase-for-3-dollars)
|
|
1602
|
+
|
|
1603
|
+
### GitHub Repositories
|
|
1604
|
+
|
|
1605
|
+
- **Coolify**: https://github.com/coollabsio/coolify
|
|
1606
|
+
- **Supabase**: https://github.com/supabase/supabase
|
|
1607
|
+
- **Supabase Docker**: https://github.com/supabase/supabase/tree/master/docker
|
|
1608
|
+
|
|
1609
|
+
### Community
|
|
1610
|
+
|
|
1611
|
+
- **Coolify Discord**: https://discord.com/invite/coollabs
|
|
1612
|
+
- **Supabase Discord**: https://discord.supabase.com
|
|
1613
|
+
- **Supabase GitHub Discussions**: https://github.com/orgs/supabase/discussions
|
|
1614
|
+
|
|
1615
|
+
### VPS Providers
|
|
1616
|
+
|
|
1617
|
+
- **Hetzner**: https://www.hetzner.com/cloud (Best value)
|
|
1618
|
+
- **DigitalOcean**: https://www.digitalocean.com
|
|
1619
|
+
- **Vultr**: https://www.vultr.com
|
|
1620
|
+
- **Linode**: https://www.linode.com
|
|
1621
|
+
- **Hostinger**: https://www.hostinger.com/vps
|
|
1622
|
+
|
|
1623
|
+
### Tools
|
|
1624
|
+
|
|
1625
|
+
- **PostgreSQL Tools**: https://www.postgresql.org/download/
|
|
1626
|
+
- **Docker**: https://docs.docker.com/get-docker/
|
|
1627
|
+
- **Supabase CLI**: https://github.com/supabase/cli
|
|
1628
|
+
|
|
1629
|
+
---
|
|
1630
|
+
|
|
1631
|
+
## Summary
|
|
1632
|
+
|
|
1633
|
+
### Key Takeaways
|
|
1634
|
+
|
|
1635
|
+
1. **Coolify + Supabase = powerful self-hosted backend** with minimal complexity
|
|
1636
|
+
2. **Cost savings: 50-80%** compared to Supabase Cloud for production apps
|
|
1637
|
+
3. **Full data control** and no vendor lock-in
|
|
1638
|
+
4. **One-click deployment** in Coolify (5-10 minutes)
|
|
1639
|
+
5. **Migration from hosted Supabase** is straightforward (backup/restore)
|
|
1640
|
+
6. **Alternative solutions** exist (CapRover, Dokploy, Dokku) depending on your needs
|
|
1641
|
+
|
|
1642
|
+
### Quick Start Checklist
|
|
1643
|
+
|
|
1644
|
+
- [ ] Purchase VPS (4GB RAM minimum, recommend 8GB for production)
|
|
1645
|
+
- [ ] Install Coolify (2-5 minutes with automated script)
|
|
1646
|
+
- [ ] Deploy Supabase in Coolify (5-10 minutes)
|
|
1647
|
+
- [ ] Configure custom domains and SSL
|
|
1648
|
+
- [ ] Migrate data from hosted Supabase (if applicable)
|
|
1649
|
+
- [ ] Update application configuration
|
|
1650
|
+
- [ ] Set up automated backups
|
|
1651
|
+
- [ ] Configure monitoring and alerts
|
|
1652
|
+
- [ ] Implement security hardening
|
|
1653
|
+
|
|
1654
|
+
### When to Self-Host
|
|
1655
|
+
|
|
1656
|
+
✅ **Self-host if:**
|
|
1657
|
+
- Database >10GB or rapidly growing
|
|
1658
|
+
- >1,000 monthly active users
|
|
1659
|
+
- Want full control over data
|
|
1660
|
+
- Looking to reduce costs by 50-80%
|
|
1661
|
+
- Have basic DevOps knowledge
|
|
1662
|
+
|
|
1663
|
+
❌ **Use Supabase Cloud if:**
|
|
1664
|
+
- Just prototyping/MVP
|
|
1665
|
+
- Small database (<5GB)
|
|
1666
|
+
- No DevOps experience
|
|
1667
|
+
- Need enterprise support/SLA
|
|
1668
|
+
- Want zero infrastructure management
|
|
1669
|
+
|
|
1670
|
+
### Next Steps
|
|
1671
|
+
|
|
1672
|
+
1. **Experiment**: Start with a small VPS ($12/mo) and test deployment
|
|
1673
|
+
2. **Learn**: Familiarize yourself with Coolify and Docker basics
|
|
1674
|
+
3. **Migrate staging**: Move a non-production environment first
|
|
1675
|
+
4. **Validate**: Test thoroughly before migrating production
|
|
1676
|
+
5. **Monitor**: Set up proper monitoring and backups
|
|
1677
|
+
6. **Optimize**: Fine-tune performance after initial deployment
|
|
1678
|
+
|
|
1679
|
+
---
|
|
1680
|
+
|
|
1681
|
+
**Ready to take control of your backend?** 🚀
|
|
1682
|
+
|
|
1683
|
+
Start with a Hetzner VPS (€3.29/mo), install Coolify, deploy Supabase, and enjoy full ownership of your infrastructure with significant cost savings!
|
|
1684
|
+
|