Presearch Node on Android

****** If you already done the node/guide but need to start up again for some reason:
open the Thermux application and type ls.
If you can see downloads:
type cd ./downloads/alphine
If you can see alphine
cd alphine
If you can see alphine.img copy paste this:




qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 -drive if=pflash,format=raw,read-only,file=$PREFIX/share/qemu/edk2-x86_64-code.fd -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 -nographic alpine.img


Then login with your root account details again and run the docker Presearch command again!





docker stop presearch-node ; docker rm presearch-node ; docker stop presearch-auto-updater ; docker rm presearch-auto-updater ; docker run -d --name presearch-auto-updater --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock presearch/auto-updater --cleanup --interval 900 presearch-auto-updater presearch-node ; docker pull presearch/node ; docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=4e70db9839fab2fd7028faa72f44e733 presearch/node ; docker logs -f presearch-node


___________



First you need to install a terminal on your Android device. In this guide we are using and recommending using Thermux ! You can download it here:




After installing Thermux we can move on with the installation.
Now we need to install the virtual machine that will run the Preach Node.
To install the VM software we then run the following command:




pkg install qemu-utils qemu-common qemu-system-x86_64-headless


After installation of this is done we want to make sure that wget is installed. To do that we run:




pkg install wget


After this we can move on to getting the system that we will install. To do this we run:




mkdir alpine && cd $_ wget http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.3-x86_64.iso


After the download is finished run the command:




ls


and make sure that it shows the alpine-virt-3.12.3-x86_64.iso file!
If so, we move on to creating a virtual drive to run our system and preach node on!
First we need to check how much storage the phone has! Make sure to have at least 5GB of storage available.
(minimum 5GB)

If you want to have larger space change the 5G to ??G where ?? is the amount of GB you want it to have access to! (make sure to double check your storage available!, it will not use all 5GBs directly but will have access to 5GB of storage. example of creating a 5GB virtual machine:




qemu-img create -f qcow2 alpine.img 5G


Now when the virtual machine is declared we want to move on to launch
the system to install it in the virtual storage we created.
To do that we run:




qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 -drive if=pflash,format=raw,read-only,file=$PREFIX/share/qemu/edk2-x86_64-code.fd -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 -cdrom alpine-virt-3.12.3-x86_64.iso -nographic alpine.img


Now we are logged in as root! Next step is to enable the internet for the machine!
To do this we run:




setup-interfaces


it should show:
Available interfaces are:
eth0. Enter ‘?’ for help on bridges, bonding and vlans. Which one do you want to initialize? (or ‘?’ or ‘done’) [eth0]
If it shows the same at the top as in the [] box just press enter.
Otherwise type in the same as it shows at the top!
Then it will show:
Ip adress for eth0? (or ‘dhcp’, ‘none’, ‘?’) [dhcp] if it doesn’t say [dhcp] its recommended to write this and then press enter.
lastly it will show Do you want to do any manual network configuration? [no] if it doesn’t say [no] its recommended to write this on and then press enter.

You will now have to type in the following:




ifup eth0


(if your internet setting was other then eth0 like eth1 or so then change the eth0 to that)
Then press enter.
Now We have internet to the virtual machine!
Now we want to install the system.
I recommend getting the answerfile to make the installation go more smoothly!
to get that we run the following:




wget https://gist.githubusercontent.com/oofnikj/e79aef095cd08756f7f26ed244355d62/raw/answerfile


Setup the disk to be ready for the install by running:




sed -i -E 's/(local kernel_opts)=.*/\1="console=ttyS0"/' /sbin/setup-disk


Now we can run the installation!
To start the install run the following:




setup-alpine -f answerfile


It will eventually prompt you to set root password.
Make sure you set your own password and keep it safe.
password input is done twice and it does not show your input!

After the system installation is done you will get back to alphine:~#
where you run:




poweroff


Now we can boot in to the installed system by using:




qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 -drive if=pflash,format=raw,read-only,file=$PREFIX/share/qemu/edk2-x86_64-code.fd -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 -nographic alpine.img


After this we can login with root/thepassword you set and start installing docker and make sure it runs when the system boots by running the following commands


apk update && apk add docker


service docker start


rc-update add docker



Now you can run the linux docker command to run Presearch Node!
(below is the example with an example registration code).



docker stop presearch-node ; docker rm presearch-node ; docker stop presearch-auto-updater ; docker rm presearch-auto-updater ; docker run -d --name presearch-auto-updater --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock presearch/auto-updater --cleanup --interval 900 presearch-auto-updater presearch-node ; docker pull presearch/node ; docker run -dt --name presearch-node --restart=unless-stopped -v presearch-node-storage:/app/node -e REGISTRATION_CODE=4e70db9839fab2fd7028faa72f44e733 presearch/node ; docker logs -f presearch-node



If there is any questions or suggestions please contact us trough telegram




Donate Presearch Tokens:





0xE63eb8412588ef86D6A64dab8c35618Eb86D221c

+