Advanced Setup

For advanced customization of the lightning server first clone the lightning repository and install the server

$ git clone
$ cd lightning
$ npm install

and start it with:

$ npm start

This will start the server at http://localhost:3000.

Using Postgres

The default SQLite database should be suitable for development purposes, but in production you may want to use Postgres. To start using Postgres with lightning, do the following:

  • Set the environmental variable NODE_ENV=production and lightning will look for a postgres database to connect to. Alternatively change your database config from sqlite to postgres.
  • Make sure postgres is installed and a server is running. On OSX we recommend using

Then run the following to initialize the database:

$ npm run createdb
$ npm run migrate

Start the lightning server as described above. Lightning will now be running using Postgres.