ForgeOpenPlatform
en

OpenPlatform

Install OpenPlatform with Node.js and PostgreSQL, Docker or Docker Compose

OpenPlatform · openplatform@5 openplatforminstalldockerpostgresql

OpenPlatform needs the latest Node.js and a PostgreSQL database. There are three ways to start it, all from the README of the repository. Do not run database.sql yourself: OpenPlatform uses that script internally on the first start.

By hand

  1. Install Node.js and PostgreSQL and create an empty database for OpenPlatform.
  2. Download the source code.
  3. Install the dependencies in the root of the application:
npm install
  1. Put the connection string in the file config (the file has the line database : postgresql://user:pass@localhost:5432/database as a model, and a line database (env) : DATABASE that reads it from the environment variable DATABASE).
  2. Start it (the start script of package.json runs node index.js 8000):
node index.js
  1. Open http://127.0.0.1:8000 and, before anything else, open the settings and configure the platform (the README marks this step as important; the settings are in settings and database).

Docker Hub

docker pull totalplatform/openplatform
docker run --env DATABASE='postgresql://user:pass@hostname/database' -p 8000:8000 totalplatform/openplatform

Docker Compose

git clone https://github.com/totaljs/openplatform.git
cd openplatform
docker compose up

What the first start does

When the database has no OpenPlatform tables yet (it looks for the table cl_config in the schema op), the application loads database.sql, replacing its placeholders with values it generates: the identifier of the installation, the cookie name, the secrets and salts, the tokens, and the first user and group. It then loads the configuration and starts the authentication (definitions/init.js). With the environment variable DATABASE (Docker) it waits three seconds before this, so that the database can be up. In both cases the server is paused (PAUSESERVER('Database')) until the database is ready.

The first sign-in

The README gives the default account:

login : info@totaljs.com
password : admin

Sign in, change that password (the portal has the account action for it) and configure the settings. Remember the rule of the README: every application that you add must be assigned to a group, or nobody sees it (groups and permissions).