Self-Hosted Installation
Deploy Genfeed Core on your own infrastructure. This guide covers everything from prerequisites to running your first workflow.
Prerequisites
Before you begin, ensure you have:
| Requirement | Version | Notes |
|---|---|---|
| Node.js | 18.0+ | Download |
| Bun | 1.0+ | Install (recommended) or use npm |
| MongoDB | 6.0+ | Install |
| Redis | 7.0+ | Install |
| Git | Latest | Download |
API Keys (Optional but Recommended)
To use AI generation features, you’ll need API keys from providers:
| Provider | For | Get Key |
|---|---|---|
| OpenAI | Text generation | platform.openai.com |
| Replicate | Image/Video models | replicate.com |
| ElevenLabs | Voice synthesis | elevenlabs.io |
| Anthropic | Claude models | console.anthropic.com |
Quick Start
1. Clone the Repository
git clone https://github.com/genfeedai/genfeed-core.git
cd genfeed-core2. Install Dependencies
bun installOr with npm:
npm install3. Configure Environment
Create a .env.local file in the project root:
cp .env.example .env.localEdit .env.local with your settings:
# Database
MONGODB_URI=mongodb://localhost:27017/genfeed
REDIS_URL=redis://localhost:6379
# API Keys (add the ones you need)
OPENAI_API_KEY=sk-...
REPLICATE_API_TOKEN=r8_...
ELEVENLABS_API_KEY=...
ANTHROPIC_API_KEY=sk-ant-...
# Application
NODE_ENV=development
PORT=3001
JWT_SECRET=your-secure-random-string
# Optional: External services
# AWS_ACCESS_KEY_ID=...
# AWS_SECRET_ACCESS_KEY=...
# S3_BUCKET=your-bucketNever Commit API Keys — Add .env.local to your .gitignore. Never commit API keys to version control.
4. Start Services
Make sure MongoDB and Redis are running:
# Start MongoDB (if not running)
mongod --dbpath /path/to/your/data
# Start Redis (if not running)
redis-server5. Run Genfeed Core
bun run start:devOr with npm:
npm run start:devYou should see:
[Nest] Starting...
[API] Listening on http://localhost:3001
[Queue] BullMQ connected to Redis
[DB] MongoDB connected6. Verify Installation
Open your browser and visit:
http://localhost:3001/healthYou should see:
{
"status": "ok",
"version": "1.0.0",
"services": {
"database": "connected",
"redis": "connected",
"queue": "ready"
}
}Running the Frontend (Optional)
Genfeed Core includes the API only. To run the full Studio interface:
# In a separate terminal
cd genfeed.ai
bun install
bun run start:dev:studioThe Studio will be available at http://localhost:3000.
Docker Deployment
For production deployments, we recommend Docker:
Using Docker Compose
# Clone with Docker config
git clone https://github.com/genfeedai/genfeed-core.git
cd genfeed-core
# Copy environment file
cp .env.example .env
# Start all services
docker-compose up -ddocker-compose.yml
version: '3.8'
services:
api:
build: .
ports:
- "3001:3001"
environment:
- MONGODB_URI=mongodb://mongo:27017/genfeed
- REDIS_URL=redis://redis:6379
depends_on:
- mongo
- redis
mongo:
image: mongo:6
volumes:
- mongo_data:/data/db
ports:
- "27017:27017"
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
ports:
- "6379:6379"
volumes:
mongo_data:
redis_data:Configuration Reference
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
MONGODB_URI | Yes | - | MongoDB connection string |
REDIS_URL | Yes | - | Redis connection string |
PORT | No | 3001 | API server port |
NODE_ENV | No | development | Environment mode |
JWT_SECRET | Yes | - | Secret for JWT tokens |
OPENAI_API_KEY | No | - | OpenAI API key |
REPLICATE_API_TOKEN | No | - | Replicate API token |
Resource Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Storage | 20 GB | 100+ GB (for assets) |
Troubleshooting
MongoDB Connection Failed
# Check if MongoDB is running
mongosh --eval "db.adminCommand('ping')"
# If not, start it
mongod --dbpath /your/data/pathRedis Connection Failed
# Check if Redis is running
redis-cli ping
# Should return: PONGPort Already in Use
# Find what's using the port
lsof -i :3001
# Use a different port
PORT=3002 bun run start:devAPI Keys Not Working
- Verify keys are correctly copied (no extra spaces)
- Check provider dashboard for rate limits
- Ensure billing is active on the provider account
Upgrading
To upgrade to a new version:
# Pull latest changes
git pull origin main
# Install new dependencies
bun install
# Run migrations (if any)
bun run migrate
# Restart the server
bun run start:devNext Steps
- API Reference — Explore the REST API
- Documentation — Full platform documentation
Need Help?
- GitHub Issues: github.com/genfeedai/genfeed-core/issues
- Discord: discord.gg/TmfHg42xVb
- Documentation: You’re here!
For production support, consider Genfeed Cloud or an Enterprise License.