Local Setup
This is the docker-compose setup to run mimoto which act as BFF for Inji Wallet and backend for Inji web. This docker compose setup is intended only for local use and not for production deployment.
What is in the docker-compose folder?
certsfolder holds the p12 file which is created as part of OIDC client onboarding.configfolder holds the mimoto system properties file, issuer configuration and credential template.docker-compose.ymlfile with the mimoto setup.
How to run this setup?
Prepare the environment:
The
docker-composefolder'sconfigdirectory holds the configuration files Mimoto needs to act as BFF for Inji Wallet.Create a
certsfolder in thedocker-composedirectory and add the OIDC client certificate (see below).Update the configuration files:
mimoto-issuers-config.json— add identity providers as issuers. See Credential Providers for how to structure each entry.mimoto-trusted-verifiers.json— add the verifiers' clientId, redirect and response URIs, for Verifiable Credential Online Sharing.Update the Esignet host reference in
mimoto-default.properties(orapplication-local.propertiesif running Mimoto via IDE).Set the
oidc_p12_passwordenvironment variable indocker-compose.ymlto match the password used foroidckeystore.p12.
Create an OIDC client and generate
oidckeystore.p12, placed inside thecertsfolder. Follow Credential Providers for this process.Update
mimoto-issuers-config.jsonwith theclient_idandclient_aliasfrom your OIDC onboarding.
If you're only running Inji Wallet (mobile), do this before starting the services: remove the
datashareandminioservices fromdocker-compose.yml(and thedatasharedependency frommimoto-service'sdepends_on), and setqr_code_typeto"EmbeddedVC"for all issuers inmimoto-issuers-config.json. This also means you don't need to pull the datashare/minio images at all.[Optional] Configure Google OAuth Client Credentials
Only needed for Mimoto's own "Login with Google" feature — not required to run Inji Wallet locally.
docker-compose.ymlships with working placeholder values, so this can be skipped for a wallet-only setup.If you do need it, refer to How to create Google Client Credentials below, then add the generated credentials to
docker-compose.yml:environment: - GOOGLE_OAUTH_CLIENT_ID=<your-client-id> - GOOGLE_OAUTH_CLIENT_SECRET=<your-client-secret>
Start the services:
docker-compose upUse the
-dflag to run in detached (background) mode.Stop the services:
docker-compose downTo stop and remove a single service:
docker-compose stop <service_name>thendocker-compose rm <service_name>.Removing the Docker Volume: if you update
oidckeystore.p12, Mimoto may fail to start — the new file won't contain the keys already stored in the database's key alias table, and their absence breaks encryption/decryption. Fix it by clearing the stale data:docker volume rm docker-compose_postgres-dataAccess APIs as:
http://localhost:8099/v1/mimoto/allPropertieshttp://localhost:8099/v1/mimoto/issuershttp://localhost:8099/v1/mimoto/issuers/{issuer-id}http://localhost:8099/v1/mimoto/issuers/{issuer-id}/well-known-proxy
How to create Google Client Credentials
To enable Google OAuth2.0 authentication, follow these steps:
Go to the Google Cloud Console: Visit Google Cloud Console.
Create a New Project: If you don't already have a project, create one from the project dropdown.
Enable the OAuth Consent Screen: "APIs & Services" > "OAuth consent screen". Select "External" and configure the required fields. Save.
Create OAuth 2.0 Credentials: "APIs & Services" > "Credentials" > "Create Credentials" > "OAuth 2.0 Client IDs" > "Web application".
Authorized JavaScript Origins:
http://localhost:8099Authorized Redirect URIs:
http://localhost:8099/v1/mimoto/oauth2/callback/googleSave and Retrieve Client Credentials: you'll receive a
Client IDandClient Secret— add them todocker-compose.ymlas shown in step 3 above.
Inji Mobile Wallet Configuration
Set the eSignet host Mimoto should use — update mosip.esignet.host in mimoto-default.properties (or application-local.properties if running Mimoto via IDE) to point to the eSignet instance for your target environment:
Then point your local Inji Wallet build at this Mimoto instance — set MIMOTO_HOST to your ngrok URL (not localhost) in the wallet app's .env file (see Setup → Command to build the application).
Note:
For local env use ngrok.
Replace
http://localhost:8099by the ngrok public domain at the following places:token_endpointinmimoto-issuers-config.jsonmosipbox.public.url,mosip.api.public.urlinmimoto-default.properties
After editing
mimoto-issuers-config.json, restartnginxthenmimoto-servicefor the change to take effect
Last updated
Was this helpful?