Self-Hosting Guide
This guide covers how to self-host Eryxon Flow on your own infrastructure. Self-hosting is free, unlimited, and you manage everything yourself.
[!IMPORTANT] License & Usage: Eryxon Flow is licensed under BSL 1.1. This means you are free to self-host, modify, and use it for your own business operations. However, you are not permitted to commercially resell the software or provide it as a competing SaaS offering. The license converts to Apache 2.0 after 4 years.
Deployment Options
Section titled “Deployment Options”| Option | Complexity | Best For |
|---|---|---|
| Supabase Cloud + Docker | Easy | Most users, quick setup |
| Self-Hosted Supabase | Advanced | Full control, air-gapped environments |
Option 1: Supabase Cloud (Recommended)
Section titled “Option 1: Supabase Cloud (Recommended)”The fastest way to get started. Supabase offers a free tier that works for evaluation and small deployments.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ and npm (or Docker)
- A Supabase account (supabase.com)
- Git
Step 1: Create Supabase Project
Section titled “Step 1: Create Supabase Project”- Go to supabase.com and sign in
- Click New Project
- Choose your organization
- Enter project details:
- Name:
eryxon-flow(or your preference) - Database Password: Generate a strong password (save it!)
- Region: Choose closest to your users
- Name:
- Click Create new project
- Wait for project to be ready (~2 minutes)
Step 2: Get Your Credentials
Section titled “Step 2: Get Your Credentials”From your Supabase project dashboard:
- Go to Settings -> API
- Copy these values:
- Project URL (e.g.,
https://abcdefgh.supabase.co) - anon/public key (starts with
eyJ...) - service_role key (for edge functions - keep this secret!)
- Project URL (e.g.,
Step 3: Apply Database Schema
Section titled “Step 3: Apply Database Schema”Using Supabase CLI:
npm install -g supabase
git clone https://github.com/SheetMetalConnect/eryxon-flow.gitcd eryxon-flow
supabase link --project-ref your-project-id
supabase db pushOr manually:
- Go to SQL Editor in your Supabase dashboard
- Run the migrations from
supabase/migrations/in order
Step 4: Deploy Edge Functions
Section titled “Step 4: Deploy Edge Functions”cd eryxon-flow
supabase login
supabase functions deployStep 5: Configure Storage Buckets
Section titled “Step 5: Configure Storage Buckets”Verify in Storage that these buckets exist:
parts-images- For CAD files and part photosissues- For issue attachments
If missing, create them with:
- Public: No
- File size limit: 50MB
- Allowed MIME types:
image/*,application/pdf,model/step
Step 6: Run the Application
Section titled “Step 6: Run the Application”Option A: Docker (Recommended)
cat > .env << EOFVITE_SUPABASE_URL=https://your-project-id.supabase.coVITE_SUPABASE_PUBLISHABLE_KEY=your-anon-keyEOF
docker-compose up -dOption B: Development mode
cp .env.example .env
npm installnpm run devOption C: Production build
npm run buildStep 7: Create Your First User
Section titled “Step 7: Create Your First User”- Open the application in your browser
- Click Sign Up
- Enter your email and password
- Check your email for verification link
- First user automatically becomes admin
Option 2: Fully Self-Hosted (Air-Gapped)
Section titled “Option 2: Fully Self-Hosted (Air-Gapped)”For organizations requiring complete control over all infrastructure.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose
- 4GB+ RAM
- 20GB+ disk space
- Domain name (for production)
- SSL certificates
Architecture
Section titled “Architecture”+----------------------------------------------------------+| Your Server |+----------------------------------------------------------+| +---------+ +---------+ +----------+ +----------+ || | Postgres| | GoTrue | |PostgREST | | Realtime | || | DB | | Auth | | API | | WS | || +---------+ +---------+ +----------+ +----------+ || +---------+ +---------+ +----------+ || | Storage | | Kong | | Studio | || | API | | Gateway | | (Admin) | || +---------+ +---------+ +----------+ |+----------------------------------------------------------+| +------------------------------------------------------+|| | Eryxon Flow (Frontend) ||| +------------------------------------------------------+|+----------------------------------------------------------+Step 1: Clone Supabase Docker Setup
Section titled “Step 1: Clone Supabase Docker Setup”git clone --depth 1 https://github.com/supabase/supabasecd supabase/dockercp .env.example .envStep 2: Configure Environment
Section titled “Step 2: Configure Environment”Edit .env:
POSTGRES_PASSWORD=your-secure-passwordJWT_SECRET=your-jwt-secret-min-32-chars
ANON_KEY=your-anon-keySERVICE_ROLE_KEY=your-service-role-key
SITE_URL=https://your-domain.comAPI_EXTERNAL_URL=https://your-domain.com
SMTP_HOST=smtp.your-provider.comSMTP_PORT=587SMTP_USER=your-smtp-userSMTP_PASS=your-smtp-passwordSMTP_SENDER_NAME=Eryxon FlowStep 3: Start Supabase Services
Section titled “Step 3: Start Supabase Services”docker compose up -ddocker compose ps # Verify all services runningStep 4: Apply Schema and Deploy App
Section titled “Step 4: Apply Schema and Deploy App”cd /path/to/eryxon-flowcat > .env << EOFVITE_SUPABASE_URL=https://your-domain.comVITE_SUPABASE_PUBLISHABLE_KEY=your-anon-keyEOF
docker build -t eryxon-flow .docker run -p 3000:80 --env-file .env eryxon-flowProduction Checklist
Section titled “Production Checklist”- SSL/TLS configured (Let’s Encrypt)
- PostgreSQL backups scheduled
- Monitoring set up
- Email delivery configured
- Security review completed
Docker Quick Reference
Section titled “Docker Quick Reference”docker-compose.yml
Section titled “docker-compose.yml”version: '3.8'
services: eryxon-flow: build: . ports: - "8080:80" environment: - VITE_SUPABASE_URL=${SUPABASE_URL} - VITE_SUPABASE_PUBLISHABLE_KEY=${SUPABASE_ANON_KEY} restart: unless-stoppedQuick Start
Section titled “Quick Start”export SUPABASE_URL=https://your-project.supabase.coexport SUPABASE_ANON_KEY=your-anon-key
docker-compose up -dMCP Server Setup
Section titled “MCP Server Setup”Enable AI assistants to interact with your manufacturing data.
Installation
Section titled “Installation”cd mcp-servernpm installnpm run buildConfiguration
Section titled “Configuration”Create mcp-server/.env:
SUPABASE_URL=https://your-project.supabase.coSUPABASE_SERVICE_KEY=your-service-role-keyClaude Desktop Integration
Section titled “Claude Desktop Integration”Add to ~/.claude/config.json:
{ "mcpServers": { "eryxon-flow": { "command": "node", "args": ["/path/to/eryxon-flow/mcp-server/dist/index.js"], "env": { "SUPABASE_URL": "https://your-project.supabase.co", "SUPABASE_SERVICE_KEY": "your-service-role-key" } } }}Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”“Invalid API key” error
- Verify
VITE_SUPABASE_PUBLISHABLE_KEYis correct - Use the
anonkey, not theservice_rolekey
“Permission denied” on queries
- Check RLS policies are applied
- Verify user is authenticated
- Check tenant_id matches
Edge functions not working
- Verify deployment:
supabase functions list - Check logs:
supabase functions logs function-name
Storage uploads failing
- Verify buckets exist with correct names
- Check bucket policies allow authenticated uploads
Updates
Section titled “Updates”git pull origin main
npm installnpm run build
docker-compose builddocker-compose up -dFor database schema updates:
supabase db pushSupport
Section titled “Support”Self-hosting is community-supported only:
- GitHub Issues: Bug reports
- Documentation:
/docsfolder
Need help with complex deployments? Check out vanenkhuizen.com for consulting services.
Licensed under BSL 1.1 - See LICENSE for terms