selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
EcomGen logo

Self-host EcomGen

v0.2.0

Local-first AI e-commerce image generator for sellers

BetaOpen SourceMIT
Updated2 weeks ago
LanguageTypescript
Setup difficultyAdvanced
Stars
216
Port
8787 (API and web UI (API serves the built web frontend))
Requires
Redis, SQLite (better-sqlite3)
Install with Docker Compose
EcomGen project gallery/home overviewEcomGen project configuration screenEcomGen storyboard confirmation screenEcomGen generation results screen

What is EcomGen?

EcomGen is a local-first AI-powered workbench for individual e-commerce sellers to create complete product image suites. It structures product facts, materials, target markets, and platform requirements into auditable storyboards, then uses a Pi Agent to generate final prompts for image generation providers. The system includes 25 built-in e-commerce templates covering hero, scene, infographic, packaging, comparison, and social media shots, plus over 1,100 reusable suite templates across 24 top-level categories. It supports OpenAI-compatible image APIs and Google Gemini native image generation (Nano Banana), with AI-powered layering that exports individual PNG layers, ZIP archives, and PSD files. The stack runs as three services (Fastify API, BullMQ Worker, React/Vite web UI) backed by Redis and SQLite, deployable via Docker Compose or manual Node.js/pnpm installation. All sensitive data including provider API keys are encrypted at rest. The project is MIT-licensed and actively developed.

Should you self-host EcomGen?

EcomGen scores 42/100 on selfhost.directory (how scoring works) and ranks #7 of 10 in E-commerce. It has 216 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v0.2.0, came out on 4 October 2026.

Setup is advanced: plan for several services and some ongoing maintenance. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is BTCPay Server (76/100, 7 859 stars). It scores higher overall, so compare the two before you pick. See EcomGen vs BTCPay Server side by side.

EcomGen README

How to install EcomGen

Install EcomGen with Docker Compose

Docker, Docker Compose
Environment variables
ECOMGEN_MASTER_KEY, REDIS_URL, ECOMGEN_DATA_DIR, ECOMGEN_QUEUE_NAME, HOST, PORT, ECOMGEN_CORS_ORIGINS, WORKER_CONCURRENCY

docker compose up -d --build

Starts Redis, API, and Worker; API serves the built web frontend on port 8787. Requires .env with ECOMGEN_MASTER_KEY set.

How to configure EcomGen

  • ECOMGEN_CORS_ORIGINSCORS origin whitelist: comma-separated full origins (scheme://host[:port]). Required for remote/container deployments; defaults to local dev servers only.

    CORS origin whitelist: comma-separated full origins (scheme://host[:port]). Required for remote/container deployments; defaults to local dev servers only.

  • ECOMGEN_DATA_DIR./dataBusiness data directory: stores SQLite database, uploaded materials, generation results, and export files. API and Worker must use the same directory.

    Business data directory: stores SQLite database, uploaded materials, generation results, and export files. API and Worker must use the same directory.

  • ECOMGEN_MASTER_KEYMaster key: Base64-encoded 32-byte key for encrypting sensitive data like Provider API Keys. API and Worker must use the same key.

    Master key: Base64-encoded 32-byte key for encrypting sensitive data like Provider API Keys. API and Worker must use the same key.

  • ECOMGEN_QUEUE_NAMEecomgenQueue name: API enqueues and Worker consumes via this name; both ends must match.

    Queue name: API enqueues and Worker consumes via this name; both ends must match.

  • HOST127.0.0.1API listen address.

    API listen address.

  • PORT8787API listen port.

    API listen port.

  • REDIS_URLredis://127.0.0.1:6379Redis connection address: BullMQ queues and event bus depend on this. API and Worker must use the same REDIS_URL.

    Redis connection address: BullMQ queues and event bus depend on this. API and Worker must use the same REDIS_URL.

  • VITE_API_BASE_URL/api/v1Web build-time variable for the API base URL accessible from the browser (e.g., http://<server-ip>:8787/api/v1). Defaults to same-origin relative path /api/v1.

    Web build-time variable for the API base URL accessible from the browser (e.g., http://<server-ip>:8787/api/v1). Defaults to same-origin relative path /api/v1.

  • WORKER_CONCURRENCY2Worker concurrency: number of simultaneous image generation/export tasks to process, adjusted for local resources and provider rate limits.

    Worker concurrency: number of simultaneous image generation/export tasks to process, adjusted for local resources and provider rate limits.

EcomGen releases & version history

More in E-commerce

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…