Skip to Content

Storing Odoo attachments in Amazon S3

One system parameter moves the file store to an S3 bucket, keeping the database small and the server stateless.
September 19, 2016 by
Storing Odoo attachments in Amazon S3
Nareshkumar H Soni

By default Odoo keeps attachments (documents, images, generated PDFs) in a file store on the server. Our Amazon S3 connector redirects that file store to an S3 bucket, so the server can be rebuilt or scaled without copying files around.

Note: this article was written for Odoo 9.0 (connector published on the Odoo Apps Store). Menu names have changed in later versions, but the concept and the configuration logic still apply. Ask if you want the current-version equivalent.

Configuration

After installing the module, add one entry under Settings → Technical → System Parameters:

key   = ir_attachment.location
value = amazons3://ACCESS_KEY_ID:SECRET_ACCESS_KEY@bucket-name

From that moment new attachments are written to the bucket and read back from it transparently; existing files can be migrated with the module's helper.

When it is worth it

  • Several Odoo workers or servers sharing one file store.
  • Large volumes of scanned documents or product images.
  • Backups: the database dump stays small and S3 handles the files' durability.

Need the same for a current Odoo version, or for another object store? Get in touch.

Installing Odoo 8 on your own Linux server
The three components, the PostgreSQL user, and the commands to get a first instance running on Ubuntu.