# Open Source

Ensure you have JDK 11 or newer, Maven 3.5.4 or newer, and Git installed.

First clone the Morgana repository:

```sh
git clone https://github.com/MorganaToken/morgana-core.git
cd morgana-core
```

&#x20;To build morgana run:

```sh
mvn clean install
```

This will build all modules and run the testsuite.

To build the ZIP distribution run:

```sh
mvn clean install -Pdistribution -Dmaven.test.skip
```

Once completed you will find distribution archives in `morgana-core/quarkus/dist.`

To start Morgana from the server distribution first build the distribution it as specified above, then run:

```sh
tar xfz morgana-core/quarkus/dist/target/keycloak-<VERSION>.tar.gz
cd keycloak-<VERSION>
bin/kc.sh start-dev
```

To stop the server press `Ctrl + C`.
