Skip to main content

Install Finmars Platform


Here’s a very simple guide to install Finmars on your Ubuntu VM:

  1. Connect to your VM
    Example:
    ssh -i /path/to/finmars-key.pem ubuntu@<Public-IP>
  2. Install Docker
    sudo apt update
    sudo apt install -y ca-certificates curl gnupg lsb-release
    
    wget -qO- https://get.docker.com/ | sh
    
    sudo usermod -aG docker $USER
    newgrp docker
  3. Install Make
    sudo apt install -y make git
  4. Create the finmars folder
    sudo mkdir -p /opt/finmars
    sudo chown $USER:$USER /opt/finmars
  5. Clone the Finmars repo
    cd /opt/finmars
    git clone https://github.com/finmars-platform/finmars-community-edition.git .
  6. Configure env
    cp .env.sample .env
    vim .env
  7. Example .env
    You need to provide your Domain Name and generate Secret Keys
    REALM_CODE=realm00000 # core, workflow
    BASE_API_URL=space00000 # core, workflow
    SECRET_KEY=95y44d72kuij7210f # core, workflow, authorizer, YOUR_RANDOM_STRING
    JWT_SECRET_KEY=wnfgd1gye01znren # core, authorizer, YOUR_RANDOM_STRING
    ENCRYPTION_KEY=10ssrkajtvuvk3ipt # core, workflow, YOUR_RANDOM_STRING
    
    DOMAIN_NAME=finmars.example.com # core, workflow, authorizer
    CSRF_COOKIE_DOMAIN=finmars.example.com # core, workflow
    CSRF_TRUSTED_ORIGINS=finmars.example.com # core, workflow, authorizer
    
    PROD_APP_HOST=https://finmars.example.com # vue-portal, workflow-portal
    APP_HOST=https://finmars.example.com # vue-portal, workflow-portal
    PROD_API_HOST=https://finmars.example.com # vue-portal, workflow-portal
    API_HOST=https://finmars.example.com # portal, vue-portal, workflow-portal
    AUTHORIZER_URL=https://finmars.example.com # portal, core, workflow
    
    KEYCLOAK_REALM=finmars
    KEYCLOAK_SERVER_URL=https://finmars-auth.example.com
    KEYCLOAK_URL=https://finmars-auth.example.com
    PROD_KEYCLOAK_URL=https://finmars-auth.example.com
    
    NUXT_APP_BASE_URL=/ # vue-portal, workflow-portal
    
    DB_HOST=172.17.0.1 # core, workflow, authorizer
    DB_PORT=5432 # core, workflow
    DB_USER=postgres # core, workflow
    DB_PASSWORD=postgres # core, workflow, authorizer
    
    RABBITMQ_HOST=rabbitmq # core, workflow
    
    REDIS_HOST=redis # core
    
    LOCAL=1 # core, workflow, authorizer
    SERVER_TYPE=local # core, workflow, authorizer
    DEBUG=True # core, workflow, authorizer
    USE_DEBUGGER=True # authorizer
    DJANGO_LOG_LEVEL=DEBUG # core, workflow, authorizer
    PROFILER=False # core, workflow
    ENABLE_DEV_DOCUMENTATION=False # core
  8. Run database migrations
    make migrate
  9. Start all services
    make up