# Install Finmars Platform

#### Here is a Full Guide to install Finmars on your Ubuntu VM:

Complete time of full installation is less than 30 minutes, by the end of it you will get a Finmars Platform Installed on your Linux Server

1. ****Connect to your VM****  
    Example:  
    ```
    # if this first connect 
    chmod 400 finmars-platform-vm.pem
    
    ssh -i ./finmars-platform-vm.pem ubuntu@<Public-IP>
    
    # if this first connect
    # Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    # yes
    ```
2. ****Install Docker****  
    ```bash
    sudo apt update
    sudo apt install -y ca-certificates curl gnupg lsb-release ntp
    
    wget -qO- https://get.docker.com/ | sh
    
    sudo usermod -aG docker $USER
    newgrp docker
    ```
    
    To check if Docker installed:  
    `<span class="editor-theme-code">docker version</span>`  
    Should output:  
    ```
    Client: Docker Engine - Community
     Version:           28.2.2
    ...
    ```
3. ****Install Make****  
    ```bash
    sudo apt install -y make git
    ```
4. ****Create the finmars folder****  
    ```bash
    sudo mkdir -p /opt/finmars
    sudo chown $USER:$USER /opt/finmars
    ```
5. ****Clone the Finmars Platform Community Edition repository from Github****  
    See [https://github.com/finmars-platform/finmars-community-edition](https://github.com/finmars-platform/finmars-community-edition) repository  
    ```bash
    cd /opt/finmars
    git clone https://github.com/finmars-platform/finmars-community-edition.git .
    ```
6. ****Create Storage folder****  
      
    ```bash
    mkdir ./storage
    sudo chown -R 1000:1000 ./storage
    ```
7. ****Configure env****  
    ```bash
    make generate-env
    ```
8. ****(Optional) Check created env** `<strong class="editor-theme-bold editor-theme-code">cat .env</strong>`**  
    ```bash
    REALM_CODE=realm00000
    BASE_API_URL=space00000
    SECRET_KEY=2e849ee2
    JWT_SECRET_KEY=f0d51adba17320c742fb1f046122ce1a8e22ca679bf7c7df28aa873ed5ca3d7a
    ENCRYPTION_KEY=a594c6607a48629884753fe0a6b5a907c6d8be8d63e4c274c67be040c276b1c4
    
    DOMAIN_NAME=ap-finmars.finmars.com
    CSRF_COOKIE_DOMAIN=ap-finmars.finmars.com
    CSRF_TRUSTED_ORIGINS=https://ap-finmars.finmars.com
    
    PROD_APP_HOST=https://ap-finmars.finmars.com
    APP_HOST=https://ap-finmars.finmars.com
    PROD_API_HOST=https://ap-finmars.finmars.com
    API_HOST=https://ap-finmars.finmars.com
    
    KEYCLOAK_REALM=finmars
    KEYCLOAK_SERVER_URL=https://ap-finmars-auth.finmars.com
    KEYCLOAK_URL=https://ap-finmars-auth.finmars.com
    PROD_KEYCLOAK_URL=https://ap-finmars-auth.finmars.com
    
    NUXT_APP_BASE_URL=/
    
    DB_HOST=db
    DB_PORT=5432
    DB_NAME=finmars_dev
    DB_USER=finmars_dev
    DB_PASSWORD=e21717b7ba0d4287dcdc292edc3c2164
    
    KC_DB_URL_HOST=db_keycloak
    KC_DB_PORT=5432
    KC_DB_USERNAME=keycloak
    KC_DB_PASSWORD=5de8131f84d79b68ba47d25a922dae92
    KC_DB_URL_DATABASE=keycloak
    
    RABBITMQ_HOST=rabbitmq
    
    REDIS_HOST=redis
    
    USE_FILESYSTEM_STORAGE=True
    
    SERVER_TYPE=local
    DEBUG=False
    USE_DEBUGGER=False
    DJANGO_LOG_LEVEL=INFO
    PROFILER=False
    ENABLE_DEV_DOCUMENTATION=False
    
    EDITION_TYPE=community
    
    ADMIN_USERNAME=test
    ADMIN_PASSWORD=test
    REDIRECT_PATH="/realm00000/space00000/a/#!/dashboard"
    
    MAIN_DOMAIN_NAME=ap-finmars.finmars.com
    AUTH_DOMAIN_NAME=ap-finmars-auth.finmars.com
    ```
9. ****Release certs****  
    ```bash
    make init-cert
    ```
    
    You should see something like this as successful result:  
    [![Screenshot 2025-06-11 at 20.37.55.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-20-37-55.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-20-37-55.png)
10. ****Init keycloak****  
    ```bash
    make init-keycloak
    ```
    
    You should see something like this as successful result:  
    [![Screenshot 2025-06-11 at 20.39.07.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-20-39-07.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-20-39-07.png)
11. ****Run database migrations****  
    ```bash
    make migrate
    ```
    
    You should see something like this as successful result:  
    [![Screenshot 2025-06-11 at 20.54.27.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-20-54-27.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-20-54-27.png)
12. ****Start all services****  
    ```bash
    make up
    ```
    
    You should see something like this and other logs as successful result:  
      
    [![Screenshot 2025-06-11 at 21.03.52.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-03-52.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-21-03-52.png)

<span style="white-space: pre-wrap;">To Verify that is everything running </span>

`<span class="editor-theme-code">docker ps</span>`

And you should see something like:

[![Screenshot 2025-06-11 at 21.08.45.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-08-45.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-08-45.png)

It means all the Docker Containers are running.

---

<span style="white-space: pre-wrap;">When all is done, you can Open Web Browser at </span>****finmars.example.com**** and you should see ****Finmars Welcome Page****

[![Screenshot 2025-06-11 at 21.11.43.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-11-43.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-21-11-43.png)

<span style="white-space: pre-wrap;">After you press </span>****Login****<span style="white-space: pre-wrap;"> you will be redirected to </span>****Finmars Single-Sign-On****<span style="white-space: pre-wrap;"> (SSO) to </span>****finmars-auth.example.com****

[![Screenshot 2025-06-11 at 21.18.15.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-18-15.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-18-15.png)

<span style="white-space: pre-wrap;">Login with your Credentials that you provided in 6) </span>****Configure env****<span style="white-space: pre-wrap;"> step. It should be yours </span>`<span class="editor-theme-code">ADMIN_USERNAME</span>`<span style="white-space: pre-wrap;"> and </span>`<span class="editor-theme-code">ADMIN_PASSWORD</span>`

<span style="white-space: pre-wrap;">After Login you will be redirected to </span>****Dashboard page****<span style="white-space: pre-wrap;"> in </span>****Finmars Platform****

[![Screenshot 2025-06-11 at 21.52.33.png](https://docs.finmars.com/uploads/images/gallery/2025-06/scaled-1680-/screenshot-2025-06-11-at-21-52-33.png)](https://docs.finmars.com/uploads/images/gallery/2025-06/screenshot-2025-06-11-at-21-52-33.png)

<span style="white-space: pre-wrap;">Congratulations you finished your </span>****Finmars Platform****<span style="white-space: pre-wrap;"> Installation </span>****Successfully****! Well Done!  
  
<span style="white-space: pre-wrap;">Get to know our </span>[User Quick Start](https://docs.finmars.com/books/user-quick-start)<span style="white-space: pre-wrap;"> guide for next steps</span>

If you have some troubles during Installation - reach for any support channel:

- <span style="white-space: pre-wrap;">Create a </span>[Github Issue](https://github.com/finmars-platform/finmars-core/issues/new)
- <span style="white-space: pre-wrap;">Join our </span>[Discord](https://discord.gg/dJFxjwKQet)<span style="white-space: pre-wrap;"> Server</span>
- <span style="white-space: pre-wrap;">Contact us at </span><support@finmars.com>  
    <span style="white-space: pre-wrap;"></span>