Skip to main content

Getting Started


1) Request VM with Ubuntu 24.04

2) Install required packages

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

3) Create Finmars Folder

sudo mkdir -p /opt/finmars
sudo chown $USER:$USER /opt/finmars

4) Clone Finmars Community Edition

cd /opt/finmars
git clone https://github.com/finmars-platform/finmars-community-edition.git .

5) Install Make

sudo apt install -y make git

6) Install Flask

sudo apt install python3-flask

7) Create systemd service

sudo vim /etc/systemd/system/init-setup.service

Paste following content

[Unit]
Description=Finmars Initial Setup
After=network.target

[Service]
WorkingDirectory=/opt/finmars
ExecStart=/usr/bin/python3 /opt/finmars/init-setup.py
Restart=no

[Install]
WantedBy=multi-user.target

Reload Systemd

sudo systemctl daemon-reload
sudo systemctl enable init-setup
sudo systemctl start init-setup

8) Add crontab to execute step

sudo crontab -e

Add following line to crontab

* * * * * cd /opt/finmars && /usr/bin/python3 init-setup.py --run-step

docker pull postgres:13-alpine
docker pull rabbitmq
docker pull redis
docker pull certbot/certbot
docker pull nginx
docker pull quay.io/keycloak/keycloak:24.0.3

And Pull Finmars Images (for faster user insallation)

docker pull finmars/finmars-core:1.21.0-22.1-stable
docker pull finmars/finmars-workflow:1.21.22.0-stable
docker pull finmars/finmars-start-page:1.21.22.0-stable
docker pull finmars/finmars-portal:1.21.22.0-stable
docker pull finmars/finmars-vue-portal:1.21.22.0-stable
docker pull finmars/finmars-workflow-portal:1.21.22.0-stable

When All done you need to remove keys and logout

sudo rm /home/ubuntu/.ssh/authorized_keys
sudo rm /root/.ssh/authorized_keys

You need to logout and proceed to AWS ec2 console, you need to export AMI template to us-east-1 region

Select your ec2 VM, go to Actions -> Images and Templates -> Create Image
Then wait until your AMI Exported (Go to https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1)

After that you need to make your AMI public - Edit AMI Permissions (right click on ami row) - AMI availability - Public
Then go to AWS Marketplace and proceed with publishing new version

Go to https://aws.amazon.com/marketplace/management/products/server