Skip to main content

Start the App

This page explains how to start Sparrow Home on your home server.

First, clone the repository from git and navigate to the project root:

git clone git@github.com:sparrow-codes/sparrow-home.git

then:

cd sparrow-home

Instead of running separate npm scripts, you only need to:

  1. Add configuration files in the project root:
    • .env — backend environment variables
nano .env
  1. Fill below content in .env file:
mode='production'
timeZone=

dbUserName=
dbPassword=
dbName=

jwtSecret=
jwtExpiry=

pushPublicKey=
pushPrivateKey=
pushAdminEmail=

zigbeeSerialPort=
zigbeeAdapter=


# Optional for Tailscale VPN access - set your domain name here if you are using Tailscale and want to access the app via DNS instead of IP address
tailscaleDomain="
VariableDescription
modeApplication run mode. Use production for a production server.
timeZoneTime zone for Sparrow Home system (e.g., Europe/Warsaw).
dbUserNameDatabase username used to connect to the application's database.
dbPasswordPassword for the database user. Keep this secret.
dbNameName of the database to use for the application.
jwtSecretSecret key used to sign JSON Web Tokens (must be kept secret).
jwtExpiryToken expiration duration (e.g., 1h, 7d) or timestamp.
pushPublicKeyVAPID public key for Web Push notifications.
pushPrivateKeyVAPID private key for Web Push notifications (keep secret).
pushAdminEmailContact email used in VAPID claims (e.g., admin@example.com).
zigbeeSerialPortSerial port path for the Zigbee adapter (e.g., /dev/serial/by-id/USB-someName). Please check Zigbee docs
zigbeeAdapterAdapter type or driver for Zigbee integration (e.g., zstack, deconz).
tailscaleDomainYour domain name, if you are connecting to Tailscale VPN - make sure it mathes your DNS.
  1. Start all services with Docker Compose:
docker compose -f docker-compose.yaml -p docker up -d

This will start required infrastructure services (database, MQTT broker, Zigbee) and the application containers defined in docker-compose.yml. After startup, open http://yourServerIpAddress or https://yourTailscaleDomain