Sunday, July 27, 2025

Nextcloud goodies





https://dbt3ch.com/books/nextcloud



Increase File Size Uploads with .htaccess


Log in to Portainer

Go to your list of containers

Find your NextCloud container

Click the >_ (Exec Console)

Run the following commands:apt update
apt upgrade
apt install nano
nano .htaccess

Once you're editing .htaccess, copy and paste the following lines into the file:



php_value memory_limit 2G
php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value max_input_time 3600
php_value max_execution_time 3600




You can add this to the top or the bottom of the file as you see fit.


These numbers can be adjusted to whatever you'd like your max filesize to be. Be sure to make the post_max_size a bit larger than the upload_max_filesize.

Save (CTRL+O)

Exit (CTRL+X)

Go back to your Portainer dashboard and restart the NextCloud container.







-------------------------------------







x86 Docker-Compose.yml

version: '2'

volumes:
nextcloud:
db:

services:
db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed

volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=Bund7zXeVz7YnFknLGcnUjHtk #change this
- MYSQL_PASSWORD=HFdMe9rn5kf7A8Pqc8v86Pre5 #change this
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud

app:
image: nextcloud
restart: always
ports:
- 8888:80
links:
- db
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_PASSWORD=HFdMe9rn5kf7A8Pqc8v86Pre5 #change this to match the mysql_password above
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db

The command in the db service has been modified from the original to prevent the following error:

4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.

https://techoverflow.net/2021/08/17/how-to-fix-nextcloud-4047-innodb-refuses-to-write-tables-with-row_formatcompressed-or-key_block_size/


No comments:

Post a Comment

Komentar=