Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Documents
  3. Cloudflare R2 Storage v 20.0
  4. Sales Conditions FAQ

Cloudflare R2 Storage

by Md. Abdullah Al Mamun http://aamsoftvalley.com
Odoo

$ 118.37

v 20.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 17.0 18.0 19.0 20.0
  • Description
  • Manifest
  • License
Cloudflare R2 Storage

Odoo 20 · Community & Enterprise

Cloudflare R2 Storage for Odoo

Move Odoo attachments off your server into a private Cloudflare R2 bucket. Users keep opening, previewing and emailing files exactly as before, and your filestore and backups shrink.

✓ Private bucket ✓ Odoo access rules enforced ✓ No boto3, no extra packages

Why store attachments in R2?

Attachments are usually the largest part of an Odoo database. Put them where storage is cheap and egress is free.

⇩

Smaller server & backups

Uploaded files leave the local filestore, so disks, snapshots and database dumps stay small and fast to restore.

🔒

Bucket stays private

Files are fetched server-side with signed requests and streamed by Odoo. No public bucket, no guessable links.

✓

Odoo security, unchanged

Every download goes through the same checks as Odoo's own file route: record rules, portal access, public files and access tokens.

✉

Everything keeps working

Previews, downloads, emails with attachments, reports and exports read the content from R2 transparently.

⇄

Migrate and roll back

Move existing files with one action or a batch scheduled job, and bring them back to local storage at any time.

⚙

Lightweight

Pure Python standard library (AWS Signature V4). Nothing to pip install, works on Odoo.sh and on-premise.

How it works

1 · UPLOAD

A file is attached in Odoo

Chatter, documents, generated PDFs... it is uploaded to R2 and removed from the local filestore.

2 · CHECK

A user opens the file

Odoo checks that this user may read the attachment and the record it belongs to.

3 · STREAM

Odoo streams it from R2

A signed server-side request fetches the object. R2 credentials never reach the browser.

Simple configuration

Settings › Cloudflare R2: paste your credentials, test the connection, enable.

Cloudflare R2 settings

Move existing files in bulk

Filter attachments by storage, then use Move to Cloudflare R2 or Restore from Cloudflare R2.

Bulk actions on attachments

Full traceability

Each attachment shows its R2 object key and the secure Odoo URL used to serve it.

Attachment stored in R2

Setup guide: generate your R2 access keys

Everything from an empty Cloudflare account to your first file stored in R2.

PART A

Generate the R2 credentials in Cloudflare

About 5 minutes. You need a Cloudflare account with access to R2.

1

Open R2 in the Cloudflare dashboard

Log in at dash.cloudflare.com and choose R2 Object Storage in the left sidebar.

First time using R2? Cloudflare asks you to activate R2 and may require a payment method. R2 includes a monthly free tier and charges no egress (download) fees.
2

Create a private bucket

Click Create bucket and fill in:

  • Bucket name: lowercase letters, numbers and hyphens, e.g. acme-odoo-files
  • Location: Automatic, or a location hint close to your Odoo server
  • Default storage class: Standard

Click Create bucket. Do not enable public access or a custom domain: the module never needs them.

3

Create an API token

Go back to the R2 Object Storage overview page and click Manage API tokens on the right of the page (in some dashboard versions it is inside the API button). Click Create API token (an Account token is recommended, so it keeps working if a user leaves) and set:

  • Token name: e.g. odoo-r2-storage
  • Permissions: Object Read & Write (read, write, list and delete objects)
  • Specify bucket(s): Apply to specific buckets only, then select the bucket from step 2
  • TTL: Forever, or an expiry date if your security policy requires one
  • Client IP address filtering: optional; if you use it, allow your Odoo server's public IP

Click Create API token.

4

Copy the credentials (shown only once)

The confirmation page shows several values. Copy these three into a safe place now:

  • Access Key ID
  • Secret Access Key
  • The S3 endpoint under Use jurisdiction-specific endpoints for S3 clients: https://<ACCOUNT_ID>.r2.cloudflarestorage.com
The Secret Access Key cannot be displayed again. If you lose it, roll the token or create a new one. The Token value shown on the same page is not used by this module.
Bucket created in the EU jurisdiction? Use the EU endpoint https://<ACCOUNT_ID>.eu.r2.cloudflarestorage.com. Your Account ID is also shown on the R2 overview page.
PART B

Connect Odoo

Log in as an administrator.

5

Open the settings

Go to Settings › Cloudflare R2 and tick Enable R2 Storage. The connection fields appear.

6

Paste the credentials

Fill in the fields with the values from Part A:

Odoo field Value Example
Service URL S3 endpoint from step 4 (without the bucket name) https://3f9a1c2b7d4e.r2.cloudflarestorage.com
Bucket Name Bucket name from step 2 acme-odoo-files
Access Key ID Access Key ID from step 4 a1b2c3d4e5f6...
Secret Access Key Secret Access Key from step 4 ••••••••••••
Object Key Prefix Optional folder inside the bucket, e.g. one per database acme-prod
Allowed MIME Types Optional; blank uploads every file type image/*, application/pdf
7

Test and save

Click Test R2 Connection. A green Connection successful message confirms Odoo can reach the bucket. Then click Save.

From now on, every new attachment is stored in R2. To move existing files, use Move to Cloudflare R2 on the attachment list, or activate the scheduled action Cloudflare R2: Move Existing Attachments.

Troubleshooting the connection test

HTTP 403 Access denied Token is not Object Read & Write, is scoped to another bucket, has expired, blocks your server IP, or the keys were pasted with extra spaces.
HTTP 404 Bucket not found Bucket name misspelled, or the Service URL belongs to another account or jurisdiction (EU buckets need the .eu. endpoint).
Connection error / timeout The Odoo server cannot reach *.r2.cloudflarestorage.com on port 443: check firewall and outbound proxy rules.
Service URL ends with the bucket name Remove it: enter only https://<ACCOUNT_ID>.r2.cloudflarestorage.com and put the bucket in its own field.

Features

  • Automatic upload of new attachments
  • Content still readable from Python (emails, reports, exports)
  • Replace and delete synced with R2 after the transaction commits
  • Shared objects are kept until no attachment uses them
  • Optional MIME-type filter, e.g. image/*, application/pdf
  • Configurable key prefix to share a bucket between databases
  • Scheduled action to migrate existing files in batches
  • One-click connection test

Good to know

  • Images stored in fields (product images, avatars, logos) and web assets stay local for speed and public access.
  • Files already in R2 stay readable if you switch the feature off.
  • Before uninstalling, select the Stored in R2 attachments and run Restore from Cloudflare R2.
  • Only administrators can move files between storages.
  • Works with any S3-compatible endpoint that supports Signature V4.

Need help?

Questions, installation help or customisation: get in touch and we will get back to you.

🌐 aamsoftvalley.com ✉ almamun.cse.hstu@gmail.com ✆ WhatsApp +880 1773-086680

Developed by Md. Abdullah Al Mamun

Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 608
Technical Name odoo_r2_storage
LicenseOPL-1
Websitehttp://aamsoftvalley.com
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with