Add prefixes to Nextcloud page

This commit is contained in:
exu 2023-07-11 17:13:49 +02:00
parent 20f5db5998
commit 35b1a986ce

View File

@ -9,10 +9,14 @@ visible: true
Nextcloud will be using apache Nextcloud will be using apache
[shroot]
```sh ```sh
apt install mlocate apache2 libapache2-mod-php mariadb-client mariadb-server wget unzip bzip2 curl php php-common php-curl php-gd php-mbstring php-mysql php-xml php-zip php-intl php-apcu php-redis php-bcmath php-gmp php-imagick apt install mlocate apache2 libapache2-mod-php mariadb-client mariadb-server wget unzip bzip2 curl php php-common php-curl php-gd php-mbstring php-mysql php-xml php-zip php-intl php-apcu php-redis php-bcmath php-gmp php-imagick
``` ```
[/shroot]
Not found: `php-http-request python-certbot-apache` Not found: `php-http-request python-certbot-apache`
No password set No password set
@ -37,23 +41,35 @@ Exit the MariaDB prompt
Download Nextcloud into `/var/www` Download Nextcloud into `/var/www`
[shroot]
```sh ```sh
wget https://download.nextcloud.com/server/releases/nextcloud-{VERSION}.tar.bz2 wget https://download.nextcloud.com/server/releases/nextcloud-{VERSION}.tar.bz2
tar -xf nextcloud-{VERSION}.tar.bz2 tar -xf nextcloud-{VERSION}.tar.bz2
``` ```
[/shroot]
Change owner to the apache user Change owner to the apache user
[shroot]
```sh ```sh
chown -Rfv www-data:www-data /var/www/nextcloud chown -Rfv www-data:www-data /var/www/nextcloud
``` ```
[/shroot]
Create nextcloud configuration for apache Create nextcloud configuration for apache
[shroot]
```sh ```sh
vi /etc/apache2/sites-available/nextcloud.conf vi /etc/apache2/sites-available/nextcloud.conf
``` ```
[/shroot]
Configuration file Configuration file
```apacheconf ```apacheconf
@ -83,25 +99,37 @@ Configuration file
Enable nextcloud and disable the default site Enable nextcloud and disable the default site
[shroot]
```sh ```sh
a2ensite nextcloud.conf && a2dissite 000-default.conf a2ensite nextcloud.conf && a2dissite 000-default.conf
``` ```
[/shroot]
Edit `ports.conf` for apache2 to only bind the addresses you need Edit `ports.conf` for apache2 to only bind the addresses you need
[shroot]
```sh ```sh
systemctl restart apache2 systemctl restart apache2
``` ```
[/shroot]
### Cron ### Cron
To execute regular jobs, I personally use cron. To execute regular jobs, I personally use cron.
Edit `crontab` as the `www-data` user. Edit `crontab` as the `www-data` user.
[shuser]
```sh ```sh
sudo -u www-data crontab -e sudo -u www-data crontab -e
``` ```
[/shuser]
Add this following line: Add this following line:
``` ```
@ -119,7 +147,7 @@ The main config file is `{NEXTCLOUD DIR}/config/config.php`
This settings keeps the files for 15 days, unless drive space is getting low. This settings keeps the files for 15 days, unless drive space is getting low.
In that case it delets them earlier. In that case it delets them earlier.
``` ```php
'trashbin_retention_obligation' => 'auto, 15', 'trashbin_retention_obligation' => 'auto, 15',
``` ```
@ -127,7 +155,7 @@ In that case it delets them earlier.
This disables the warning of untrusted proxy in the webinterface. This disables the warning of untrusted proxy in the webinterface.
``` ```php
'trusted_proxies' => 'trusted_proxies' =>
array ( array (
0 => '{PROXY IP}', 0 => '{PROXY IP}',
@ -138,7 +166,7 @@ This disables the warning of untrusted proxy in the webinterface.
Array of trusted domains. Array of trusted domains.
``` ```php
'trusted_domains' => 'trusted_domains' =>
array ( array (
0 => '{DOMAIN 1}', 0 => '{DOMAIN 1}',
@ -152,18 +180,26 @@ Array of trusted domains.
Enable maintenance mode to prevent data inconsistencies Enable maintenance mode to prevent data inconsistencies
[shuser]
```sh ```sh
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
``` ```
[/shuser]
To disable maintenance mode again, run the same command with `--off` instead of `--on` To disable maintenance mode again, run the same command with `--off` instead of `--on`
### Upgrade with CLI ### Upgrade with CLI
[shuser]
```sh ```sh
sudo -u www-data php /var/www/nextcloud/updater/updater.phar sudo -u www-data php /var/www/nextcloud/updater/updater.phar
``` ```
[/shuser]
### Backup Database ### Backup Database
Dump database to file Dump database to file
@ -216,6 +252,9 @@ mariadb -h {SERVER} -u {USERNAME} -p{PASSWORD} {DB NAME} < nextcloud-sqlbkp.bak
> [Docker Compose for Nextcloud + Collabora + Traefik?](https://help.nextcloud.com/t/docker-compose-for-nextcloud-collabora-traefik/127733/2) > [Docker Compose for Nextcloud + Collabora + Traefik?](https://help.nextcloud.com/t/docker-compose-for-nextcloud-collabora-traefik/127733/2)
> [Use HTTPS with Ubuntu 22.04, apache, Nextcloud and Collabora(Docker)](https://help.nextcloud.com/t/use-https-with-ubuntu-22-04-apache-nextcloud-and-collabora-docker/142880) > [Use HTTPS with Ubuntu 22.04, apache, Nextcloud and Collabora(Docker)](https://help.nextcloud.com/t/use-https-with-ubuntu-22-04-apache-nextcloud-and-collabora-docker/142880)
> [HowTo: Ubuntu + Docker + Nextcloud + Talk + Collabora](https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430) > [HowTo: Ubuntu + Docker + Nextcloud + Talk + Collabora](https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430)
> [Collabora - Installation Guide](https://sdk.collaboraonline.com/docs/installation/index.html)
[shroot]
```sh ```sh
podman run -t -d --name collabora-online -p 9980:9980 \ podman run -t -d --name collabora-online -p 9980:9980 \
@ -224,6 +263,8 @@ podman run -t -d --name collabora-online -p 9980:9980 \
docker.io/collabora/code:latest docker.io/collabora/code:latest
``` ```
[/shroot]
```nginx ```nginx
server { server {
listen 443 ssl; listen 443 ssl;
@ -282,15 +323,19 @@ Integrating onlyoffice, requires setting the correct Content Security Policy hea
For my installation, the headers needed to be set like this. For my installation, the headers needed to be set like this.
``` ```
Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: onlyoffice.exu.li;" Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: [ONLYOFFICE DOMAIN NAME];"
``` ```
[shroot]
```sh ```sh
sudo podman run -itd --name onlyoffice -p 8080:80 \ podman run -itd --name onlyoffice -p 8080:80 \
-e JWT_SECRET={secret key} \ -e JWT_SECRET={secret key} \
docker.io/onlyoffice/documentserver docker.io/onlyoffice/documentserver
``` ```
[/shroot]
> [Installing ONLYOFFICE Docs Community Edition for Docker on a local server](https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx) > [Installing ONLYOFFICE Docs Community Edition for Docker on a local server](https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx)
> [About the ONLYOFFICE and Nextcloud integration](https://helpcenter.onlyoffice.com/integration/gettingstarted-nextcloud.aspx) > [About the ONLYOFFICE and Nextcloud integration](https://helpcenter.onlyoffice.com/integration/gettingstarted-nextcloud.aspx)
> [Using ONLYOFFICE Docs behind the proxy](https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx) > [Using ONLYOFFICE Docs behind the proxy](https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx)