Deployment guide

Frappe Lending

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 SecureAnyCloud 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) run behind nginx on port 80. The entire headless install runs at build time, so there is no command-line bootstrap on first use. The first boot of every VM rotates the Frappe Administrator password, the site database password and the Frappe encryption key.

What you get:

  • 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 SecureAnyCloud support

Prerequisites

Before you deploy, make sure you have:

  • An active Azure subscription
  • An SSH key pair
  • A VNet and subnet in the target region
  • NSG inbound rules that allow 22/tcp from your management network and 80/tcp for the web interface. Front the site with TLS for public exposure (see Enabling HTTPS).

Standard_B4ms (4 vCPU / 16 GiB RAM) is the recommended size and matches SecureAnyCloud'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. Choose B4ms or larger for production lending workloads and multiple concurrent users.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Frappe Lending by SecureAnyCloud, 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 select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:frappe-lending-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name frappe-lending \
  --image sac1647283583153:frappe-lending-ubuntu-24-04:default:latest \
  --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

Confirm that all four services report active:

systemctl is-active mariadb redis-server supervisor nginx

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

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

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

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. A real Loan Product and Loan Application round trip proves that the lending module works:

Step 6 - Sign in to Frappe Lending

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

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

Step 7 - Set up your company

The image ships a neutral starter company named Demo Company with a standard chart of accounts. The lending module is usable immediately, and you can evaluate it without any setup. The company 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 the new company 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. These are the interest rate, the 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.

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, and 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. The Loan generates the repayment schedule and drives disbursement, repayment and interest accrual.

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. SecureAnyCloud runs the same check 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 that 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 to 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, and 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

SecureAnyCloud provides 24/7 support for this image by email at sales@secureanycloud.com and through 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.

Deploy on Azure

Launch Frappe Lending on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure