Install Nextcloud behind reverse proxy: Difference between revisions

From Jwiki
Created page with "== Prequisites == == Install == == Final steps == == Sources =="
 
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Docker]]
== Prequisites ==
== Prequisites ==
1. Install Nginx Proxy Manager
2. Proxy to "host:11000" via http
3. Insert the bellow settings to "Custom Nginx Configuration" on tab "Advanced":
<syntaxhighlight lang="bash">
client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;
</syntaxhighlight>




== Install ==
== Install ==
1. Install Docker
2. Install Nextcloud:
Keep attention to NEXTCLOUD_DATADIR as that will be the installation directory
<syntaxhighlight lang="bash">
sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8080:8080 \
--env APACHE_PORT=11000 \
--env APACHE_IP_BINDING=0.0.0.0 \
--env NEXTCLOUD_DATADIR=/mnt/nextcloud \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
</syntaxhighlight>




== Final steps ==
== Final steps ==
1. Download Custom CSS package
2. Navigate to theme and add custom css:
<syntaxhighlight lang="css">
.editor__content{ max-width:90% !important; }
</syntaxhighlight>
== Debug ==
Get logs
<syntaxhighlight lang="bash">
sudo docker logs -f nextcloud-aio-mastercontainer
</syntaxhighlight>
Get password
<syntaxhighlight lang="bash">
sudo docker exec nextcloud-aio-mastercontainer grep password /mnt/docker-aio-config/data/configuration.json
</syntaxhighlight>
Reload Nextcloud files
<syntaxhighlight lang="bash">
sudo docker exec -ti --user www-data nextcloud-aio-nextcloud /var/www/html/occ files:scan --all
</syntaxhighlight>




== Sources ==
== Sources ==

Latest revision as of 12:47, 1 September 2024


Prequisites

1. Install Nginx Proxy Manager

2. Proxy to "host:11000" via http

3. Insert the bellow settings to "Custom Nginx Configuration" on tab "Advanced":

client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;


Install

1. Install Docker

2. Install Nextcloud:

Keep attention to NEXTCLOUD_DATADIR as that will be the installation directory

sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8080:8080 \
--env APACHE_PORT=11000 \
--env APACHE_IP_BINDING=0.0.0.0 \
--env NEXTCLOUD_DATADIR=/mnt/nextcloud \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest


Final steps

1. Download Custom CSS package

2. Navigate to theme and add custom css:

.editor__content{ max-width:90% !important; }

Debug

Get logs

sudo docker logs -f nextcloud-aio-mastercontainer

Get password

sudo docker exec nextcloud-aio-mastercontainer grep password /mnt/docker-aio-config/data/configuration.json

Reload Nextcloud files

sudo docker exec -ti --user www-data nextcloud-aio-nextcloud /var/www/html/occ files:scan --all



Sources