config/nextcloud
Adrian 547ee07a6b Move fpm pool files out of version directory 2020-12-01 23:58:39 +01:00
..
README.md Move fpm pool files out of version directory 2020-12-01 23:58:39 +01:00
crontab Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00
fpm.conf Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00
local.config.php Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00
nginx.conf Fix unprocessed index directives 2020-04-17 01:09:18 +02:00
redis.conf Add nextcloud, backup, and ssh setup 2020-04-17 01:03:15 +02:00

README.md

Nextcloud

Create User

sudo sed -i '$ a cloud:*:3000:3000::/data/cloud:/bin/sh' /etc/passwd
sudo sed -i '$ a cloud:x:3000:' /etc/group

sudo mkdir -p /data/cloud
sudo chown cloud: /data/cloud

Install Software

PHPVERSION=x.x

sudo apt install redis-server nginx php-redis php$PHPVERSION-{cli,curl,fpm,gd,intl,mbstring,sqlite3,xml,zip}

wget https://download.nextcloud.com/server/releases/latest.zip
sudo -u cloud unzip -d /data/cloud ~/latest.zip

Apply Configuration

DOMAIN=example.com

sudo cp nginx.conf /etc/nginx/sites-available/nextcloud
sudo cp fpm.conf /etc/php/nextcloud.conf
sudo ln -s /etc/php/nextcloud.conf /etc/php/*/fpm/pool.d
sudo sed -i '$ r redis.conf' /etc/redis/redis.conf

sudo -u cloud cp local.config.php /data/cloud/nextcloud/config
sudo -u cloud crontab crontab

sudo ln -s ../sites-available/nextcloud /etc/nginx/sites-enabled
sudo sed -i s/example.com/$DOMAIN/ /etc/nginx/sites-available/nextcloud /data/cloud/nextcloud/config/local.config.php

sudo -u cloud mkdir -p /data/cloud/.config/user-tmpfiles.d
echo 'e %h/data/*/files/tmp - - - 7d' | sudo -u cloud tee /data/cloud/.config/user-tmpfiles.d/nextcloud-tmp.conf