Move user directory outside root folder

Hey,
I would like to ask you if its possible to move user (data) directory outside root folder for example one level up or so…
I found that you are using a lot of hard coded paths instead of USER_DIR.
Its crucial for us since we can’t write on production and we have to move user dir one level up to shared storage. I hope you can help us with this

You can with core grav:

Add a setup.php file inside the Grav root folder, with this content:

<?php
return [
    'streams' => [
        'schemes' => [
            'user' => [
               'type' => 'ReadOnlyStream',
               'prefixes' => [
                   '' => ["../user/"],
               ]
            ],
            'theme' => [
               'type' => 'ReadOnlyStream',
               'prefixes' => [
                   '' => ["../user/themes/antimatter"],
               ] 
            ]
        ]
    ]
];

Customize ../user to what suits your folder structure, and ../user/themes/antimatter to your theme path.

The Admin Plugin has issues with this kind of setup, I think it’s never been tried yet.

It would be nice if there is little more about streams in docs. Kinda all I need it move user/pages outside root folder because all other directories are basicly only static files and we don’t need write to them. I hope there is way to move just that one folder to another directory probably with prefixed or so… im not sure

Yes you can do that too, by customizing the page stream. Grav\Common\Config\Setup defines the default values for the streams. Check http://learn.getgrav.org/advanced/multisite-setup#streams for more

Okey in this case

'asset' => [
                'type' => 'Stream',
                'prefixes' => [
                    '' => ['../assets'],
                ]
            ],

Url will be https://domain.com/../assets/ and thats something I don’t want.

In this case

'sharedassets' => [
                'type' => 'Stream',
                'paths' => [
                    '/home/grav/www/assets'
                ]
            ],

Plus with this

'asset' => [ 
                'type' => 'Stream',
                'prefixes' => [
                    '' => ['sharedassets://'],
                ]
            ],

It will end up with Absolute stream path with relative lookup not allowed.
So… yeah somehow there must be way to use absolute path and in the same way keep correct url without that …/…/assets or so

Hm still wondering if there is way to set absolute path out of doc root any suggestions?