Skip to content

LafeLabs/trashmagicmedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

self-replicating media

Install on Pi

Raspberry Pi is now impossible to buy. Find them donated from someone. Most people who have them don't use them or used them once and stopped due to lack of interest/time/need. Ask around! Someone will be able to donate a Pi, keyboard, mouse, screen, power supply and whatever other random things you need to get set up.

Get a SD card with 8 GB or more storage and a SD card USB reader

Download and install, then use the Raspberry Pi Imager:

https://www.raspberrypi.org/software/

Turn on the pi click through all the things, put it on the wifi network.

Open a command prompt(black link on menu bar) and copy/paste these commands line by line(you can use right-click with the mouse to both copy and paste):

sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php -y
cd /var/www/html
sudo rm index.html
sudo curl -o replicator.php https://raw.githubusercontent.com/LafeLabs/trashmagicmedia/main/php/replicator.txt
cd ..
sudo chmod -R 0777 *
cd html
php replicator.php
sudo chmod -R 0777 *

Check the IP address by hovering over the wifi icon, put that into the browser on another machine on the same local wifi network to see and edit the server. Or open a browser on the pi and point it to http://localhost.

Now to connect this pi to the outside world you want to forward port 80 traffic to your router to the pi. To do that, look at your router and see if there is information on how to log on, including login and password and the router IP address. If you can't find that information, try looking up your router make and model in a search and trying to figure out how to log on from there. Then click around and find the port forwarding or do a search for port forwarding and your router type, and forward port 80 traffic.

Next, you want to buy a domain name linked to a physical location near where your server is, ending in something other than .com like .net, .org, .xyz or .art. Edit the DNS entry for your domain to have an "A record" which points to your home IP address which you can get from www.whatismyip.com.

Ubuntu Install

Find any computer that anyone is getting rid of.

You will need a thumb drive. Follow the instructions below to install Ubuntu and wipe all the old data on the hard drive.

https://ubuntu.com instructions

Once Ubuntu is installed, open a command line and type:

sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php -y
cd /var/www/html
sudo rm index.html
sudo apt install curl
sudo curl -o replicator.php https://raw.githubusercontent.com/LafeLabs/trashmagicmedia/main/php/replicator.txt
cd ..
sudo chmod -R 0777 *
cd html
php replicator.php
sudo chmod -R 0777 *

This can be linked to the outside world with port 80 forwarding as in the instructions above with the Raspberry Pi.

Install on Android

To run a Geometron Server on an Android, we will install the commercial software ksweb pro.

link to play store to install ksweb

https://www.kslabs.ru/

Install KSWEB on the Android, and turn it on. Get the paid version. It is worth it, there are lots of broken web servers out there or ones with crappy features and tons of ads. This is critical infrastructure for Geometron and it's worth supporting the developer of this useful tool. Be sure PHP is also turned on.

This is what it looks like when it is on:

Use the Editor built into the system to create a new file called replicator.php in the directory htdocs on the sd card as shown above, and to copy/paste into that the file in php/replicator.txt. Save that, and delete index.php. Point a browser to the address http://localhost:8080. Click on replicator.php and wait for the system to copy. Sometimes it might time out, try it again. When the system has replicated, make sure your phone is on a local wifi network, and turn the server off and on again, and you will get an IP address for the phone which is shown in the app. The link for any other machine on the network other than the phone is the IP address followed by colon and then "8080". E.g. http://192.168.0.19:8080/. Share this link via email, text message, and links on other servers so that anyone on your network can see your server and edit it.

Replicate the Github using localhost

  • install PHP on your machine
  • create a new github repository on a CC0 PUBLIC DOMAIN license and clone it on your machine
  • copy the file php/replicator.txt into a file called replicator.php in the new repo directory
  • run php replicator.php on your machine, wait for all the code to copy
  • push all that code up to your github repo
  • in the same directory, type sudo php -S localhost:80
  • go to http://localhost and you should get back to this screen, edit all elements of the system
  • use editor.php to edit the file php/replicator.txt so that the two urls are the global url for your repo for both dna and replicator
  • after you've edited the code, click text2php.php to convert that to php
  • push your code to your github repo
  • use the new replicator code on your github repo to replicate out that instance to all other servers(linux, windows, mac, android) and forks
  • when you figure this out, make youtube videos showing other people how to copy the whole system, tell someone about those videos so that we can all link to them

Socials

Trash Robot Books

Live Trash Magic Servers