Skip to content

Installation

Prerequisites

  • Node.js 20 LTS or newer
  • Git

Quick start

  1. Clone the repository

    Terminal window
    git clone https://github.com/mfried40/kiosk-admin.git
    cd kiosk-admin/kiosk-admin
  2. Install dependencies

    Terminal window
    npm install
  3. Create your .env file

    Terminal window
    cp .env.example .env

    Then edit .env and fill in at minimum:

    AUTH_SECRET=<random 32+ character string>
    AUTH_URL=http://localhost:3000
    ENCRYPTION_SECRET=<64 hex characters>

    Generate ENCRYPTION_SECRET with:

    Terminal window
    node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
  4. Set up the database

    Terminal window
    npx prisma migrate dev

    This creates a local dev.db SQLite file. No external database required.

  5. Start the server

    Terminal window
    npm run dev

    Open http://localhost:3000/setup to create your first admin account.

Production build

Terminal window
npm run build
npm start

Using PostgreSQL or MongoDB

Set these environment variables before running migrations:

DATABASE_PROVIDER=postgresql
DATABASE_URL=postgresql://user:password@localhost:5432/kiosk_admin

For MongoDB:

DATABASE_PROVIDER=mongodb
DATABASE_URL=mongodb://localhost:27017/kiosk_admin

Then run npx prisma db push (MongoDB) or npx prisma migrate dev (PostgreSQL) instead.

See Database configuration for more details.