Previous Page

nihilist@mainpc - 2024-11-12

How to run the Nihilism Blog Yourself

Why are you letting me run the blog ?

As you have probably noticed after looking at the footer of any of the blogposts in this blog, they are all licensed under the public domain license. This means that there is no copyright restrictions at all, it is free for all, forever.

The reason behind this stems from Sum Nihil, where i strongly believe that it doesn't matter who does the work, who gets the fame, who gets to profit off of it, what truly matters is that the work gets done, no matter who does it.

Here, the work is to make sure that everyone out there knows that when using the right technology in the right way, they cannot be oppressed, silenced, censored, controlled, and governed anymore. If you can help me reach that goal i'm definitely going to welcome it, even if it means to allow other people to run the blog.

The entire blog is meant to remain available for free, for everyone, over clearnet and over the Tor network. Ideally i'd like it to be resillient to takedowns in the case if something were to happen to me in the future. Therefore, the more people run the blog themselves, the more resillient it will become, and the farther the word will be able to go out there.

Sidenote: Help us improve this tutorial by letting us know if there's anything missing or incorrect on this git issue directly!

Clearnet Setup



Now if you are interested in helping me get the word accross, you can run the blog yourself like so:

On a debian server (VPS or not), install the following packages:


[ Datura ] [ /dev/pts/23 ] [~]
→ sudo apt install nginx wget curl tor torsocks -y
	

Then, you need to download the blog somewhere, you can simply git clone it from the blog-contributions forgejo repository into the /srv/ directory:


[ Datura ] [ /dev/pts/23 ] [~]
→ torsocks git clone http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions /srv/blog/
	

Optional: if you want to also host the archived blog sections i wrote in the past (the hacking and selfhosting categories) you can do so as follows:


[ Wonderland ] [ /dev/pts/9 ] [/srv/blog-archive]
→ torsocks git clone http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-archive /srv/blog-archive

Then we need to make sure that the blog repository stays updated regularly:


[ Wonderland ] [ /dev/pts/11 ] [/srv]
→ crontab -e

#blog
@hourly /usr/bin/torsocks /usr/bin/git -C /srv/blog/ pull
@hourly /usr/bin/torsocks /usr/bin/git -C /srv/blog-archive/ pull

then you can use this nginx configuration (and dont forget to enable it with a symlink to sites-enabled):


[ Datura ] [ /dev/pts/23 ] [~]
→ rm /etc/nginx/sites-*/default

[ Datura ] [ /dev/pts/23 ] [~]
→ vim /etc/nginx/sites-available/blog.nowhere.moe

[ Datura ] [ /dev/pts/23 ] [~]
→ ln -s /etc/nginx/sites-available/blog.nowhere.moe /etc/nginx/sites-enabled/

[ Datura ] [ /dev/pts/23 ] [~]
→ cat /etc/nginx/sites-available/blog.nowhere.moe
	
server {
        listen 80;
        listen [::]:80;
        server_name blog.nowhere.moe;
        return 301 https://$server_name$request_uri;
}

server {
        ######## TOR CHANGES ########
        listen 4443;
        listen [::]:4443;
        server_name blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion;
        add_header Onion-Location "http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion$request_uri" always;
        ######## TOR CHANGES ########

        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name blog.nowhere.moe;
########################################## HARDENING SSL #############################################
                ssl_certificate /root/.acme.sh/blog.nowhere.moe/fullchain.cer;
                                ssl_certificate_key /root/.acme.sh/blog.nowhere.moe/blog.nowhere.moe.key;
                ssl_dhparam     /root/.acme.sh/dhparam.pem;


# SSL Settings
                ssl_protocols TLSv1.2 TLSv1.3;
                ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
                ssl_prefer_server_ciphers on;


                ssl_session_cache shared:SSL:10m;
                ssl_session_timeout 10m;
                ssl_session_tickets off;
                ssl_ecdh_curve auto;

                # OCSP stapling
                ssl_stapling on;
                ssl_stapling_verify on;
                ssl_trusted_certificate /root/.acme.sh/blog.nowhere.moe/fullchain.cer;
                resolver 1.1.1.1 208.67.222.222;

                add_header Strict-Transport-Security "max-age=63072000" always;




        access_log  off;
    error_log off;
###################################END OF HARDENING SSL###########################################


  rewrite ^/servers/anon.html http://$server_name/opsec/index.html permanent;
        rewrite ^/servers/(.*)$ http://$server_name/opsec/$1 permanent;
        index index.html;
        root /srv/blog/;

                #optional selfhosting + HTB locations in /srv/blog-archive:
                location ~ ^/(selfhosting|HTB)/ {
                root /srv/blog-archive/;

                }
}

but as you can see we're missing the TLS certificates, so let's get them using acme.sh:


[ Datura ] [ /dev/pts/23 ] [~]
→ wget -O -  https://get.acme.sh | sh -s email=nihilist@contact.nowhere.moe

[ Datura ] [ /dev/pts/23 ] [~]
→ systemctl stop nginx ; acme.sh --issue --standalone -d blog.nowhere.moe -k 4096; systemctl start nginx
	

And now that we have them, let's see if the nginx config is correct:


[ Datura ] [ /dev/pts/23 ] [~]
→ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
	

Now that the nginx config is correct let's restart nginx to load in the new config:


[ Datura ] [ /dev/pts/23 ] [~]
→ systemctl restart nginx 
	

And then we can see that the website is up and reachable at the clearnet domain:

Tor Hidden Service Setup



Since clearnet websites are easily censorable nowadays, let's make sure it is censorship-resistant by making it available over Tor. Let's first install Tor:


[ Datura ] [ /dev/pts/23 ] [~]
→ apt install tor -y
	

Then we git clone the mkp repository to be able to generate an onion hidden service address:


[ Datura ] [ /dev/pts/23 ] [~]
→ apt install gcc libc6-dev libsodium-dev make autoconf tor

[ Datura ] [ /dev/pts/23 ] [~]
→ git clone https://github.com/cathugger/mkp224o /srv/mkp224o

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ cd /srv/mkp224o ; ./autogen.sh ; ./configure ; make

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ ./mkp224o datura
sorting filters... done.
filters:
        datura
in total, 1 filter
using 12 threads
daturacccspczuluj2hbgqfcpkjo75hn7bzmuzsm5zys3az6k3su45ad.onion
daturaxnp7x4ubwlslgyeaft5dabaxotmsaxanayocnpxarc7wi36kid.onion

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ mkdir /var/lib/tor/onions 

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ mv daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion /var/lib/tor/onions 

[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ ls -lash
total 16K
4.0K drwx------ 4 debian-tor debian-tor 4.0K Jan 27 15:33 .
4.0K drwx--S--- 8 debian-tor debian-tor 4.0K Feb  1 15:08 ..
4.0K drwx------ 3 debian-tor debian-tor 4.0K Jul 12  2023 daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion
4.0K drwx------ 3 debian-tor debian-tor 4.0K Jan 27 15:48 nihilhfjmj55gfbleupwl2ub7lvbhq4kkoioatiopahfqwkcnglsawyd.onion

[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ ls -lash daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion
total 24K
4.0K drwx------ 3 debian-tor debian-tor 4.0K Jul 12  2023 .
4.0K drwx------ 4 debian-tor debian-tor 4.0K Jan 27 15:33 ..
4.0K drwx------ 2 debian-tor debian-tor 4.0K Jul 12  2023 authorized_clients
4.0K -r-------- 1 debian-tor debian-tor   63 Jul 12  2023 hostname
4.0K -r-------- 1 debian-tor debian-tor   64 Jul 12  2023 hs_ed25519_public_key
4.0K -r-------- 1 debian-tor debian-tor   96 Jul 12  2023 hs_ed25519_secret_key

Then after copying the hidden service files where they belong we change the directory rights accordingly:


[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ chmod 700 daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion

[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ chmod 400 daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/*

[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ chmod 700 daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/authorized_clients -R

[ Datura ] [ /dev/pts/11 ] [lib/tor/onions]
→ chown debian-tor: /var/lib/tor/onions -R

Then we edit the torrc config file to make sure it uses the correct hidden service directory, along with a port to be used to access the website:


[ Datura ] [ /dev/pts/11 ] [/srv/mkp224o]
→ cat /etc/tor/torrc
HiddenServiceDir /var/lib/tor/onions/daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/
HiddenServicePort 80 127.0.0.1:4443  # for web service HTTP (recommended!)
HiddenServicePort 443 127.0.0.1:4444 # for web service HTTPS (but not recommended!)

HiddenServicePort 18080 127.0.0.1:18080 # for monero nodes
HiddenServicePort 18081 127.0.0.1:18081 # for monero nodes

# to have another hidden service, you can append it afterward like so; but you need to use different ports:

HiddenServiceDir /var/lib/tor/onions/daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/
HiddenServicePort 80 127.0.0.1:4445

Then we restart Tor to refresh the configuration:


[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ systemctl restart tor@default

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ systemctl status tor@default
● tor@default.service - Anonymizing overlay network for TCP
     Loaded: loaded (/lib/systemd/system/tor@default.service; enabled-runtime; preset: enabled)
     Active: active (running) since Sun 2024-11-10 21:39:43 CET; 2 days ago
   Main PID: 2790923 (tor)
      Tasks: 13 (limit: 77002)
     Memory: 1.5G
        CPU: 1d 12h 17min 42.199s
     CGroup: /system.slice/system-tor.slice/tor@default.service
             └─2790923 /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0

And from there, we edit the nginx configuration to make sure the website is reachable over the tor domain aswell along with having the header set so that the user's tor browser mentions that there is a .onion link available:


[ Datura ] [ /dev/pts/23 ] [~]
→ vim /etc/nginx/sites-available/blog.nowhere.moe

[ Datura ] [ /dev/pts/23 ] [/srv/mkp224o]
→ cat /etc/nginx/sites-available/blog.nowhere.moe
server {
        listen 80;
        listen [::]:80;
        server_name blog.nowhere.moe;
        return 301 https://$server_name$request_uri;
}

server {
        ######## TOR CHANGES ########
        listen 4443;
        listen [::]:4443;
        server_name blog.daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion;
        add_header Onion-Location "http://blog.daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion$request_uri" always;
        ######## TOR CHANGES ########

	[...]
}

And then we refresh nginx and we see that the website can be reached over the .onion link aswell:


[ Datura ] [ /dev/pts/23 ] [~]
→ systemctl restart nginx

And that's it! you now have made your own copy of the blog available over clearnet and Tor.

Sidenote: if you want to only have an onion mirror of the blog (and no clearnet at all), you can use this nginx config:


[ Wonderland ] [ /dev/pts/9 ] [/etc/nginx/sites-available]
→ cat blog.conf

server {
        ######## TOR WEBSITE ########
        listen 4443;
        listen [::]:4443;
        server_name blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion;

        rewrite ^/servers/anon.html http://$server_name/opsec/index.html permanent;
        rewrite ^/servers/(.*)$ http://$server_name/opsec/$1 permanent;
        index index.html;
        root /srv/blog/;

                #optional selfhosting + HTB locations in /srv/blog-archive:
                location ~ ^/(selfhosting|HTB)/ {
                root /srv/blog-archive/;

                }
}

Setting up Collaboration



Now if you want to make sure the blog content keeps growing, you'll need to either write your own blogposts in it or setup collaboration:

Now in order to make sure you can welcome external contributions, you need at least to be able to have a forgejo instance like the one i run here:

Now here you have a simple mirror git repo of the blog, once a day it will synchronize the new changes onto your mirror which is always useful to have in case if the main repository gets taken down.

If it were to get taken down for whatever reason, or if you decide to branch out and do your own thing with the blog, you can edit the repository to not be a mirror anymore (meaning you'll be able to push your own commits without going through me):

And once done you can recreate the collaboration kanban board like so:

Then you can add the an issue per tutorial into it like so:

You can also add labels to add more details on each issue, to be visible from the kanban board:

Then on each issue you can add labels on each like so:

Here the workflow is preety straightforward, the first column is there for the tutorials that dont have the todolist written yet, the second column is for those that do but aren't assigned to someone yet, the third column is for the assigned tutorials (with a 1 month default deadline), the fourth column is for the maintainer to review what the contributor has sent, and the last column is for the tutorials that are completed:

And then obviously, don't forget to have a SimpleX Chatroom to make sure you can chat easily with your contributors like i do here, this will help brainstorm ideas quickly and help clear up misconceptions with your audience directly:

And there you go! you now have a platform to receive criticism, collaborate and produce quality content.

Setting up a Mirror List



And then to make sure the nihilism blog remains resistant to takedowns, you can list it on your own Darknet Lantern instance, under the Blogs category:

Nihilism

Until there is Nothing left.



Creative Commons Zero: No Rights Reserved

About nihilist

Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8