> ## Content Index
> Fetch the complete content index at: https://blog.fabrixly.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Configure Fabrixly-IDS for First-Time Use
- URL: https://blog.fabrixly.com/how-to-configure-fabrixly-ids-for-first-time-use-3/
- Published: 2026-07-07T14:10:38.000Z
- Updated: 2026-07-07T14:38:27.000Z
- Author: Fabrixly
- Tags: Documentation

## Overview

This guide will walk you through setting up Fabrixly-IDS from scratch!

## Prerequisites

1. Node.js (v18 or later)
2. PostgreSQL database (or use Docker for PostgreSQL)
3. npm or yarn

## Step 1: Clone the Fabrixly-IDS Repository

```bash
git clone <your-fabrixly-ids-repo-url>
cd fabrixly-identity-server

```

## Step 2: Install Dependencies

```bash
npm install
# OR
yarn install

```

## Step 3: Configure Environment Variables

Copy `.env.example` to `.env` and fill in the values!

```bash
cp .env.example .env

```

### Edit `.env` File

Here are the key environment variables you need to set:

```env
# Server
NODE_ENV=development
PORT=3000
HOST=localhost

# Database
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=your-db-password
DB_DATABASE=fabrixly_ids

# JWT & OIDC
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
OIDC_ISSUER=https://ids.fabrixly.com/oidc

# Email (for sending OTPs, magic links)
EMAIL_PROVIDER=smtp  # or sendgrid, etc.
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-smtp-user
SMTP_PASS=your-smtp-password
FROM_EMAIL=noreply@your-domain.com

# SMS (optional, for mobile OTPs)
SMS_PROVIDER=twilio
TWILIO_ACCOUNT_SID=your-twilio-sid
TWILIO_AUTH_TOKEN=your-twilio-token
TWILIO_PHONE_NUMBER=+1234567890

# OTP Settings
OTP_EXPIRY_MINUTES=5
OTP_LENGTH=6

# Session
SESSION_SECRET=your-session-secret-change-this-in-production

# Admin User (created automatically on first run)
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=admin-password-change-this!

# Licensing (optional)
LICENSE_PUBLIC_KEY=
LICENSE_PRIVATE_KEY=

```

## Step 4: Set Up the Database

Option A: Use Docker Compose to run PostgreSQL:

```bash
docker-compose up -d postgres

```

Option B: Use existing PostgreSQL database—make sure DB is created!

## Step 5: Run Database Migrations

```bash
npm run migration:run
# OR
yarn migration:run

```

## Step 6: Start Fabrixly-IDS

```bash
# Development mode (with hot reload)
npm run dev
# OR
yarn dev

# Production mode
npm run build
npm run start

```

## Step 7: Access Fabrixly-IDS

- **OIDC Issuer**: [https://ids.fabrixly.com/oidc](https://ids.fabrixly.com/oidc?ref=blog.fabrixly.com)
- **Admin Console**: [https://ids.fabrixly.com/admin](https://ids.fabrixly.com/admin?ref=blog.fabrixly.com)
- **API Docs**: [https://ids.fabrixly.com/api-docs](https://ids.fabrixly.com/api-docs?ref=blog.fabrixly.com) (if Swagger is enabled)

## Step 8: First Login to Admin Console

Open [https://ids.fabrixly.com/admin](https://ids.fabrixly.com/admin?ref=blog.fabrixly.com) and log in with:

- Email: `ADMIN_EMAIL` from `.env`
- Password: `ADMIN_PASSWORD` from `.env`

## Step 9: Create Your First Organization (Optional, for Multi-Tenant)

If using multi-tenant mode:

1. In Admin Console → go to **Organizations**
2. Click **Create Organization**
3. Fill in org name, subdomain, etc.
4. Save!

## Step 10: Create Your First OIDC Client

1. In Admin Console → go to **Clients**
2. Click **Create Client**
3. Fill in details:
  - Client name: "My First App"
  - Redirect URIs: `http://localhost:3001/callback` (your app's callback URL)
  - Response types: `code`
  - Grant types: `authorization_code`, `refresh_token`
  - Token endpoint auth method: `client_secret_basic`
  - Auth mode: `flexible`
4. Save! Note your client ID and secret!

## Step 11: Test Your Setup

Use the authorization code flow how-to guide to create a test app and test logging in!

## Development Tips

- Hot reload: `npm run dev`
- Run tests: `npm run test`
- Build for production: `npm run build`
- Docker: `docker-compose up`

## Production Checklist

1. **Change all secrets**: JWT\_SECRET, SESSION\_SECRET, ADMIN\_PASSWORD, DB\_PASSWORD!
2. **Use HTTPS**: Always use HTTPS in production!
3. **Secure Database**: Use a strong DB password, restrict network access!
4. **Backups**: Set up regular database backups!
5. **Environment**: Set NODE\_ENV=production!
6. **Email/SMS**: Configure production email/SMS providers!

## Troubleshooting First-Time Setup

- **"Database connection failed"**: Check DB credentials in `.env`!
- **"Migrations failed"**: Make sure database is created and accessible!
- **"Admin user not created"**: Check ADMIN\_EMAIL and ADMIN\_PASSWORD in `.env`!
- **"Can't access admin console"**: Make sure server is running on correct port!

## Next Steps

- Explore the how-to guides for specific authentication modes!
- Set up Fabrixly Licensing Portal for license management!
- Customize branding in Admin Console!