Sellf - Simple Deploy (Docker + Supabase Cloud)
Ta treść nie jest jeszcze dostępna w Twoim języku.
Enable Confirm Email in Supabase and install both confirmation and magic-link templates. Guest purchases join the account after confirming the address used for the purchase. See e-mail setup.
Admin UI updates: runtime selection, supported deployments and migrations. Containers do not apply migrations on startup.
Use this if you want Docker without self-hosting Supabase — Sellf runs from the published image, Supabase Cloud (or your own Supabase project) hosts the database.
Overview
Section titled “Overview”What Does It Do?
Section titled “What Does It Do?”- Runs only the Sellf container (1 container), pulling
ghcr.io/jurczykpawel/sellf— no build step on your server - Connects to Supabase Cloud (or a self-hosted Supabase, see full-stack.md)
- Does not require nginx (you use your own reverse proxy)
- Simple, lightweight
Requirements
Section titled “Requirements”- VPS with Docker (min. 1 GB RAM)
- Reverse proxy for SSL (Nginx Proxy Manager, Caddy, Traefik)
- Supabase Cloud account (free)
- Stripe account
- Domain
Step by Step
Section titled “Step by Step”1. Prepare the Server
Section titled “1. Prepare the Server”# If you don't have Docker yetcurl -fsSL https://get.docker.com -o get-docker.shsh get-docker.sh
# Clone the project (only needed for docker-compose.yml + optional migrations)cd /optgit clone https://github.com/jurczykpawel/sellf.gitcd sellf2. Create a Project in Supabase Cloud
Section titled “2. Create a Project in Supabase Cloud”- Go to https://supabase.com
- Create a new project
- Save:
- Project URL:
https://abcdef.supabase.co - anon key:
eyJhbGci... - service_role key:
eyJhbGci...
- Project URL:
3. Run Database Migrations
Section titled “3. Run Database Migrations”Easiest from your own machine with the Supabase CLI:
npx supabase db push --db-url "postgresql://postgres:<password>@db.abcdef.supabase.co:5432/postgres"Or paste each file under supabase/migrations/ into the Supabase Dashboard’s
SQL Editor, in filename order, if you don’t have the CLI available.
4. Configure SMTP + magic-link templates in Supabase
Section titled “4. Configure SMTP + magic-link templates in Supabase”- Settings → Authentication → SMTP Settings — enable Custom SMTP, fill in with SendGrid/Mailgun/etc.
- Settings → Authentication → Email Templates — paste the templates
from
supabase/templates/*.htmlin the Sellf repo (they’re what make the magic-link URL carrytoken_hash, which/auth/callbackrequires). Seesupabase/templates/README.mdfor the full reference.
5. Create the .env File
Section titled “5. Create the .env File”cp .env.docker.example .envnano .envFill in SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY,
SITE_URL, the three generated secrets, and your Stripe keys — see the
comments in .env.docker.example for exact commands.
How captcha and magic links work: the app verifies your captcha provider (ALTCHA or Turnstile) itself before sending any login email; Supabase’s own captcha setting is a separate, independent lock on direct calls to its /auth/v1 endpoints — enable it too when you have a Turnstile account, and verify it with admin-panel/scripts/verify-auth-captcha.sh <supabase_url> <anon_key>.
6. Start Docker
Section titled “6. Start Docker”docker compose up -ddocker compose logs -fdocker compose psIt should be running at http://localhost:3000 (or whatever SELLF_PORT you set).
7. Configure Reverse Proxy for SSL
Section titled “7. Configure Reverse Proxy for SSL”Option A: Nginx Proxy Manager (Recommended)
Section titled “Option A: Nginx Proxy Manager (Recommended)”If you are already using NPM:
- Add a Proxy Host:
- Domain:
your-domain.com - Forward Hostname:
localhost(or server IP) - Forward Port:
3000(or yourSELLF_PORT) - Websockets: enabled
- SSL: Request Let’s Encrypt Certificate
- Force SSL: enabled
- Domain:
Option B: Caddy
Section titled “Option B: Caddy”sudo apt install -y caddysudo nano /etc/caddy/CaddyfileContents:
your-domain.com, www.your-domain.com { reverse_proxy localhost:3000}sudo systemctl restart caddy8. Configure Stripe Webhooks
Section titled “8. Configure Stripe Webhooks”Easiest path — register from the Sellf admin (after Step 9 below):
After your first login as admin, open Settings → Payments in the Sellf admin. Two cards: paste your Stripe pk_… and sk_… into the API keys card, then click Register webhook in the second card. Sellf creates the endpoint on Stripe for you, subscribes to all the events, and stores the signing secret encrypted in your Supabase DB. No Dashboard hopping, no env-var edits.
Env-config path — only needed if you can’t (or don’t want to) click in the admin (e.g. CI-driven Docker deploys):
- https://dashboard.stripe.com/webhooks
- Add endpoint:
https://your-domain.com/api/webhooks/stripe - Events:
checkout.session.completed,checkout.session.expired,checkout.session.async_payment_succeeded,payment_intent.succeeded,charge.refunded,charge.updated,refund.created,refund.updated,refund.failed,charge.refund.updated,charge.dispute.created,charge.dispute.closed,customer.subscription.{created,updated,deleted,trial_will_end,paused,resumed},invoice.{paid,upcoming,payment_succeeded,payment_failed,payment_action_required} - Copy the Signing secret
- Add to
.envasSTRIPE_WEBHOOK_SECRET - Restart:
docker compose restart
9. First Login
Section titled “9. First Login”- Open:
https://your-domain.com/login - Enter email
- Check email (magic link)
- Click the link
- First account = automatically admin!
Monitoring
Section titled “Monitoring”docker compose logs -fdocker statsdocker compose pscurl https://your-domain.com/api/runtime-configUpdating
Section titled “Updating”cd /opt/sellf
# Back up the DB and check out the target release first.# Apply its new migrations as in Step 3, before starting the new container.# Set SELLF_VERSION in .env, then:docker compose pull sellfdocker compose up -d --force-recreate sellf
# Check logs and the running version in Settings → System:docker compose logs -fTroubleshooting
Section titled “Troubleshooting”Problem: Container does not start
Section titled “Problem: Container does not start”docker compose logs sellfdocker compose config # confirms every required secret is actually setcat .env | grep SUPABASE_URLdocker compose restartProblem: Cannot log in
Section titled “Problem: Cannot log in”- Check SMTP in Supabase Dashboard
- Check Auth logs in Supabase
- Check spam folder
- Check
GOTRUE_URI_ALLOW_LISTin Supabase Settings - Check the magic-link email template actually carries
token_hash(Step 4)
Problem: Stripe webhook is not working
Section titled “Problem: Stripe webhook is not working”curl -X POST https://your-domain.com/api/webhooks/stripedocker compose logs sellf | grep stripegrep STRIPE_WEBHOOK_SECRET .envProblem: 502 Bad Gateway
Section titled “Problem: 502 Bad Gateway”- Check if the container is running:
docker compose ps - Check if the port is available:
netstat -tlnp | grep 3000 - Check reverse proxy config
File Structure
Section titled “File Structure”/opt/sellf/├── docker-compose.yml ← THIS IS THE FILE YOU USE├── .env ← Your production configuration└── supabase/ ├── migrations/ ← Migrations (run against Supabase Cloud) └── templates/ ← Magic-link email templates (Step 4)Security
Section titled “Security”Check before starting:
-
.envhas permissions 600:chmod 600 .env -
.envis NOT in Git - SSL/HTTPS is working
- Firewall is configured (only 22, 80, 443)
- Passwords are long and random
- Stripe webhooks have a secret
- Supabase backups are enabled (automatic in Cloud)
Monthly Costs
Section titled “Monthly Costs”- VPS (1-2GB RAM): ~$5-10
- Supabase Cloud Free: $0 (up to 500MB database)
- Stripe: 0% + 2.9% + $0.30 per transaction
- Domain: ~$1/month
Total: ~$6-11/month
Advantages of This Approach
Section titled “Advantages of This Approach”- Simplest Docker path — no build step, pulls a signed, published image
- Lightweight — only 1 container
- Cheap — minimal resources
- Easy to update —
docker compose pull && docker compose up -d - Supabase Cloud — automatic backups and monitoring
Other Deployment Options
Section titled “Other Deployment Options”If you need more control:
- full-stack.md: Self-hosted Supabase too (official installer), same Sellf container
- deployment.md: Comparison of all deployment options
Questions? Open an issue on GitHub!