Erpnext S3 Integration
ERPNext S3 Integration is a Frappe app by Solufy that stores ERPNext attachments and backups in S3-compatible object storage.
- Author: Solufy-ERPNext-Apps
- Repository: https://github.com/Solufy-ERPNext-Apps/erpnext_s3_integration
- GitHub stars: 4
- Forks: 5
- License: MIT
- Category: Integrations
- Maintenance: Actively Maintained
- Frappe versions: develop, v16
Install Erpnext S3 Integration
bench get-app https://github.com/Solufy-ERPNext-Apps/erpnext_s3_integration
Add the Frappe Gems badge to your README
Maintain Erpnext S3 Integration? Paste this into your README:
[](https://frappegems.com/gems/apps/Solufy-ERPNext-Apps/erpnext_s3_integration)
About Erpnext S3 Integration
ERPNext S3 Integration
ERPNext S3 Integration is a Frappe app by Solufy that stores ERPNext attachments and backups in S3-compatible object storage.
It supports AWS S3 and compatible providers such as MinIO, keeps existing S3-backed files accessible inside ERPNext, and provides a settings-driven workflow for file migration and backup sync.
Features
- Store new ERPNext
Fileattachments in S3 instead of the local filesystem. - Open S3-backed files inside ERPNext through a secure application route.
- Support both direct streaming and pre-signed URL redirects for file delivery.
- Migrate existing local attachments to S3 in the background.
- Sync database and file backups to S3.
- Schedule backup sync using a CRON expression from the settings doctype.
- Optionally delete S3 objects when the related ERPNext
Filerecord is deleted. - Optionally remove local backup files after successful S3 upload.
- Support custom bucket prefixes for both attachments and backups.
- Support S3-compatible endpoints with path-style addressing for MinIO and similar providers.
For a concise GitHub feature summary, see FEATURES.md.
Requirements
- Frappe / ERPNext v16 bench
- Python 3.14+
- An S3-compatible bucket
- Valid access credentials for the target bucket
Installation
Run the following from your bench directory:
bench get-app https://github.com/solufy/erpnext_s3_integration
bench --site install-app erpnext_s3_integration
bench migrate && bench restart
If you are installing from a local app path or a private repository, use your normal bench get-app flow and then install the app on the target site.
Dependencies
This app requires:
boto3croniter
If your environment does not install Python dependencies automatically, run:
bench pip install -r apps/erpnext_s3_integration/requirements.txt
bench restart
Setup
- Open S3 Integration Settings in ERPNext.
- Enter the S3 connection details:
AWS Access Key IDAWS Secret Access KeyRegion NameBucket NameEndpoint URLif you are using MinIO or another S3-compatible serviceUse Path Styleif required by your storage provider
- Optionally set
Folder Prefixto keep all objects under a dedicated root path. - Save the document.
- Click
Test Connection.
Attachment Storage Setup
To store new attachments in S3:
- Enable
Enable Attachments S3. - Choose whether files should be streamed through ERPNext or served with pre-signed URLs using
Stream From S3. - Optionally enable
Delete From S3 On File Delete. - Save the settings.
From that point onward, newly uploaded ERPNext attachments are stored in S3.
Existing File Migration
To migrate existing files already stored on disk:
- Open S3 Integration Settings.
- Ensure
Enable Attachments S3is enabled. - Enable
Migrate Only Unmigratedif you want to skip rows already pointing to S3. - Click
Migrate Existing Files.
The migration runs as a background job. It uploads local files to S3 and updates the corresponding File.file_url to the /s3/... route used by the app.
Backup Sync Setup
To send ERPNext backups to S3:
- Enable
Enable Backups S3. - Choose whether to upload database backups, file backups, or both.
- Set
Backup Folder Prefixif you want backups stored separately from attachments. - Set
Backup CRON Expression. - Choose whether to create a fresh backup before sync.
- Choose whether to keep local backups after upload.
- Save the settings.
The scheduler checks the CRON expression and uploads backup files to S3 when the next run time is due.
You can also trigger an immediate manual sync from the settings form with Take Backup and Sync.
Behavior Notes
- Disabling
Enable Attachments S3stops new uploads from being redirected to S3. - Existing files that already point to
/s3/...remain accessible as long as the S3 credentials are still configured. - External file URLs such as
http://andhttps://are skipped by the migration tool. - The app uses a
Fileoverride so ERPNext can read S3-backed files without expecting them on local disk.
Project Structure
- hooks.py registers file hooks, scheduler hooks, redirects, and the
Fileoverride. - file_hooks.py handles upload interception, key generation, and delete sync.
- api.py serves S3-backed files through ERPNext.
- migration.py migrates existing local files to S3.
- backup_hooks.py syncs backups and handles retention cleanup.
- s3_client.py wraps S3 client setup, upload, delete, and URL generation.
Verification Checklist
Test Connectionsucceeds.- A newly uploaded attachment gets a
/s3/...URL in theFilerecord. - Opening an existing S3-backed file works from ERPNext.
- Manual backup sync uploads the expected backup artifacts.
- Scheduled backup sync runs with the configured CRON expression.
Support
Maintained by Solufy.
- Company: Solufy Pvy. Ltd.
- Email: sahil@solufy.in
License
MIT
Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers