Knowledge Base
KamlatechToolBlogContact Us
  • Kamlatech Documentation
  • Magento
    • Installation
    • Email Configuration
  • Blogger
    • Adding Code Block
  • Linux
    • Managing Logs
    • Prevent Package Update
  • Node
    • Installation
    • Http-Server
  • Github
    • .gitignore
    • Branch to New Repo
  • HTML
    • Common Header & Footer in HTML
  • Linkedin Infographics
    • Flame Retardant Standards
    • Flame Retardant Terms
  • Music
    • Pandit Niladri Kumar - Sitar
  • Applications
    • Konvect Connect
    • Konvect Fetcher
    • Konvect Fetcher WebApp
  • HTTPS SSL Certificate
    • Lets's Encrypt
  • Oracle Cloud Instance
    • Firewall
    • CPU Stressing
    • CPU Stressing Docker
  • SFTP
    • WinSCP SFTP
  • NextCloud
    • Installation
    • Post Install Tweak
    • PHP Version
  • Wordpress
    • NGINX Configuration
    • Image upload / Crop issue
    • Required PHP Modules
    • PHP Configuration
  • Healthcare Wearables (Cardiac)
    • Wearable ECG
    • Arrhythmia
    • Ambulatory ECG Usecase
    • Understanding EKG Leads
  • Flutter
    • Direct URL Access
    • Change Android PackageName
  • Math
    • Online Equation Writing
  • Backend Web Service
    • Flask App Deployment
  • 3D Modeling
    • DWG in Solid Edge
  • MariaDB
    • MariaDB Commands
  • Excel
    • HTML as String in Excel
  • Tools
    • Online Tools
  • PostgreSQL
    • PostgreSQL Installation
  • MEDUSA
    • Medusa Installation
    • Backend Server/Worker Mode
    • Frontend Deployment
  • Jupyter Lab
    • Jupyter Web App
  • WooCommerce
    • Product Filename Renaming
  • Embedded
    • Flash Xiao Sense Bootloader
Powered by GitBook
On this page
  • Increase file upload limit and PHP memory limit for Nextcloud.
  • Fix for the issue: PHP does not seem to be setup properly to query system environment variables.
  • Setup cronjob
  • Setup Memory Caching (APCU)
Edit on GitHub
  1. NextCloud

Post Install Tweak

Increase file upload limit and PHP memory limit for Nextcloud.

This setting is done in the php.ini file located at /etc/php/8.2/fpm/

upload_max_filesize = 1G
memory_limit = 512M

Do not forget to restart php8.2-fpm and nginx after saving the configuration

Fix for the issue: PHP does not seem to be setup properly to query system environment variables.

We need to configure the file www.conf at /etc/php/8.2/fpm/pool.d by uncommenting the following lines.

;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
env[HOSTNAME] = $HOSTNAME
env[PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

Do not forget to restart php8.2-fpm and nginx after saving the configuration

Setup cronjob

A system like Nextcloud sometimes requires tasks to be done on a regular basis without the need for user interaction or hindering Nextcloud performance. For that purpose, as a system administrator, you can define background jobs (for example, database clean-ups) which are executed without any need for user interaction.

sudo crontab -u www-data -e  //creates new crontab if none exist
sudo -u www-data crontab -l  // shows the crontab content if it exists

For setting an interval of 15 min between each cron job, add the following line to crontab.

*/15  *  *  *  * php -f /var/www/nextcloud/cron.php

Setup Memory Caching (APCU)

You can significantly improve your Nextcloud server performance with memory caching, where frequently-requested objects are stored in memory for faster retrieval APCu is a data cache. APCu – very fast because it doesn’t write anything to the disk, simply stores it as is. It is recomended for Small/Private home servers. Install APCu for your php version - e.g. 8.3

sudo apt install php8.3-apcu

Configure the apcu.ini file in /etc/php/8.3/mods-available by adding below lines. This enables the apc cli and also increases the memory from default 32M to 128 M

extension=apcu.so
apc.shm_size = 128M
apc.enable_cli=1

Now configure the nextcloud conf.php file to start using APCu. Add below line to the end in file /var/www/nextcloud/config

'memcache.local' => '\OC\Memcache\APCu',
PreviousInstallationNextPHP Version

Last updated 6 months ago