Tag - buster

Entries feed - Comments feed

Friday, September 11 2020

Nextcloud upgrade 19.0.3

Today I update my debian repository for buster/bullseye https://apt.jurisic.org for Nextcloud 19.0.3.

New Fix:

Full list of changes on https://nextcloud.com/changelog/

Monday, September 7 2020

Upgrade Nextcloud to 19.0.2

New Nextcloud bring some very important fix and improvements:

Check full list on link https://nextcloud.com/changelog/#latest19

I update packages for Debian Bullseye/Buster on my repositry https://www.jurisic.org/index.php?pages/My-Debian-Repository



Friday, July 24 2020

How to up Nextcloud 19 server on Debian 10 Buster in 10 min

Before start please check system requirements for Nextcloud 19 server.

In my guide I using Debian 10 (Buster) GNU/Linux for OS.


1. Choice of Database

First need choice database for Your Nextcloud. Depend of Your need.

If just wont to try/test Nextcloud You can to use SQLite, alternative to SQLite if don't have big number of users good choice is MariaDB but in time from my experience number of user will go up and my choice is PostgreSQL.

Database is very important and Debian 10 (Buster) comming with PostgreSQL 11, but for better performance I using PostgreSQL 12 from repository pgdg.

* If will use SQLite please ignore instructions about PostgreSQL.


Add PostgreSQL 12 Repository & install package:

echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' >> /etc/apt/sources.list.d/pgdg.list
wget --no-check-certificate -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | apt-key add -
apt-get update
apt-get install postgresql-12

Create new user & database for Nextcloud:

su - postgres
CREATE USER ncuser WITH PASSWORD 'StorngPasswordHere';

Now Your database is ready for use.


2. Add repository Jurisic and install package nextcloud-server

echo 'deb http://apt.jurisic.org/debian/ buster main contrib non-free' >> /etc/apt/sources.list.d/jurisic.list
wget -q http://apt.jurisic.org/Release.key -O- | apt-key add -
apt-get update
apt-get install nextcloud-server


3. Configure Apache2 service (Virtual Host, SSL Certificate)

If using friesh installed Debian, package nextcloud-server will install apache2 and php packages.

Default Apache config will configure working url at links http://<ip address>/nextcloud or http://<hostname>/nextcloud

First we need enable support for ssl and that is very easy:

a2enmod ssl
a2ensite default-ssl
systemctl restart apache2

After enable Apache module ssl and site default-ssl we have self signed certificate at links https://<ip address>/nextcloud or https://<hostname>/nextcloud and its You fine with links no need more adjust Apache.

But for example I buy domain example.com and wont to run nextcloud at link https://example.com, here instruction what need to add in Apache.

Open text editor with:

nano /etc/apache2/sites-available/example.com.conf

Make file:

<VirtualHost *:80>
        ServerName example.com
        ServerAdmin webmaster@example.com
        DocumentRoot /var/www/nextcloud

        Redirect permanent / https://example.com/

        ErrorLog ${APACHE_LOG_DIR}/nextcloud_error.log
        CustomLog ${APACHE_LOG_DIR}/nextcloud_access.log combined


<IfModule mod_ssl.c>

<VirtualHost _default_:443>
        ServerName example.com
        ServerAdmin webmaster@example.com
        DocumentRoot /var/www/nextcloud

        <Directory "/var/www/nextcloud">
            Options +FollowSymLinks
            AllowOverride All

            <IfModule mod_dav.c>
                Dav off

            SetEnv HOME /var/www/nextcloud
            SetEnv HTTP_HOME /var/www/nextcloud

        <Directory "/var/www/nextcloud/data">
            Require all denied

         <IfModule mod_headers.c>
            Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"

        <IfModule mod_php7.c>
            <IfModule mod_env.c>
                SetEnv htaccessWorking true

        ErrorLog ${APACHE_LOG_DIR}/nextcloud_error.log
        CustomLog ${APACHE_LOG_DIR}/nextcloud_access.log combined

        SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key


Now disable stadard site and enable new with:

a2dissite 000-default
a2dissite default-ssl
a2ensite example.com

Now is good time for setup ssl certificate. We can to use any solution or use free service Let's Encrypt.

Easy way to create and activate ssl certificate with Certbot:

apt-get install certbot python-certbot-apache
certbot --apache


4. Configure PHP (php.ini)

Settings for PHP can simple change. Just open file /etc/php/7.3/apache2/php.ini :

nano /etc/php/7.3/apache2/php.ini

Find keys and change value:

upload_max_filesize = 512M
post_max_size = 512M
memory_limit = 512M
mbstring.func_overload = 0
default_charset = "UTF-8"
output_buffering = 0


5. Optional configure PHP-FPM (Fast/CGI) instead default PHP

Switch Apache to event mode and enable fcgid:

a2dismod php7.3
a2dismod mpm_prefork
a2enmod mpm_event
a2enmod proxy_fcgi

Install package php-fpm :

apt-get install php-fpm
a2enconf php7.3-fpm
systemctl restart apache2 php7.3-fpm

Settings for PHP-FPM can simple change. Just open file /etc/php/7.3/fpm/php.ini :

nano /etc/php/7.3/fpm/php.ini

Find keys and change value:

upload_max_filesize = 512M
post_max_size = 512M
memory_limit = 512M
mbstring.func_overload = 0
default_charset = "UTF-8"
output_buffering = 0

Check great article about PHP FPM - optimization.

Example of my configuration (Note: PC have 8 CPU core, 8 Gb of RAM:):

Adjusted StartServers, MaxRequestWorkers and MaxConnectionsPerChild:

nano /etc/apache2/mods-enabled/mpm_event.conf

Example of file:

<IfModule mpm_event_module>
        StartServers            8
        MinSpareThreads         25
        MaxSpareThreads         75
        ThreadLimit             64
        ThreadsPerChild         25
        MaxRequestWorkers       248
        MaxConnectionsPerChild  1000

Adjusted PHP-FPM pool:

nano /etc/php/7.3/fpm/pool.d/www.conf

Changed variables:

pm = dynamic
pm.max_children = 400
pm.start_servers = 32
pm.min_spare_servers = 16
pm.max_spare_servers = 32
pm.max_requests = 1000

Restart services :

systemctl restart apache2 php7.3-fpm


6. Optional configure memory caching

Good idea is to setup memory caching. If you have enough memory, use APCu for Memory Caching and Redis for File Locking.


6.1 For PHP APCu first need to install package and restart services:

apt-get install php-apcu
systemctl restart apache2 php7.3-fpm


6.2 Install Redis server and configure for work over unix socket:

apt-get install redis-server php-redis

Adjusted Redis server:

Enable unixsocket

nano /etc/redis/redis.conf

Find in file unixsocket and uncomment lines (note: change permission from 700 to 770):

unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770

Change somaxconn and overcommit:

nano /etc/sysctl.d/40-redis-server.conf

Add in new file:

net.core.somaxconn = 1024
vm.overcommit_memory = 1

Transparent Huge Pages (THP) support disable:

nano /etc/default/grub



Then apply changes with:


Reboot server:

systemctrl reboot


7. Web install of Nextcloud

Now is server ready for Nextcloud web installation, open url:

https://example.com or https://example.com/nextcloud (depend how You configure Your Apache2)

Create admin account (username,password), configure database (click on PostgreSQL,username,password,database) and click "Finish setup":


8. Optional enable cache in config file of Nextcloud

Check section 6.1 and 6.2. If wont enable cache by PHP APCu and Redis server:

nano /var/www/nextcloud/config/config.php

Add in config:

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0,
    'password' => '',
    'dbindex' => 0,


Congratulations and enjoy in Nextcloud !!!

Friday, June 5 2020

Never Miss a Notification in MATE Desktop

If using MATE Dekstop don't have indicator for unread notification like Cinnamon Dekstop. But if install Ayatana Indicator for viewing recent notifications with one click, you can see and action them.

Example how to install support for Mate & Ayatana Indicator:

apt install mate-indicator-applet ayatana-indicator-notifications

Now go on panel and right click, then click on Add to Panel, select "Indicator Applet" and for finish click on Add button.

On panel now we have new icon ( in my case on left side first icon):

And that is all.

Now we can test how work, open System->Control Panel->Popup Notification and press button Preview and test notification will show as we expected:

Now if better look, our indicator for notification now is green and now click on green icon:

We see text of test, time, date and name of application.

Enjoy and no more miss notification on MATE Daesktop.



Thursday, May 28 2020

Package update indicator

I favorite MATE Desktop Environment on my Debian Buster. Work very stable and look like Gnome2 (nostalgia).

All my need got in package mate-desktop-environment-extras but missing information when come new update.

On my luck we have package-update-indicator.

Simple proces of installation:

apt-get install package-update-indicator

After installation of packages simple reboot PC and click on new icon on Systray:

Now select refresh cache in my case I select daily and under command for installing updates add /usr/bin/gpk-update-viewer :

And that is all, when come new version of package icon will be changed, then simple click on icon and select "Install updates":

Then review packages for update and click on "Install Updates"

Page top