# 4.1.2 Install OpenCRVS locally

{% embed url="<https://www.youtube.com/watch?ab_channel=OpenCRVS&feature=youtu.be&v=q-bO42USMUw>" %}

The following instructions will guide you on how to set up a local, demo development environment of OpenCRVS using our fictional country configuration: "Farajaland".

1. Check you have installed all the dependencies in the previous section
2. Clone OpenCRVS Core:

```
git clone git@github.com:opencrvs/opencrvs-core.git
```

3. Navigate inside the core directory

```
cd opencrvs-core
```

4. Ensure that you are on the master branch. The master branch is always aligned to the latest release.

```
git checkout master
```

5. Run the setup command

```
bash setup.sh
```

{% hint style="warning" %}
Do not use **`sudo bash setup.sh`**!

Many Ubuntu developers get into a bad habit of using **sudo** before every command.

The `bash setup.sh` command needs to set folder permissions for Elasticsearch and Docker. If you use sudo, the owner of the /data folder becomes root. You will encounter permissions problems that are hard to debug.
{% endhint %}

This installer script will:

* Test that your dependencies are installed correctly
* Checks that required ports are available. **Note:** MacOS runs AirPlay on port 5000. Mac users need to disable AirPlay in System Preferences in order to run OpenCRVS.
* Download and install all Docker images
* Check out the example OpenCRVS country configuration repository in a directory alongside opencrvs-core: <https://github.com/opencrvs/opencrvs-countryconfig>
* Runs all OpenCRVS Core microservices
* Run the OpenCRVS country configuration repository with test data from our fictional country, "Farajaland" and populate local databases with Farajaland reference data

6\. If there are any missing dependencies the script will exit and display instructions. Once the dependency is satisfied, you can try again.

7\. On completion you will see the OpenCRVS logo

<figure><img src="/files/WAKJnW61d1XJHeyAERy4" alt=""><figcaption></figcaption></figure>

* Open the url [**`http://localhost:3020/`**](http://localhost:3020/)
* You have successfully installed OpenCRVS! 🎉
* Proceed to login using the details in the [section 3.14 Log in to OpenCRVS](/v1.8/setup/3.-installation/3.1-set-up-a-development-environment/3.1.4-log-in-to-opencrvs-locally.md).
* To stop OpenCRVS running in the installer, type **ctrl+c**, then **exit** in each tmux terminal window

<figure><img src="/files/MnTLGodWx1p8lKcoPZRC" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://documentation.opencrvs.org/v1.8/setup/3.-installation/3.1-set-up-a-development-environment/3.1.2-install-opencrvs-locally.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
