> For the complete documentation index, see [llms.txt](https://docs.mosip.io/1.2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mosip.io/1.2.0/id-lifecycle-management/identity-management/resident-services/deploy/resident-services-deployment-guide.md).

# Deployment Guide

This guide contains all the information required for successful deployment and running of Resident Portal. It includes information about the Database and template scripts, seed data, roles, OIDC client setup, etc.

## DB scripts

Resident Service DB Scripts to be run: [DB scripts](https://github.com/mosip/resident-services/tree/v1.2.1.0/db_scripts/mosip_resident)

## Master-data Template Scripts

The master-data templates required for the Resident portal are added to the [template](https://github.com/mosip/mosip-data/blob/develop/mosip_master/xlsx/template.xlsx) and [template type](https://github.com/mosip/mosip-data/blob/develop/mosip_master/xlsx/template_type.xlsx) DML excel files in [mosip/mosip-data](https://github.com/mosip/mosip-data/tree/v1.2.1.0) repository. These scripts need to be applied to the corresponding table.

## Keycloak Roles

`mosip-resident-client` needs to have below roles in keycloak:

* `RESIDENT`
* `SUBSCRIBE_AUTH_TYPE_STATUS_UPDATE_ACK_GENERAL`
* `SUBSCRIBE_AUTHENTICATION_TRANSACTION_STATUS_GENERAL`
* `SUBSCRIBE_CREDENTIAL_STATUS_UPDATE_GENERAL`
* `SUBSCRIBE_REGISTRATION_PROCESSOR_WORKFLOW_COMPLETED_EVENT_GENERAL`
* `CREDENTIAL_REQUEST`

### Resident OIDC Client setup

Here is the document which explains how `resident-oidc` partner is onboarded through [partner-onboarder after deployment](https://github.com/mosip/mosip-onboarding/tree/v1.2.0.1).

For more details on how to configure the Resident OIDC client, refer [here](/1.2.0/id-lifecycle-management/identity-management/resident-services/deploy/resident-services-configure-resident-oidc-client.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mosip.io/1.2.0/id-lifecycle-management/identity-management/resident-services/deploy/resident-services-deployment-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
