NextCloud Installation Q & A

  • Thank you, it's working :-).


    And for some errors, I don't understand.

    Zitat von Nextcloud

    The PHP Opcache is not properly configured. For better performance we recommend ↗ to use following settings in the php.ini:opcache.enable=1opcache.enable_cli=1opcache.interned_strings_buffer=8opcache.max_accelerated_files=10000opcache.memory_consumption=128opcache.save_comments=1opcache.revalidate_freq=1

    Enabling these values in the file /etc/php5/fpm/php.ini or vi /etc/openmediavault/php.ini don't correct some errors (nginx was reloaded):

    Bash: php.ini
    always_populate_raw_post_data = -1
    
    
    opcache.enable=1opcache.enable_cli=1
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.memory_consumption=128
    opcache.save_comments=1
    opcache.revalidate_freq=1


    Where is the good php.ini file to edit it?

  • Maybe you will laugh.
    This morning, after waked up, I thinked maybe relaunching php will be a good issue.


    Your reply confirm it's the good issue.


    I restarted php.
    I will check when I return to home ;-).


    Then yesterday, I had two more problems:

    • Impossible to send mail (in OMV and in Nextcloud)
    • Impossible to connect with new users created

    I will check tonight to check if I have somethin in logs etc.

  • OK, I found for this error:
    Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0
    We need to enable always_populate_raw_post_data = -1 in more files: /etc/php5/cgi/php.ini and /etc/php5/cli/php.ini


    Source

  • So i've set everything up and dont have anny errors ^^ including ssl and the opcache error.


    To fix the opcache error:


    Code
    sudo nano /etc/php5/fpm/php.ini



    (scroll to the bottom with "page-down button")\
    Paste the follow content


    Code
    opcache.enable=On
    opcache.enable_cli=1
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.memory_consumption=128
    opcache.save_comments=1
    opcache.revalidate_freq=1


    Save the file with CTRL+X


    restart the PHP



    Code
    sudo service php5-fpm restart


    TADAAAAA opcache error gone

  • Updated to Nextcloud 12.0.0.29 and did an Security-Scan and got an "A"


    The following Headers are not set:



    X-Content-Type-Options


    X-XSS-Protection


    X-Download-Options


    X-Permitted-Cross-Domain-Policies


    I use the initial Nginx configuration, but removed the


    add_header X-Frame-Options "SAMEORIGIN";


    Which looks like this now:



    How can I set the missing headers?


    Edit: My Fail2Ban does not work, logging-level is set to 1, was there a change in logfile-creation?


    my Fail2Ban filter looks like this:


    Code
    [Definition]
    failregex={"reqId":".*","remoteAddr":".*","app":"core","message":"Login failed: '.*' \(Remote IP: '<HOST>'\)","level":2,"time":".*"}
    ignoreregex =

    Edit2: Solved my Fail2Ban with this definition:


    Code
    [Definition]
    failregex = ^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$
    ignoreregex =

    For Nextcloud 11 there was a strong permissiongs guide in the official docs, but for 12 there isn't. Is there a recomendation which permissions should be set?

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    3 Mal editiert, zuletzt von riff-raff ()

  • Okay, thx, I'll apply them right away ...


    What about the Nginx headers?

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • I meant how to set the additional headers for those options:


    X-Content-Type-Options
    X-XSS-Protection
    X-Download-Options
    X-Permitted-Cross-Domain-Policies



    those which the Nextcloud Security Scan criticized on my Nextcloud 12 installation.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Those header already included in my vhost config on the setup page.
    There are 12 headers total.


    A side note regarding strong permission security, it's the same for v12.0 as this moment.
    Source: https://github.com/nextcloud/v…_permissions_nextcloud.sh

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    4 Mal editiert, zuletzt von tinh_x7 ()

  • I double checked ... you are right, I have those headers already in my config-file; so why is this critizised by Nextcloud Security Check?


    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • I don't know your setup, so it's hard to give you the solution.
    I'm using the same vhost config that I posted here for everybody.
    Check your config again.
    Maybe a space or character in the code lines that may interfere with the codes.
    If all fail, you can post your issue on NC forum for help.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • I just create my frist omv system and installed nextcloud 12 yesterday following this tutorial.
    Performance is quite good but i read that i could improve this further switching from AJAX to cron for background updates.


    i configured a new cronjob using the omv interface with the following command executed every 15 mins by www-data:

    Code
    php5 -f /srv/dev-disk-by-label-SSD-DATA/www-nextcloud/cron.php


    In the nextcloud log i now get this INFO when the job is executed:


    Code
    Info	cli	Memcache \OC\Memcache\APCu not available for distributed cache
    Info	cli	Memcache \OC\Memcache\APCu not available for local cache

    I have " 'memcache.local' => '\OC\Memcache\APCu', " in my config.php and the improvements infos from the administration page disappeared after i added those.
    Of course php5-apcu is installed.


    Any idea why this is info appears?

  • Hab das mal nach der Anleitung installiert. Bekomme komischerweise diese Fehler.
    Hat schon jemand den Fehler behoben gehabt?

    Und wenn ich dann auf die Liste klicke...

    it is stange can you install it again?

    omv 6.x | 64 bit | omvextrasorg 6.x |
    used plugins: omv-extras | portainer | rsnapshot | antivirus
    used container: portainer/portainer | nextcloud/all-in-one | linuxserver/swag | paperless-ngx | jellyfin/jellyfin | lmscommunity/logitechmediaserver | adguard/adguardhome |

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!