Skip to content

feat(Assets): Add remote asset storage option#1802

Merged
Kruptein merged 1 commit intodevfrom
push-noovywsyswox
Mar 7, 2026
Merged

feat(Assets): Add remote asset storage option#1802
Kruptein merged 1 commit intodevfrom
push-noovywsyswox

Conversation

@Kruptein
Copy link
Copy Markdown
Owner

@Kruptein Kruptein commented Mar 7, 2026

This PR adds the option to configure a S3-compatible storage remote for user uploaded assets. This can alleviate some costs or maintenance on the server host.

This comes with some configuration changes, a PR to the docs will be opened later today (likely) with specifics on that front. I'll update this description with a link once that's done.

By default without any config changes1, the original local storage approach will be used and stored in /static/assets/ (relative to the server folder).

You'll however now be able to instead refer to a S3-compatible host by providing some URL info (e.g. bucket name etc) as well as 2 env variables to provide secrets.

The implementation is done without any extra dependencies to make it as generic as possible and without having to deal with whether or not I want to publish a docker image without and with the optional dependencies.

It's important that you FIRST run the migrations added in #1801 before moving to a remote solution if you intend to move your existing asset folder over.

It should be noted that I've only tested this with cloudflare R2 as that had an easy to setup free tier. I cannot vouch for any other service and I have only verified some basic operations. You'll have to look up for each service which values for region/bucket/url etc you need to provide. These can be added to the docs once known for a particular service.

!! It should also be noted that by using a remote solution you accept the risk of data costs that could occur if something in PA behaves faulty and ends up requesting from the remote too much. !!

This closes #1725 and #500

Footnotes

  1. The existing assets.directory config key is moved, it however didn't properly work as far as I'm aware so I don't think this should impact anybody. It now works properly.

@Kruptein Kruptein force-pushed the push-noovywsyswox branch from 1480a58 to 211c779 Compare March 7, 2026 16:47
@Kruptein Kruptein merged commit 4466100 into dev Mar 7, 2026
8 checks passed
@Kruptein Kruptein deleted the push-noovywsyswox branch March 7, 2026 16:55
@Kruptein
Copy link
Copy Markdown
Owner Author

Kruptein commented Mar 8, 2026

This has now been updated in the docs for the next release.

See here. If the link no longer works, check the latest deploy of the next release PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Object Storage Support

1 participant