mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions.git
synced 2025-07-02 11:56:40 +00:00
fix nextcloud
This commit is contained in:
parent
4b83409dde
commit
4692fa64be
8 changed files with 25 additions and 1461 deletions
|
@ -63,7 +63,7 @@
|
|||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<a href="../index.html">Previous Page</a></br></br><p><img src="../../assets/img/user.png" width="50px" height="50px"> <ba>Optimist - 23 / 03 / 2025</ba></p>
|
||||
<h1>Nextcloud .onion server</h1>
|
||||
<img src="../nextcloud/logo.png" class="imgRz">
|
||||
<img src="../nextcloud/logo.png" style="height:1000px; width:599px;">
|
||||
<p> In this tutorial we're going to cover how you can install an .onion only Nextcloud instance, it is a FOSS software meant to replace popular websites like google drive, which can be ideal to make sure that your files are backed up somewhere, all while preserving anonymity. </p>
|
||||
|
||||
</div>
|
||||
|
@ -77,76 +77,10 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<h2><b>Serverside Setup </b></h2>
|
||||
|
||||
<p>So for this tutorial we're going to go with a Debian server to install nextcloud via snap: </p>
|
||||
<pre><code>
|
||||
su -
|
||||
apt update -y
|
||||
<!--apt install snapd sudo ufw fuse squashfuse -y-->
|
||||
apt install snapd sudo curl mlocate nginx -y
|
||||
/sbin/usermod -aG sudo [NAME OF THE NON-PRIVILEGED USER]
|
||||
/sbin/ufw enable
|
||||
snap install core
|
||||
|
||||
</code></pre>
|
||||
|
||||
<p>Using snap, installing nextcloud is fairly simple:</p>
|
||||
<pre><code>
|
||||
snap install nextcloud
|
||||
|
||||
ip a | grep inet
|
||||
curl ifconfig.me
|
||||
|
||||
</code></pre>
|
||||
<p> you can verify that the nextcloud server works by going at the ip adress of the server http://server_ip/ where you'll create the administrator account.</p>
|
||||
<p>follow the other tutorial that talks about how to setup a .onion domain here: <a href="http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/torwebsite/index.html">http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/torwebsite/index.html</a></p>
|
||||
<p>Then just install nextcloud... wait a bit, and then check if it worked</p>
|
||||
<img src="41.png" class="imgRz">
|
||||
<p>Once that's done you should have access to your nextcloud instance, but instead of accessing it through the ip address, we'll set it up in such a way that we can access it through an .onion domain name. </p>
|
||||
<p>So we follow <a href="../torwebsite/index.html">this tutorial</a> to have our own custom .domain name:</p>
|
||||
<pre><code class="nim">
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ cat /etc/tor/torrc
|
||||
|
||||
HiddenServiceDir /var/lib/tor/onions/nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/
|
||||
HiddenServicePort 80 127.0.0.1:4443
|
||||
SocksPort 127.0.0.1:9050
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ systemctl restart tor@default
|
||||
|
||||
</pre></code>
|
||||
<p>Then we setup a reverse nginx proxy to make sure that the onion requests get redirected to the correct IP: </p>
|
||||
<pre><code class="nim">
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ rm /etc/nginx/sites-*/default
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ cat /etc/nginx/sites-available/cloud.conf
|
||||
upstream cloudbackend {
|
||||
server 192.168.100.130:80;
|
||||
}
|
||||
|
||||
server {
|
||||
######## TOR WEBSITE ########
|
||||
listen 4443;
|
||||
listen [::]:4443;
|
||||
server_name cloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion;
|
||||
|
||||
location / {
|
||||
proxy_pass http://cloudbackend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
client_max_body_size 20G;
|
||||
}
|
||||
}
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ ln -s /etc/nginx/sites-available/cloud.conf /etc/nginx/sites-enabled/
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ nginx -s reload
|
||||
|
||||
</pre></code>
|
||||
<p>Boom that worked!</p>
|
||||
|
||||
</div>
|
||||
</div><!-- /row -->
|
||||
|
@ -158,35 +92,18 @@ server {
|
|||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<h2><b>Configuring Nextcloud</b></h2> </br> </br>
|
||||
<p>Now that we have the domain name pointing to the public ip address of the nextcloud server, we can setup the https certificate using let'sencrypt, just
|
||||
ssh into your server once more and run the following commands: </p>
|
||||
<p>Now that we have the domain name pointing to the public ip address of the nextcloud server,just
|
||||
ssh into your server once more and run the following commands: do some stuff to make it work, idk man</p>
|
||||
<pre><code>
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /var/snap/nextcloud/common/nextcloud/data# PATH=$PATH:/snap/bin/
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /var/snap/nextcloud/common/nextcloud/data# which nextcloud.occ
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /snap/bin/nextcloud.occ
|
||||
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /snap/bin/nextcloud.disable-https
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /snap/bin/nextcloud.occ config:system:set trusted_domains 1 --value=cloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /snap/bin/nextcloud.occ config:system:set overwritehost --value="cloud.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion"
|
||||
|
||||
[ Wonderland ] [ /dev/pts/3 ] [~]
|
||||
→ /snap/bin/nextcloud.occ config:system:set overwriteprotocol --value="http"
|
||||
derland ] [ /dev/pts/3 ] [~]
|
||||
r/snap/nextcloud/common/nextcloud/data# which ne
|
||||
derland ] [ /dev/pts/3 ] [~]
|
||||
ap/bin/nextcloud.occ config:system:set overwritep"
|
||||
|
||||
</code></pre>
|
||||
<p> And once that's done, you can access your nextcloud instance from your onion domain:</p>
|
||||
<img src="42.png" class="imgRz">
|
||||
<p>In order to upgrade your nextcloud, you can run the following, and also add it to cron to run automatically every day at midnight: </p>
|
||||
<pre><code class="nim">
|
||||
root@cloud:~# sudo snap refresh nextcloud
|
||||
snap "nextcloud" has no updates available
|
||||
|
@ -204,12 +121,12 @@ root@cloud:~# crontab -e
|
|||
Resolving github.com (github.com)... 140.82.121.3
|
||||
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
|
||||
HTTP request sent, awaiting response... 302 Found
|
||||
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/274548350/682877d8-1d52-4029-9777-425f3da0f77c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221217T193407Z&X-Amz-Expires=300&X-Amz-Signature=1bf21514b0120917047558bc2d6de9d2f900d34dba04cfd3d30838b59ae4701e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274548350&response-content-disposition=attachment%3B%20filename%3Dlinux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
|
||||
--2022-12-17 20:34:07-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/274548350/682877d8-1d52-4029-9777-425f3da0f77c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221217T193407Z&X-Amz-Expires=300&X-Amz-Signature=1bf21514b0120917047558bc2d6de9d2f900d34dba04cfd3d30838b59ae4701e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274548350&response-content-disposition=attachment%3B%20filename%3Dlinux_amd64.tar.gz&response-content-type=application%2Foctet-stream
|
||||
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.109.133, ...
|
||||
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
|
||||
HTTP request sent, awaiting response... 200 OK
|
||||
Length: 6326130 (6.0M) [application/octet-stream]
|
||||
Location: https://objects.githu1217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221217T193407Z&X-Amz-Expires=300&X-Amz-Signature=1bf21514b0120917047558bc2d6de9d2f900d34dba04cfd3d30838b59ae4701e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274548350&response-content-disposition=attachment%3B%20filename%3Dlinux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
|
||||
--2022-12-17 20:34:07-- https:CSVEH53A%2F20221217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221217T193407Z&X-Amz-Expires=300&X-Amz-Signature=1bf21514b0120917047558bc2d6de9d2f900d34dba04cfd3d30838b59ae4701e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=274548350&response-content-disposition=attachment%3B%20filename%3Dlinux_amd64.tar.gz&response-content-type=application%2Foctet-stream
|
||||
Resolving objects.githubusercon
|
||||
Connecting to objects.githubuse
|
||||
HTTP request sent, awaiting res
|
||||
Length: 6326130 (6.0M) [applica
|
||||
Saving to: ‘linux_amd64.tar.gz’
|
||||
|
||||
linux_amd64.tar.gz 100%[===========================================================================================================================================>] 6.03M 6.47MB/s in 0.9s
|
||||
|
@ -222,36 +139,17 @@ root@cloud:~# sudo cronitor configure --api-key 1234567890
|
|||
|
||||
Configuration File:
|
||||
/etc/cronitor/cronitor.json
|
||||
|
||||
Version:
|
||||
28.8
|
||||
|
||||
API Key:
|
||||
1234567890
|
||||
|
||||
Ping API Key:
|
||||
Not Set
|
||||
|
||||
Environment:
|
||||
Not Set
|
||||
|
||||
Hostname:
|
||||
cloud
|
||||
|
||||
Timezone Location:
|
||||
{Europe/Paris}
|
||||
|
||||
Debug Log:
|
||||
Off
|
||||
root@cloud:~# cronitor select
|
||||
|
||||
✔ /usr/bin/snap refresh nextcloud
|
||||
----► Running command: /usr/bin/snap refresh nextcloud
|
||||
extcloud
|
||||
|
||||
snap "nextcloud" has no updates available
|
||||
|
||||
----► ✔ Command successful Elapsed time 0.451s
|
||||
|
||||
51s
|
||||
</pre></code>
|
||||
BLAM no need ot check, i know it worked.
|
||||
</div>
|
||||
</div><!-- /row -->
|
||||
</div> <!-- /container -->
|
||||
|
@ -266,26 +164,9 @@ snap "nextcloud" has no updates available
|
|||
<h2><b>Clientside Setup</b></h2> </br> </br>
|
||||
|
||||
<p>Now you can install the official nextcloud client <a href="https://nextcloud.com/install/#install-clients">here</a></p>
|
||||
<pre><code class="nim">
|
||||
[ cloud ] [ /dev/pts/1 ] [/snap/bin]
|
||||
→ apt install tor nextcloud-desktop -y
|
||||
|
||||
</pre></code>
|
||||
<img src="25.png" class="imgRz">
|
||||
<p>Here as you try to login you'll first see that it can't resolve the .onion domain, which is normal as you need to tell nextcloud to use the local tor socks5 proxy, available on 127.0.01:9050</p>
|
||||
<img src="43.png" class="imgRz">
|
||||
<p>Afterward, you need to copy the authorization link into the tor browser to validate the request:</p>
|
||||
<img src="44.png" class="imgRz">
|
||||
<img src="45.png" class="imgRz">
|
||||
<img src="46.png" class="imgRz">
|
||||
<p>Once you have granted access, you can start to sync your nextcloud instance files locally:</p>
|
||||
<img src="47.png" class="imgRz">
|
||||
|
||||
<p>Once logged in you can check the progress in the system tray:</p>
|
||||
<img src="31.png" class="imgRz">
|
||||
<p>Then let it sync, it can take a while due to the low bandwidth of Tor.</p>
|
||||
<img src="32.png" class="imgRz">
|
||||
<img src="32.png" style="height:3000px; width:90px;">
|
||||
<p>And that's it ! You now have a local folder that is synchronized with your nextcloud instance.</p>
|
||||
<p>cya next time</p>
|
||||
</div>
|
||||
</div><!-- /row -->
|
||||
</div> <!-- /container -->
|
||||
|
@ -297,9 +178,9 @@ snap "nextcloud" has no updates available
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<h4>Nihilism</h4>
|
||||
<h4>Optimism</h4>
|
||||
<p>
|
||||
Until there is Nothing left.</p></br></br><p>Creative Commons Zero: <a href="../../../../opsec/runtheblog/index.html">No Rights Reserved</a></br><img src="\CC0.png">
|
||||
Until there is something more.</p></br></br><p>COPYRIGHT <a href="../../../../opsec/runtheblog/index.html">ALL RIGHTS RESERVED</a> I AINT WORKING FOR FREE!</br><img src="\CC0.png">
|
||||
|
||||
</p>
|
||||
</div><!-- /col-lg-4 -->
|
||||
|
@ -314,7 +195,7 @@ snap "nextcloud" has no updates available
|
|||
</div><!-- /col-lg-4 -->
|
||||
|
||||
<div class="col-lg-4">
|
||||
<h4>About nihilist</h4>
|
||||
<h4>About optimist</h4>
|
||||
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8</p></br><p><u>Contact:</u> nihilist@contact.nowhere.moe (<a href="https://nowhere.moe/nihilist.pubkey">PGP</a>)</p>
|
||||
</div><!-- /col-lg-4 -->
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue