I would like to install and customise The Pre-Registration Module independently on my machine thus consuming the services from Collab


I previously filed in a form for MOSIP Collab environment variables request and submitted to your team on 11th August 2023, however, i have not received any response


My requirement is to install and customize The Pre-Registration Module independently on my machine thus consuming the services from Collab.


I am new to mosip and have been a taking lessons from the Mosip Academy, I would like to practice and sharpen my understanding in how mosip works and can build services and customizations on top of pre-existing MOSIP modules


The requirements for installation of the MOSIP infrastructure are very high and apparently I cannot afford to run such in my local setup that is why I thought I could have separate modules running so that I can customize basing on pre-existing installations on Collab

Your guidance shall be greatly appreciated

@Rounak Nayak Who deals with Collab?

@Suraj S ?

Thank you @Krish for the response, any guidance shall be highly appreciated

Humble greetings community.
Can any one help me with guidance on this issue?

Hi @axoblade

As I can see you are looking at installing pre-reg in your system and consuming services from Collab.

To start with a basic overview about MOSIP do check this out:



To get an overview about the Pre Registration module, please check the user guide and video from here:


Pre-registration User Guide

If you wish to setup Pre Registration module locally then follow below steps:

Check if you can access the https://collab.mosip.net environment.
You can use the URL’s(for other MOSIP services like KeyManager, MasterData etc)) pointing to this environment when you setup Pre Reg locally.

Setup Steps:
All steps are given here:


Pre-registration Developers Guide

Will be happy to help you out if you face any issues in the above steps and incase if you have already followed these steps let us know where is the issue coming so our team can look at it and provide solution to you.

Best Regards,

Thank you for the response, let me retry and share where I am stuck with screenshots

Yes @axoblade that would be great and give us a clear idea where you are going wrong.

Dear @sanchi-singh24 the documentations shared earlier has been very helpful in installing the pre-registration services and UI,
However, the next question is how do i get to connect them to work together, as the pre registration UI is running and the Pre registration is running too seperately.
Is there a way to make them work together?

Dear @axoblade

Thanks for letting us know that documentation helped you out to setup pre-reg , one of our team member is checking this out to provide you the easiest way possible and provide a configuration to run pre-reg UI & pre-reg together.

Best Regards,

Dear @sanchi-singh24

I would be glad if the configuration of the pre-reg service and pre-reg UI to run as locally connected services is shared

Dear @axoblade

You will be able to find the solution in this document - Pre-registration Developers Guide - MOSIP Docs 1.2.0

Refer - Point 14 & Using the Angular CLI proxy solution to get around CORS issue in the above-given doc.

To run the pre-registration-application-service locally without config server , update values in application.properties and bootstrap.properties:

  • spring.cloud.config.uri=https://localhost:8080

  • spring.cloud.config.label=develop

  • spring.cloud.config.name=pre-registration

  • spring.application.name=pre-registration-application-service

  • spring.profiles.active=default Point below urls to a valid env which has MOSIP setup:

  • mosip.base.url=https://yourenvurl

  • auth-token-generator.rest.issuerUrl:https://iam.yourenvurl/auth/realms/mosip

  • javax.persistence.jdbc.password: XXXXXX

  • javax.persistence.jdbc.url=jdbc:postgresql://yourenvurl:5432/mosip_prereg

  • mosip.batch.token.authmanager.password: XXXXXX

  • mosip.iam.adapter.appid=prereg

  • mosip.iam.adapter.clientsecret=XXXXXX

  • auth.server.admin.issuer.uri=https://iam.yourenvurl/auth/realms/

Using the Angular CLI proxy solution to get around CORS issue

  1. Update the API services BASE_URL in config.json :
  • config.json is found inside assets directory.

  • E.g.: C:\MOSIP\pre-registration-ui\pre-registration-ui\src\assets\config.json


“BASE_URL”: “https://localhost:4200/proxyapi/”,

“PRE_REG_URL”: “preregistration/v1/”


2.Create a new file named proxy.conf.json :

Location should be in C:\MOSIP\pre-registration-ui\pre-registration-ui\proxy.conf.json project folder.


“/proxyapi”: {

“target”: “https://{env}/”,

“secure”: true,

“changeOrigin”: true,

“pathRewrite”: {

“^/proxyapi”: “”




3.Start the server by executing ng serve --proxy-config proxy.conf.json --ssl true .

4.Open the browser, load the app with https://localhost:4200 .

Check out these steps and if still the issue persists let us know we provide a different way forward.

Best Regards,

Dear @sanchi-singh24

After running the following command:
sudo java -jar pre-registration-application-service-

I have the following error:

Dear @axoblade

This command will not work directly, few runtime dependencies are there.

You need to add them in the build path in your IDE and launch the run “PreRegistrationApplication.java” from IDE runtime dependencies: kernel-auth-adapter, etc as in this screenshot given below:

Let me know if this is working out for you!

Best Regards,

Dear @sanchi-singh24

I added all required jars to the different projects and the build was successful however I can not run the service when I run the built jar file


Instead of running the jar file from cmd prompt:
java -jar pre-registration-application-service-

Run the “PreRegistrationApplication.java” from IDE directly.

Hope this works for you.
~ Mayura

1 Like

Hello, I have been following this thread,
I added the runtime dependences as the screenshot below

and run PreRegistrationApplication.java as screenshot below,

but i get the following errors after running PreRegistrationApllication.java

here below are my bootstap.properties profile.

Kindly guide me out of the errors obove. thanks indvance.

Hi @Rukumbyana

We can see from attached logs that you are getting connection error to Postgresql. Can you please check the relevant postgresql properties in pre-reg default properties.
ie: javax.persistence.jdbc.url

Best regards,

1 Like