Webhosting - digital garden
What is a digital garden?
A digital garden is an online space that is somewhat inbetween a notebook and a blog, where digital gardeners (you) share seeds of thoughts to be cultivated in public.
A website is typically a somewhat hierarchical space, one where the creator curates content. Now it is our challenge to think of the webpage as a space for collectiveness. You'll be working together on cultivating a digital garden. What this entails is up to you.
Examples
- http://compost.party
- https://melonking.net/free/software/flood
- https://midnight.pub
- https://joelhooks.com/digital-garden
- https://www.mentalnodes.com/about
Serving content
1: To connect with the phone with SSH you need to connect both the phone and the computer to the same network. On the phone use volume up or the gestures to navigate through the menu. Go to Networks->add WPA network and select the network you want to connect to. In our case well use bridgenet, enter the password (interaction). Then connect the computer to the same network.
2: Find IP on the phone; navigate the menu to networks>Ifconfig> then look for wlan0 and find the inet address in my case the inet address is 192.168.1.203.
3: In order to ssh into the phone you will open the terminal on the computer and type the following command (change IP accordingly):
$ ssh user@192.168.1.203
You will be asked to enter a password. The default password on the user account on PMOS is 147147.
4: Install ngnix
in order to install ngnix we will use the following guide:
https://wiki.alpinelinux.org/wiki/Nginx
5: After this we will need to disable the firewall on PMOS, this is done with the following command:
$ sudo rc-service nftables stop
6: After this you can visit your website hosted on the phone using the IP address. To do so open a browser and enter the following: http://192.168.1.203 (change IP accordingly) If all is right you should see a webpage displaying the following text: Server is online
7: We still need to make sure that nginx will run on every boot. (So if the device restarts, the server will do so as well) To do so enter the following command:
$ rc-update add nginx default
We need to make sure that the firewall is disabled on every boot as well, enter the following command:
$ sudo rc-update del nftables
In order to test that this is running well enter the following command:
$ reboot
The phone will now reboot and the ssh connection will be broken, once the phone has restarted, refresh the webpage mentioned in step 6 to see if the webpage is still displaying the following text: Server is online.
Yay! You're serving content!
Now we must change the html and css of the page, so we can build our own website!
Quick start guides
HTML quick start
CSS quick start
Collective gardening exercise
Create a pad pad.xpub.nl and share the link of this pad with your group members. Collectively navigate this space (open source online text editor, that allows real-time collaboration) and write a HTML page together. Think be mindful of hierarchy and make sure that everyone feels ownership of this space and has the authority to edit, delete or move any and all content.
SFTP your files
In order to serve the HTML and CSS you created, the files must be transferred from the desktop/laptop you created them on, to the phone. To do this we'll use SFTP. (SSH File Transfer Protocol)
If you've followed along with installing PostmarketOS, you've enabled the SSH daemon
. This also allows us to upload files to your phone over SFTP
. Open your favorite (S)FTP
client (ex.: filezilla or cyberduck) and enter the ip address and username of your PostmarketOS installation. An example:
server: 192.168.2.130 port: 22 username: user password: 147147
After connecting to your phone, you should be able to upload files.
Misc Notes
Firewall
If you want to keep the firewall running you need to make a rule for accepting HTTP
and HTTPS
traffic.
- create the following config file
/etc/nftables.d/60_http.nft
with the following:
#!/usr/sbin/nft -f table inet filter { chain input { # allow ssh tcp dport { 80, 443 } accept comment "accept HTTP and HTTPS" } }
- restart
nftables
sudo service nft restart
Stealing a website
You can check the html/css of any website. So if you ever see something you would like to 'steal' you can use this guide.
https://ps.wdka.nl/wiki/Stealing_A_Website
Web to print
There was some interest in potentially developing some kind of web-to-print zine type project. These are some links I found surrounding this subject.