| Line 1: |
Line 1: |
| − | === Install with docker compose === | + | ===Install with docker compose=== |
| | docker-compose.yml:<syntaxhighlight lang="yaml"> | | docker-compose.yml:<syntaxhighlight lang="yaml"> |
| | version: '3.8' | | version: '3.8' |
| Line 81: |
Line 81: |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | ==== Create subfolder structure ==== | + | ====Create subfolder structure==== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | sudo mkdir -p /mnt/nextcloud/{nextcloud,data,db,redis,caddy/data,caddy/config} | | sudo mkdir -p /mnt/nextcloud/{nextcloud,data,db,redis,caddy/data,caddy/config} |
| Line 91: |
Line 91: |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | ==== Start NextCloud ==== | + | ====Start NextCloud==== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | docker compose up --detach | | docker compose up --detach |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | ==== Assing file permissions ==== | + | ====Assing file permissions==== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | docker exec -it nextcloud chown -R www-data:www-data /var/www/html | | docker exec -it nextcloud chown -R www-data:www-data /var/www/html |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | ==== Format Cadyfile ==== | + | ====Format Cadyfile==== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | docker compose exec caddy caddy fmt --overwrite /etc/caddy/Caddyfile | | docker compose exec caddy caddy fmt --overwrite /etc/caddy/Caddyfile |
| | docker compose restart caddy | | docker compose restart caddy |
| | + | </syntaxhighlight><br /> |
| | + | |
| | + | ==== Edit config.php ==== |
| | + | |
| | + | ===== Find out caddy container network: ===== |
| | + | <syntaxhighlight lang="bash"> |
| | + | docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nextcloud_caddy |
| | + | </syntaxhighlight>wil return something like 172.18.0.4<syntaxhighlight lang="php"> |
| | + | 'overwritehost' => 'cloud.herrerosolis.com', |
| | + | 'overwriteprotocol' => 'https', |
| | + | 'trusted_proxies' => ['172.18.0.0/16'], # Use real caddy Docker network here |
| | + | 'forwarded_for_headers' => ['HTTP_X_FORWARDED_FOR'], |
| | + | </syntaxhighlight><syntaxhighlight lang="bash"> |
| | + | docker compose restart nextcloud |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | === NextCloud Install Script === | + | ===NextCloud Install Script=== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | #!/bin/bash | | #!/bin/bash |
| Line 233: |
Line 247: |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | == Verify security config == | + | ==Verify security config== |
| | https://cloud.herrerosolis.com/index.php/settings/admin/overview | | https://cloud.herrerosolis.com/index.php/settings/admin/overview |
| | | | |
| − | === Allow big file upload === | + | ===Allow big file upload=== |
| | php.ini:<syntaxhighlight lang="ini"> | | php.ini:<syntaxhighlight lang="ini"> |
| | upload_max_filesize = 2G | | upload_max_filesize = 2G |
| Line 244: |
Line 258: |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | == Backups == | + | ==Backups== |
| | The important paths to backup are: | | The important paths to backup are: |
| | | | |
| − | * <code>/mnt/nextcloud/db</code> (PostgreSQL) | + | *<code>/mnt/nextcloud/db</code> (PostgreSQL) |
| − | * <code>/mnt/nextcloud/data</code> (tus archivos) | + | *<code>/mnt/nextcloud/data</code> (tus archivos) |
| − | * <code>/mnt/nextcloud/nextcloud</code> (archivos de Nextcloud + apps instaladas) | + | *<code>/mnt/nextcloud/nextcloud</code> (archivos de Nextcloud + apps instaladas) |
| − | * <code>/mnt/nextcloud/caddy</code> (configuración SSL + Caddyfile) | + | *<code>/mnt/nextcloud/caddy</code> (configuración SSL + Caddyfile) |
| | | | |
| | <br /> | | <br /> |
| | | | |
| − | == Updates == | + | ==Updates== |
| | <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| | docker compose pull | | docker compose pull |
| | docker compose up -d | | docker compose up -d |
| | </syntaxhighlight> | | </syntaxhighlight> |