NextCloud
Share and collaborate on documents, send and receive email, manage your calendar and have video chats without data leaks As fully on-premises solution, Nextcloud Hub provides the benefits of online collaboration without the compliance and security risks. More information here: https://nextcloud.com/
- x86 Docker-Compose.yml
- Raspberry Pi Docker-Compose.yml
- Increase File Size Uploads with .htaccess
- Raspberry Pi 4 Docker Compose
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.
This solution was found here.
Raspberry Pi Docker-Compose.yml
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: yobasystems/alpine-mariadb:latest
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- /srv/dev-disk-by-label-Files/Databases/NextCloud:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=nextcloud
- MYSQL_PASSWORD=nextcloud
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
ports:
- 8080:80
links:
- db
volumes:
- /srv/dev-disk-by-label-Files/Config/Nextcloud:/var/www/html
restart: always
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.
Raspberry Pi 4 Docker Compose
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: yobasystems/alpine-mariadb:latest
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