nextcloud¶
Info
On Ubuntu 20.04
, TODO: redis, php-fpm
- Install php, apache2, and mariadb
1 2 3 4 |
|
- Initialize the DB
1 2 3 4 5 6 7 |
|
- Download nextcloud and install
1 2 3 |
|
- Add apache2 conf:
/etc/apache2/sites-available/nextcloud.conf
- Remember to change the
ServerName
- Run
a2ensite nextcloud.conf
to enable
- Remember to change the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
- Enable some apache2 modules
1 2 3 4 5 6 7 |
|
-
Pretty urls
- Add these line in
/var/www/nextcloud/config/config.php
- Run
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
to update1 2
'overwrite.cli.url' => 'https://nextcloud.roy4801.tw/', 'htaccess.RewriteBase' => '/',
- Add these line in
-
Chown the permission to
www-data
1
chown -R www-data:www-data /var/www/nextcloud/
-
Install Certificate by
certbot
1 2 3 4 |
|
- Add cron job
1 2 3
crontab -u www-data -e */5 * * * * php -f /var/www/nextcloud/cron.php
Apps¶
Warning
Remember to enable apps in Settings
- Preview Generator
1 2 3 4 5
cd /var/www/nextcloud/apps git clone https://github.com/nextcloud/previewgenerator.git crontab -u www-data -e # */10 * * * * php /var/www/nextcloud/occ preview:pre-generate
HEIC¶
https://gist.github.com/ishad0w/788555191c7037e249a439542c53e170
https://github.com/nextcloud/photos/issues/498
https://github.com/major-mayer/imageconverter/
References¶
https://docs.nextcloud.com/server/latest/admin_manual/installation/example_ubuntu.html