Local Setup
Make sure the following tools are installed on your machine:
- Node.js (LTS recommended)
- Docker and Docker Compose
- Git
No global installation of databases, MQTT brokers, or Zigbee tooling is required outside Docker.
Installing locally (for development)
To install Sparrow Home locally, first clone the repository:
git clone https://github.com/sparrow-codes/sparrow-home.git
Then install the dependencies:
cd sparrow-home
npm install
This configuration is for local development only. Do not use it in production.
A configuration file is required to run Sparrow Home locally in development mode:
.envfor the backend (NestJS)
It is environment-specific and will not be added to version control. You can use the provided example files as a starting point.
Backend Configuration
Backend configuration is read from:
apps/server/.env
example file:
mode='development'
dbHost=localhost
dbPort=5432
dbUserName=sparrow
dbPassword=sparrow
dbName=sparrow_home
jwtSecret=REPLACE_WITH_RANDOM_STRING
jwtExpiry=5d
mqttUrl=mqtt://localhost:1883
Start the application locally
For convenience, a docker-compose.yaml file is provided to start the application locally.
docker compose -f ./docker-local/docker-compose.yaml -p docker up -d
Run frontend:
npx nx run sparrow-home-mobile:serve:development
Run backend:
npx nx run server:serve:development
You now have a fully functional Sparrow Home installation running locally. Go to http://localhost:4200 to see the application.