Edits to config files in owncloud container revert after restart

Steps to reproduce

  1. Mounted files volume to software raid array on local machine, but separate from boot drive.
  2. Mounted owncloud location in container like the following: - owncloud:/var/www/owncloud
  3. Attempted to “Strict-Transport-Security” HTTP header to .htaccess through vim.

Expected behaviour

.htaccess file should update successfully and the security warning be gone after restart.

Actual behaviour

The .htaccess file reverts after restarting the container.

Server configuration

Operating system: Debian (OpenMediaVault), running in docker.

Web server: Apache2

Database: MariaDB

PHP version: 7.4.3-4

ownCloud version: 10.12.0.6

Updated from an older ownCloud or fresh install: Fresh Install

Where did you install ownCloud from: Docker Hub

Signing status (ownCloud 9.0 and above): No Errors

The content of config/config.php: Character Limit, unable to post pastebin link

List of activated apps: OnlyOffice, web (not setup yet), and oauth2 (web dependency)

Are you using external storage, if yes which one: Docker bound software raid

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: FireFox (most recent release)

Operating system: Windows 11

For a container setup, I would recommend adding those options to your used reverse proxy.

2 Likes

I simply use Cloudflare Zero Trust. Is there an option to do that through Cloudflare?

I’d also like to add that I’ve tried to edit the apache settings as well, as the documentation suggests, but the result is the same. The changes are reverted after the restart.

Update: I was able to enable HTTP Strict Transport through Cloudflare for the entire domain. This was done through the edge certificates section. Note to self, always look/Google before asking.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.