Previous Page

nihilist@mainpc - 2024-02-07

4get Setup

In this tutorial we'll setup 4get, a privacy front-end to browse the web:

Initial Setup

Clone the repository and edit the docker-compose file before running it:


[ Datura ] [ /dev/pts/8 ] [/srv]
→ apt install nginx docker.io docker-compose

[ Datura ] [ /dev/pts/8 ] [/srv]
→ git clone https://git.lolcat.ca/lolcat/4get
Cloning into '4get'...
remote: Enumerating objects: 772, done.
remote: Counting objects: 100% (772/772), done.
remote: Compressing objects: 100% (639/639), done.
remote: Total 772 (delta 410), reused 275 (delta 117), pack-reused 0
Receiving objects: 100% (772/772), 2.19 MiB | 22.00 MiB/s, done.
Resolving deltas: 100% (410/410), done.

[ Datura ] [ /dev/pts/8 ] [/srv]
→ cd 4get

[ Datura ] [ /dev/pts/8 ] [/srv/4get]
→ vim docker-compose.yaml

[ Datura ] [ /dev/pts/8 ] [/srv/4get]
→ vim ../invidious/docker-compose.yml

[ Datura ] [ /dev/pts/8 ] [/srv/4get]
→ vim docker-compose.yaml

[ Datura ] [ /dev/pts/8 ] [/srv/4get]
→ cat docker-compose.yaml
version: "3.7"

services:
  fourget:
    image: luuul/4get:latest
    restart: always
    environment:
      - FOURGET_SERVER_NAME=4get.nowhere.moe
      - FOURGET_SERVER_ADMIN_EMAIL="you@example.com"

    ports:
      - "127.0.0.1:8080:80"
      #- "127.0.0.1:4443:443"

    volumes:
      #- /root/.acme.sh/4get.nowhere.moe/:/etc/4get/certs
      - ./banners:/var/www/html/4get/banner
      - ./captchas:/var/www/html/4get/data/captcha

[ Datura ] [ /dev/pts/8 ] [/srv/4get]
→ docker-compose up -d

	

Then use the following nginx configuration :


[ Datura ] [ /dev/pts/9 ] [~]
→ vim /etc/nginx/sites-available/4get.nowhere.moe.conf

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


server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;


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

    server_name 4get.nowhere.moe;

    access_log off;
    error_log /var/log/nginx/error.log crit;

    ssl_certificate /root/.acme.sh/4get.nowhere.moe/fullchain.cer;
    ssl_certificate_key /root/.acme.sh/4get.nowhere.moe/4get.nowhere.moe.key;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;    # so Invidious knows domain
        proxy_http_version 1.1;     # to keep alive
        proxy_set_header Connection ""; # to keep alive
    }

    if ($https = '') { return 301 https://$host$request_uri; }  # if not connected to HTTPS, perma-redirect to HTTPS
}


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


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

[ Datura ] [ /dev/pts/9 ] [~]
→ nginx -s reload
	

Then simply browse to the URL:

Nihilism

Until there is Nothing left.



Creative Commons Zero: No Rights Reserved

About nihilist

Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8


Contact: nihilist@contact.nowhere.moe (PGP)