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 unzip zip make

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 Flask

sudo apt install python3-flask

6) 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/community_edition/main.py
Restart=no

[Install]
WantedBy=multi-user.target

Reload Systemd

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

7) Add crontab to execute step

sudo crontab -e

Add following line to crontab

* * * * * cd /opt/finmars && /usr/bin/python3 community_edition/services/setup.py

And Pull Finmars Images (for faster user insallation

docker pull postgres:13-alpine
docker pull rabbitmq:3.11.3-management
docker pull redis
docker pull certbot/certbot
docker pull nginx
docker pull quay.io/keycloak/keycloak:24.0.3
docker pull finmars/finmars-start-page:latest
docker pull finmars/finmars-excelgen:latest
docker pull finmars/finmars-pdfgen:latest
docker pull finmars/finmars-core:1.23.3-stable
docker pull finmars/finmars-workflow:1.23.0-stable
docker pull finmars/finmars-portal:1.23.0-stable
docker pull finmars/finmars-vue-portal:1.23.0-stable
docker pull finmars/finmars-workflow-portal:1.23.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