Skip to main content
Version: 2.0.0 (latest)

Get Started

Let's discover OpenSSO in less than 5 minutes.

Getting Started

OpenSSO is a NodeJS application. Make sure you’ve done already to install the NodeJS server on your server or on your local computer.

A. Requirement

Minimum requirement to install OpenSSO project:

  • NodeJS min v.20.19.0
  • Database [Optional]
  • Redis 3 [Optional]
tip

To make OpenSSO could stable longer,
here is the recommended stacks:

  • NodeJS 20 or higher
  • Database PostgreSQL
  • Redis 7
info
  • The default database is using SQLite, but you can switch to another database like MariaDB, MySQL or PostgreSQL for easy monitoring, maintaining and scaling in the future.
  • The default cache engine is using memory, but you can switch to Redis easily from config file. Using Redis is optional but it will become required if your application working on container service, clustered or behind the proxy load balancer.
Important

Since OpenSSO version 2.0.0, OpenSSO will not to support NodeJS v18 or below.

B. Restore Database [Optional, you can skip this part]

This is optional, OpenSSO using SQLite as default and all features works well with it. You need to setup database if you have a plan to run OpenSSO using MariaDB or MySQL database server. You can skip this if SQLite is enough for you.

  1. Install MariaDB or MySQL. You can search how to install this by using Google search engine.

  2. Create a New Database, then execute or import the file db.mysql.sql located inside directory database into your database.
    See the picture below.

  3. Edit config.js like this below

config.js
  sequelizeOption: {
dialect: 'mariadb', /* one of 'mysql' | 'mariadb' | 'postgres' | 'mssql' */
dbname: 'DATABASE_NAME',
username: 'DATABASE_USER_NAME',
password: 'DATABASE_USER_PASSWORD',
options: {
host: 'DATABASE_HOST_OR_SERVER',
port: 'DATABASE_PORT'
}
// dialect: 'sqlite',
// storage: './database/data.sqlite3'
},
tip
  • If you having trouble with MariaDB, try using dialect mysql.
  • File db.mysql.sql is only works for MariaDB and MySQL only.
  • File db.postgre.sql is only works for PostgreSQL only.
note

Working with MSSQL or Oracle should works too, but we don't create the database structure for it,
so you have to create it by yourself.

But if in some reason you want to play with MSSQL or Oracle,
you have to install this additional package:

  • MSSQL >> npm install tedious
  • Oracle >> npm install oracledb
  1. Done

C. Build App and Run it

You have to build the app for the first time.

  1. Go to the directory path then typing

    npm install
  2. Wait until the process complete.

  3. Then you can run the app by typing

    node server.js

    or by typing

    npm start
  4. Now, Open the url http://localhost:3000.

note
  • There is no default account, so when you're running this application for the first time, you have to register a new account to get the admin role.

Congratulations!

OpenSSO succesfully running in your local computer. If OpenSSO run in your local computer, means it will work too on the live server.

Let's try to learn more deep, you could deploy it later.

What's next?