You don't need to be a docker wizard to setup searxng, i'll show you step by step. Unfortunately we are banned from Docker Hub so you should do something: - registry key (the one i use) - dns/proxy Change the registry key in Docker Daemon file:/etc/docker/daemon.json ------------- { "registry-mirrors": ["https://docker.iranserver.com"] }
Or you can pass it through the daemon as an argument:# dockerd --registry-mirror "<url>"
I like to run Docker as a non-root user, so first add your user to 'docker' group:# usermod -a -G docker <user>
! Now if you want to run Searxng on your pc for testing purposes, just follow the original document . I'll show you the setup in a vps with domain, so it depends on your needs to follow or not. First you need a domain/sub domain, i like the name sx.<domain> but it's yours. - create a directory for the Container and cd to it. - choose a port for docker, i choose 1234 for example. Pull the image:$ docker pull searxng/searxng
Create and run the container:$ docker run --rm -d -p 8791:8080 -v "${PWD}/searxng:/etc/searxng" searxng/searxng
!! the important thing you should do is this option in 'searxng/settings.yml' file that you need root access to edit:base_url: https://sx.nopwd.lol/
* just search for 'base_url' and change it from 'false' to the url you want. It's time to setup Nginx and we are done. ! Setup SSL with Certbot and change domain.com to you own.Just reload the server and done!server { listen 80; listen [::]:80; server_name domain.com; location / { proxy_pass http://127.0.0.1:8791/; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP \$remote_addr; } listen 443 ssl; ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; }
$ systemctl reload nginx
I hope this article helped you, it took me some days to figure it out.
You should be careful about torrent sites, you're on your own, but you can decrease the risk by some researching. Find official URL of the torrent sites from subreddits. Check the number of seeds, five is good. Seed is a computer that sharing file(s).
After getting the torrent file or magnet link you need a bittorrent client.
I use transmission because it is
lightweight and easy to use, also you can find it in most of distributions.
voidlinux: transmission
archlinux: transmission-cli
First you need to run the daemon:$ transmission-daemon
You can check the content of a torrent file with:$ transmission-show somefile.torrent
but it only works with files not magnet links. Get the status of all torrents you have been added:$ transmission-remote --list
Note: You need the ID of the added torrent for later steps. Add the torrent file or magnet link to the client but start the download paused. I guessed you don't want all files, if so, just remove the last switch and go to stop part:$ transmission-remote --add somefile.torrent --start-paused
Note: In case of magent link don't forget to put '"' around the link. If it succeed, it will give you a success message. Then list files of the torrent:$ transmission-remote --torrent <ID> --files
As you can see the Get option for all of them is Yes so if you start, all of them will start downloading, so set all of them to No by:$ transmission-remote --torrent <ID> --no-get all
Now select file(s) that you want:$ transmission-remote --torrent <ID> --get <num>,<num>,...
For example:$ transmission-remote --torrent 1 --get 5,7-10,4,2
It marks files #5, #7, #8, #9, #10 and #4 to the download list. Now start the torrent:$ transmission-remote --torrent <ID> --start
You can check the status with:$ transmission-remote --torrent <ID> --list
By using Watch command you don't need to enter that many times:$ watch transmission-remote --torrent <ID> --list
After it is downloaded just stop it from seeding(uploading):$ transmission-remote --torrent <ID> --stop
+ Getting notification after download completed In the daemon settings file there is two options for this: $HOME/.config/transmission-daemon/settings.json... "script-torrent-done-enabled": true, "script-torrent-done-filename": "~/.local/script/tordone.sh", ...
The tordone.sh script is where we want to call our notification to say something:#!/usr/bin/env dash dunstify "Torrent Done"
Also don't forget to make it executable:$ chmod u+x tordone.sh
* Does this client only has this little options? No, you can find many more options in the manual(transmission-remote(1) manpage). For example how to limit download speed, or how to change download folder.
Let's see the installation of the best linux distro ever. First of all, choose the iso image: - base (Recommended): It's BASED but not that hard, just be patient. - xfce: the name of a desktop, this version comes with a graphical environment. - glibc or musl: I like musl but you need glibc literally for everything, so choose glibc. It's recommended to have a working internet on your host(real) machine, but not necessary. Go to the qemu note and boot the live iso. Choose the first option in boot menu. You will see a blackscreen with some text on it, this is called TTY and it's your friend, don't panic! As the void says you have to default users: anon: normal user that can not perform OS installation tasks. root: this is what you want. void-live login: root password: voidlinux # don't show what you are typing for security reasons * Note: if you feel like mistyped something, just press Ctrl+u that will delete line. Run the installer: # void-installer Note: by pressing a letter you will go to the first occurrence of it. - Keyboard Layout: us - Network: choose the only option and say yes to DHCP appliance. - Source: Local, so it will get files from the iso not internet. - Mirror: World - Hostname: other machines in a network will know you by this name besides of IP, but it's a VM so take it easy, write a simple name. - Locale: en_US.UTF-8 - Timezone: America, New York - RootPassword: write any password that you want and like hostname write a simple one, but write it somewhere because it's the pass of the most important user, root. - UserAccount: now you create a normal user, so choose a goofy name and for display name delete the default value(ctrl+u) and write the same name you have chosen. Write a memorable password for the user. You don't need to change group membership of the user, the default is fine. - BootLoader: the only disk you have(e.g. /dev/sda) and say yes to graphical terminal. - Partition: Use cfdisk because it's easier for you. In this example we create partitions for BIOS/MBR system, but just know there are other options. - dos - create a New partition with size of 512M and select 'primary'(also for next one) also change Type to 'Linux swap / Solaris'. - go to the Free space and make a new one with default size(space left) but don't change default type(Linux). - Write and Quit - Filesystems: for the first one select 'swap', say yes to confirm. For second one 'ext4' with mount point '/'. - Install: just read the warning carefully and don't remember to set a timer!Graphics
Now you have a working system, but just TTY, it's good but you maybe need some graphics. First of all you should know some basic stuff: You have saw windows on screen, the program that manage it is called window manager. This program itself needs a low-level program that works with the hardware and it gives the ability to put a pixel on the screen. For that low-level guy we choose X11 and for window manager i3. # Install In this example i use voidlinux but that doesn't have much difference in other distros. Just install this packages:$ sudo xbps-install -S xorg i3 xinit i3status dmenu st vim
Explanation: xorg: this is the low-level one. i3: go to it's website to learn how to use it. xinit: initialize window manager and other X11 related programs. i3status: you can have some information like battery usage and network status. dmenu: program launcher, suckless version of the windows like ones. st: terminal emulator vim: the most important one Create a '.xinitrc' in your home with this content:#!/bin/sh exec i3
Start the window manager with:$ startx
Thanks to brycevandegrift, i learned about qemu from one of his youtube videos, before reading this article go check out his website and this video.
Qemu is a complicated program and i don't know even one percent of it. This are just the basic stuff so you can run a virtual machine. It has support for many architectures but you only need one or two of them, because of that some distributions like Arch and Debian splits it to a number of packages. For Arch you probably only need this ones: qemu-base, qemu-ui-gtk, qemu-hw-display-virtio-vga qemu-hw-display-virtio-gpu-gl, qemu-hw-display-virtio-gpu
It a good idea to make your disk images structured, for example:
[~/virts]$ tree
.
|---temple
| --- run.sh
| --- temple.qcow2
|---arch-test
| --- arch-test.qcow2
| --- run.sh
|---university
| --- start.sh
| --- university.qcow2
note: tree is a program that shows files/folders in a tree like format.
$ qemu-img create -f qcow2 void.qcow2 8G
Explanation: -f: choose the format of the image, in this case 'qcow2'(mostly used).
You need to first install an OS to the image so you can use the machine.
In this example we install the 64-bit voidlinux:
$ qemu-system-x86_64 -enable-kvm -smp 2 -m 2G -vga virtio \
-display gtk,gl=on -hda void.qcow2 -cdrom ~/iso/void.iso -boot menu=on
Explanation:
enable-kvm: this one is important, for now just know that without it
your machine will that slow that you almost can't use it.
smp: number of the cpu cores
m: the RAM size, 'G' for gigabytes and 'M' for megabytes(default)
vga: type of the VGA card, i did have a great experience with 'virtio'.
display: type of the display, you can choose sdl instead of gtk.
With gl on, in full-screen mode it will look like a real machine.
hda: selects the hard disk for the machine
cdrom: it's like to put a flash or cdrom to your machine.
In this example we use the voidlinux live iso, you can put any iso image on the machine.
boot: the boot order, with 'menu=on' you can choose to the drive to boot with a menu.
After installing the OS, for the next time just run the last command without
cdrom and boot options. To prevent typing that again you can write it to a file.
$ dash run.sh
note: you can use other shells instead of dash(bash/zsh/fish) that's not matter.
This are some most used shortcuts: