Configuring S3 for primary storage via Environment variables not working #1807
-
Steps to reproduce
These should be showing
Should be available and aren't, so configs in https://github.com/nextcloud/all-in-one/blob/main/Containers/nextcloud/config/s3.config.php via getenv() calls fail to a blank string / fallback option Going to make a guess we need these configured here to be passed through to container creation: all-in-one/php/containers.json Line 117 in 946e214 Passing envs via Expected behaviorS3 configured correctly as primary storage via Environment variables Actual behaviorS3 not working as primary storage Host OSRocky Linux 8 Nextcloud AIO versionNextcloud AIO v4.1.0 Current channelLatest Other valuable infoEdit - typo |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 9 replies
-
Hi, moving to discussions since this is a feature request |
Beta Was this translation helpful? Give feedback.
-
Hi, indeed it is known that these variables do not get forwarde to the Nextcloud container. It is actually intended since all Backup and Restore features will not work anymore when using primary object storage. You can now either mount your bucket via the host (or a docker volume) in a location that can be used as datadir via https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir which brings the advantage that the built-in backup solution works, or you use this: https://github.com/nextcloud/all-in-one/tree/main/manual-install |
Beta Was this translation helpful? Give feedback.
-
@szaimen thanks, only reason i wondered is i saw the tmp directory being configured here ( all-in-one/Containers/nextcloud/entrypoint.sh Line 359 in d66002a Would be great if a similar conditional could disable the borg backup when primary object storage is detected plus pass these variables along to the nextcloud container. I didn't come across any documentation to say primary object storage isn't supported by direct configuration (may have missed it) i'll double check and raise a pull if i still can't spot any references. Personally i'd much rather use primary object storage configured and used directly instead of going through a fuse / mounted option for performance. Would you entertain the above suggestion if I raise as a change? If this doesn't feel right for the AIO project then i'll look at a manual setup or a patched main container 👍 |
Beta Was this translation helpful? Give feedback.
-
I've had a quick look at patching a master container and build/tag locally, would be a pain as the docker hub locations have been coded into the update checks for the master container, little point in maintaining more than just the containers.json env variables modification imo. So unless adding the Being able to fire up a nextcloud AIO instance on a VPS or Compute Instance with storage taken care of remotely on a cloud s3 or min.io cluster would be ideal for many setups i'd have thought, especially with the container updates taken care of. AIO is well suited to mounted block storage with borg backup, but the primary object storage would need more of a think. There is still the possibility of external user storage configured for object storage, downsides on that front are performance and manual configuration for each user which is something I'd personally want to avoid. Plus users can just choose to upload outside of the configured folder straight onto the instance storage which is what i'm trying to avoid (in-bound out-of-diskspace logwatch warnings... ) I'll go down the manual setup road for now 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi, I just wanted to leave this here as someone figured out how to mount its object via the host: https://help.nextcloud.com/t/setting-up-object-storage-as-primary-storage-for-nextcloud-aio-docker-container/157178/8 |
Beta Was this translation helpful? Give feedback.
-
Could you please provide an update on the current discussion? We are planning to use S3 as our primary storage. Additionally, are there any tips or tricks from others who have experience with manually installing and integrating S3? |
Beta Was this translation helpful? Give feedback.
-
Running via the manual docker compose yaml on primary S3 is working fine for me, however it's worth mentioning backups won't be performed automatically via aio and the auto-updates won't work, it's a manual update of the yaml and docker pull for the latest container versions. I have a different solution for DB / container and S3 file backups to replace this functionality for now. I think there may have been something like a manual file to be created to satisfy the aio start process, then S3 has been very stable and reliable as a primary storage option (for me). |
Beta Was this translation helpful? Give feedback.
-
So if configuring S3 does not work via environment variables, what is the recommended approach for making S3 available for primary storage without having to build my own image? Simply add it to
|
Beta Was this translation helpful? Give feedback.
-
The approach i've taken is to use a custom docker compose setup, so using the AIO containers but not the main updater or controller container. Here you can specify the container environment variables and setup S3 as primary, also the AIO backup solution doesn't work with this setup so you wouldn't want that running automatically. @rasos see https://github.com/nextcloud/all-in-one/tree/main/manual-install |
Beta Was this translation helpful? Give feedback.
Hi, indeed it is known that these variables do not get forwarde to the Nextcloud container. It is actually intended since all Backup and Restore features will not work anymore when using primary object storage.
You can now either mount your bucket via the host (or a docker volume) in a location that can be used as datadir via https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir which brings the advantage that the built-in backup solution works, or you use this: https://github.com/nextcloud/all-in-one/tree/main/manual-install