Skip to main content

Getting up and running

Start NLX using Docker Compose

Now we have prepared all the requirements to run NLX, we can start all components using Docker Compose.

Next to the certificates you created in retrieve a demo certificate you also need certificates from an internal PKI to encrypt traffic between NLX components (such as the Management API and the Inway). The demo already has a working PKI so you don't have to set this up yourself.

First, let's clone the NLX project. It contains the Docker Compose file and its dependencies.

git clone https://gitlab.com/commonground/nlx/nlx-try-me.git

After the repository is cloned, move into it:

cd nlx-try-me

Set the hostname of the Inway (where my-organization.nl:8443 should be replaced with your own hostname).

export INWAY_SELF_ADDRESS="my-organization.nl:8443"

The NLX components will print warning messages when the private keys file permissions are too lenient, to prevent these warning messages we need to set the proper permissions.

chmod 600 ../org.key ./pki/certs/management-api.try-me.nlx.local-key.pem

Then, start all components by running:

docker-compose up -d

This will start PostgreSQL and the required NLX components.

The NLX components are configured using environment variables which in this guide are set in docker-compose.yml.

Let's create a user, so we can access NLX Management:

docker-compose exec api nlx-management-api create-user --email admin@nlx.local --password=development --role admin

The username is admin@nlx.local and the password is development. Feel free to use the credentials you prefer.

At last, let's verify if all the components are up and running:

docker-compose ps

It might take a while for all components to become healthy. If after a while one or more components are not running, you can inspect the logs for any errors.

Access the Management UI

You can access the Management UI by opening http://localhost:8080 in your browser. When you do you should see the login screen:

Login screen

You can login with the demo credentials:

Management UI overview

On the left you will find the main navigation which separates the UI in several pages:

  • Inways: Lists all available inways.
  • Services: Shows a list of your services. You can also register new services here.
  • Directory: Lists all available services in the demo directory. This is also the place where you can request access to another service.
  • Settings: Shows all global settings.
  • Finance: Download financial information about the usage of your services.
  • Logs: Lists the audit logs for your NLX installation.

Overview

Set the organization inway

In order to receive Access Requests and send/receive Orders, you have to set a default inway for your organization. You can do that by going to the settings page, selecting the "Inway-01" and clicking on "Save settings".

In the Docker Compose file we have started, access requests can be accepted by the inway on port 8444. Make sure that port is publicly accessible.

Settings screen

Transaction log

The transaction log is also included with this setup. For every request made through your outway or inway, a record is created in the transaction log. To view the content of the transaction log run the following command:

docker-compose exec postgres psql -U postgres -d nlx_txlog -c "select * from transactionlog.records;"

In sum

So far we have:

  • Started all components using Docker Compose
  • Logged in to the Management UI
  • Set a default organization inway