Applications Azure

Frappe Lending on Ubuntu 24.04 on Azure User Guide

| Product: Frappe Lending on Ubuntu 24.04 LTS on Azure

Overview

Frappe Lending is an open-source loan management application built on the Frappe framework and ERPNext. It covers the full lending lifecycle: defining loan products, capturing loan applications, sanctioning and disbursing loans, generating repayment schedules, recording repayments, accruing interest, managing loan security and collateral, handling restructuring and write-offs, and posting the resulting entries into ERPNext's accounts.

Frappe Lending declares ERPNext as a required application, so this image ships the complete ERPNext suite alongside it. The cloudimg image installs the whole stack as a full production deployment - MariaDB, Redis, a Python gunicorn web tier, background workers and a scheduler managed by supervisor, and nginx on port 80 - runs the entire headless install at build time so there is no command-line bootstrap on first use, and rotates the Frappe Administrator password, the site database password and the Frappe encryption key on the first boot of every VM. Backed by 24/7 cloudimg support.

What is included:

  • Frappe Lending v16.4.0 on ERPNext v16.31.1 and Frappe framework version-16, served on port 80 by nginx in front of a gunicorn web worker
  • Python 3.14 and Node.js 24, which Frappe version-16 requires
  • MariaDB on loopback (Barracuda / utf8mb4 / large packets per Frappe), tuned for a small VM
  • Redis for cache, queue and socketio; supervisor managing the Frappe web, worker and schedule processes
  • A neutral starter company with a standard chart of accounts, so the lending module works the moment you sign in
  • A unique Administrator password, site database password and Frappe encryption key generated on first boot, with no default login
  • nginx.service, supervisor.service, mariadb.service and redis-server.service as systemd units, enabled and active
  • 24/7 cloudimg support

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region. Standard_B4ms (4 vCPU / 16 GiB RAM) is the recommended size and matches cloudimg's ERPNext image, because this appliance contains ERPNext. The stack is memory tuned and runs on a Standard_B2s (2 vCPU / 4 GiB RAM) for evaluation, but choose B4ms or larger for production lending workloads and multiple concurrent users. NSG inbound: allow 22/tcp from your management network and 80/tcp for the web interface (front with TLS for public exposure - see Enabling HTTPS).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Frappe Lending by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22) and HTTP (80). Then Review + create -> Create.

Step 2 - Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name frappe-lending \
  --image <marketplace-image-urn> \
  --size Standard_B4ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_rsa.pub \
  --public-ip-sku Standard

Then open the web port:

az vm open-port --resource-group <your-rg> --name frappe-lending --port 80 --priority 900

Step 3 - Connect to your VM

ssh azureuser@<vm-ip>

Step 4 - Confirm the lending stack is running

All four services should report active:

systemctl is-active mariadb redis-server supervisor nginx

Frappe Lending services active on the VM

Frappe answers an unauthenticated health check, and both applications are installed on the site:

curl -s http://127.0.0.1/api/method/ping

Frappe Lending health check and installed apps

Step 5 - Retrieve the Administrator password

Every VM generates its own Administrator password on first boot and writes it to a root-only file. Nothing is shared between deployments and there is no default login.

sudo cat /root/frappe-lending-credentials.txt

Per-VM Frappe Lending credentials file

The file is readable only by root:

sudo stat -c '%a %U:%G %n' /root/frappe-lending-credentials.txt

The per-VM password authenticates while published vendor defaults are rejected, and the lending module is proven working by a real Loan Product and Loan Application round-trip:

Frappe Lending secure by default and lending self-test

Step 6 - Sign in to Frappe Lending

Browse to http://<vm-ip>/ and sign in as Administrator with the password from Step 5.

Frappe Lending sign-in page

After signing in you land on the Frappe desk. Open the Lending workspace at http://<vm-ip>/app/lending.

Frappe Lending workspace

Step 7 - Set up your company

The image ships a neutral starter company named Demo Company with a standard chart of accounts, so the lending module is usable immediately and you can evaluate it without any setup. It contains no transactional data.

For production use, either rename it or create your own:

  • Rename: go to http://<vm-ip>/app/company, open Demo Company, and use Menu -> Rename to set your own legal entity name and abbreviation. Then set your country, default currency and fiscal year on the same form.
  • Create a new company: from the same list choose Add Company, fill in the name, abbreviation, default currency and country, and pick a chart of accounts template. Set it as the default in Global Defaults.

Loan products, applications and loans are all scoped to a company, so make sure the company you intend to use exists before Step 8.

Step 8 - Create a loan product

A Loan Product defines the terms that loans are issued against: interest rate, maximum amount, whether it is a term loan, and the general ledger accounts that disbursements, interest and penalties post to.

Go to http://<vm-ip>/app/loan-product and choose Add Loan Product. Give it a name, select your company, set the rate of interest and maximum loan amount, and select the required accounts from your chart of accounts.

Frappe Lending loan products

Step 9 - Capture a loan application

A Loan Application records a borrower's request against a loan product. Go to http://<vm-ip>/app/loan-application and choose Add Loan Application. Select the applicant type and applicant, pick the loan product from Step 8, enter the requested amount and the repayment method, then save and submit.

Once approved, a Loan Application can be converted into a Loan, which generates the repayment schedule and drives disbursement, repayment and interest accrual.

Frappe Lending loan applications

Step 10 - Verify the lending module from the command line

The image ships a self-test that creates a real Loan Product and Loan Application, reads both back, and removes them again. It is the same check cloudimg runs against the published image, and it is safe to run at any time:

sudo /usr/local/sbin/frappe-lending-selftest.sh

Step 11 - Enabling HTTPS

The image serves plain HTTP on port 80. For anything beyond evaluation, terminate TLS in front of the site. Install certbot and issue a certificate for a DNS name that points at the VM:

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d lending.your-domain.example

Then tell Frappe its public URL so generated links use HTTPS:

sudo -u frappe -H bash -lc "cd /opt/frappe/frappe-bench && bench --site lending.localhost set-config host_name 'https://lending.your-domain.example'"
sudo systemctl restart supervisor

Open 443/tcp in the NSG and restrict 80/tcp to the redirect only.

Step 12 - Maintenance

Check the Frappe process tree:

sudo supervisorctl status

Back up the site (database plus files). Backups are written under the site's private/backups directory:

sudo -u frappe -H bash -lc "cd /opt/frappe/frappe-bench && bench --site lending.localhost backup"

Keep the operating system patched:

sudo apt-get update && sudo apt-get -y upgrade

Restart the application tier after configuration changes:

sudo systemctl restart supervisor && sudo systemctl reload nginx

Troubleshooting

The site does not respond on port 80. Confirm nginx and supervisor are active with systemctl is-active nginx supervisor, then check the Frappe processes with sudo supervisorctl status. Confirm the NSG allows inbound 80/tcp.

Sign-in fails. Re-read the password with sudo cat /root/frappe-lending-credentials.txt. The username is Administrator. There is no default password in this image; each VM generates its own on first boot.

First boot did not complete. Inspect the one-shot service with sudo systemctl status frappe-lending-firstboot.service and sudo journalctl -u frappe-lending-firstboot.service.

A loan document will not save. Loan documents are company-scoped and post to the general ledger, so the loan product must have valid accounts selected for disbursement, interest and penalties. Open the loan product and confirm every account field points at an account belonging to the same company.

Support

cloudimg provides 24/7 support for this image by email at support@cloudimg.co.uk and via live chat, with a one hour average response time for critical issues.

Frappe, ERPNext and Frappe Lending are trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.