fixed the nextcloud tutorial

This commit is contained in:
nihilist 2025-03-27 21:36:58 +01:00
parent 269d350f23
commit 7f002328c7

View file

@ -81,21 +81,35 @@
<div class="col-lg-8 col-lg-offset-2"> <div class="col-lg-8 col-lg-offset-2">
<h2><b>Serverside Setup </b></h2> <h2><b>Serverside Setup </b></h2>
<p>So to install nextcloud we're going to use docker-compose as follows:</p> <p>So to install nextcloud we're going to use docker-compose as follows (as the root user):</p>
<pre><code class="nim"> <pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud]
→ sudo -i
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud] [ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud]
→ apt install docker.io docker-compose -y → apt install docker.io docker-compose -y
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud] [ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud]
→ vim docker-compose.yml → vim docker-compose.yml
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud] [ Wonderland ] [ /dev/pts/7 ] [/srv/nextcloud]
→ cat docker-compose.yml → cat docker-compose.yml
networks:
tor-nxtcld:
driver: bridge
ipam:
config:
- subnet: 10.7.0.0/24
gateway: 10.7.0.1
services: services:
db: db:
image: mariadb:latest image: mariadb:latest
restart: always restart: always
command: --transaction-isolation=READ-COMMITTED command: --transaction-isolation=READ-COMMITTED
networks:
tor-nxtcld:
ipv4_address: 10.7.0.2
volumes: volumes:
- db:/var/lib/mysql - db:/var/lib/mysql
environment: environment:
@ -111,6 +125,9 @@ services:
app: app:
image: nextcloud:latest image: nextcloud:latest
restart: always restart: always
networks:
tor-nxtcld:
ipv4_address: 10.7.0.3
ports: ports:
- 127.0.0.1:9639:80 - 127.0.0.1:9639:80
depends_on: depends_on:
@ -126,6 +143,17 @@ services:
- NEXTCLOUD_TRUSTED_DOMAINS=nxtcloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion - NEXTCLOUD_TRUSTED_DOMAINS=nxtcloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion
- OVERWRITEHOSTPROTOCOL=http - OVERWRITEHOSTPROTOCOL=http
- OVERWRITEHOST=nxtcloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion - OVERWRITEHOST=nxtcloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion
- PROXY=tor-nxtcld:9050
tor-nxtcld:
image: osminogin/tor-simple
container_name: tor-nxtcld
volumes:
- ./tor-data:/var/lib/tor
- ./tor-data/torrc:/etc/tor
networks:
tor-nxtcld:
ipv4_address: 10.7.0.4
volumes: volumes:
nextcloud: nextcloud:
@ -133,7 +161,7 @@ volumes:
</pre></code> </pre></code>
<p>Don't forget to replace the "P@SSW0RD" with a password of your own, and that docker-compose.yaml will expose the nextcloud service on local port 9639, so let's run docker-compose up -d to run the service:</p> <p>Don't forget to replace the "P@SSW0RD" with a password of your own, and that docker-compose.yaml will expose the nextcloud service on local port 9639, so let's run docker-compose up -d to run the service:</p>
<p></p> <p>As you can see in the docker-compose.yml file, there is a tor container, this is to make sure that the nextcloud connects to the internet through Tor (see the PROXY environment variable), to protect the serverside anonymity.</p>
<pre><code class="nim"> <pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud] [ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud]
→ docker-compose up -d → docker-compose up -d
@ -159,7 +187,7 @@ torrc
SOCKSPort 0.0.0.0:9050 SOCKSPort 0.0.0.0:9050
</pre></code> </pre></code>
<p>Then we setup the nginx config to be able to access the nextcloud service accordingly:</p> <p>Then we setup the nginx config to be able to access the nextcloud service accordingly. (obviously, replace the onion domain <a href="../torwebsite/index.html">with your own onion domain</a>):</p>
<pre><code class="nim"> <pre><code class="nim">
[ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud] [ Wonderland ] [ /dev/pts/9 ] [/srv/nextcloud]
→ vim /etc/nginx/sites-available/nxtcloud.conf → vim /etc/nginx/sites-available/nxtcloud.conf