Skip to content
Live demo

Build & Deploy

While SparkFeed is primarily designed as a local-first application, you can build it for production to run it continuously on a home server, a NAS device, or a VPS.

To build the optimized production bundle:

npm run build

This compiles the frontend React app and the Nitro backend into a single output directory:

dist/
├── client/ # Static frontend assets (JS, CSS, images)
└── server/ # Nitro server bundle

After building, start the production server:

node dist/server/index.mjs

Or use the npm script:

npm run start

The server will start on the port defined in your .env file (default: 3000).

SparkFeed is perfect for a home server or Raspberry Pi. Here’s a minimal setup:

git clone https://github.com/sparkfeed/sparkfeed.git
cd sparkfeed
npm install
npm run db:migrate
npm run build
npm install -g pm2
pm2 start dist/server/index.mjs --name sparkfeed
pm2 save

If your home server’s local IP is 192.168.1.100, you can access SparkFeed from any device on your network at:

http://192.168.1.100:3000

If you want to access SparkFeed from anywhere, you can deploy it to a VPS (DigitalOcean, Linode, Hetzner, etc.).

# Caddyfile
sparkfeed.yourdomain.com {
reverse_proxy localhost:3000
basicauth * {
youruser JDJhJDE0JG... # bcrypt hash of your password
}
}

Make sure your .env file is configured for production:

DATABASE_URL=./data/sparkfeed.db
PORT=3000
NODE_ENV=production