A New Paradigm For Web Hosting

I host dozens of wordpress sites for lots of different projects I am either actively working on or worked on in the past, or where I’m just helping others have a website for projects they’re working on.

The Problem

Serving a lot of wordpress installs can take a lot of resources, but most of these sites rarely changes, particularly for my past projects. This makes it very tempting to just save the whole site as static html and serve that. The advantage there is that I don’t need to run a production database for that site, I don’t need to worry about constantly patching and updating the wordpress install, etc, etc. So serving static html is super ideal but also it makes it harder to do updates.

I run a daily backup of all my virtualhosts, thei wwwroot directory, and their corresponding database. These all go automatically to my nas. So it’s easy for me to load them into a new server if there is ever a problem. I simply run the SQL export, load the virtualhost, and unpack the wwwroot archive, and then I have a carbon copy  of the wordpress install ready to go from the night before.

Another problem is the fact that I’ve been using half a dozen vpses in order to get different ip addresses for seo. I would really like to move some of these to ipv6 so that I can get the benefits of multi-server seo without having to pay for multiple servers.

Past Attempts

In the past, I’ve tried several ways of serving static versions of the wordpress sites. One way was to move all my wordpress installs to administrative subdomains, and then use a recursive wget on a cron job to save the whole website as static html and write that to a production directory where it can be served as the main site. This worked well for dramatically improving resource consumption from normal user requests, but it made the infrastructure a lot more complicated because I’m still running all those databases and I still need to patch everything constantly. It also meant that I have to recursively download the entire site every time I want to update anything. This is fine for small simple sites but my blog has tens of thousands of files, so that becomes a huge resource drain that takes a really long time on a cloud vps, whenever I want to update anything.  And it’s running on the same production vps which negatively impacts user requests.

New Idea

So I came up with a new strategy. I want to build a simple vm on my laptop which I can use for updates, and then have it save the new static files locally, before pushing any updates to the production vps in the cloud.

This would really shrink down my cloud resources consumption by moving most of the hard work to my development machine and freeing up lots of resources in the cloud.

Building the Dev VM

I’m going with Debian 11 in VirtualBox on my 2020 Razer Stealth 13. This laptop has a 2TB WD Black NVMe SSD, 16GB RAM, and an 8-thread, 4-core i7 at 3.9ghz. This machine has vastly more resources that an affordable cloud vm has, so it makes a lot of sense to move the work here.

These setup notes are mostly for my own future reference;

First Set Up The Basics

After you install Debian 11, log in as root and install sudo, then run visudo and add yourself.

Next log in as yourself.

Install Guest Additions.

sudo systemctl enable ssh

Now log in via putty or something like that.

apt-get install fail2ban apache2

Now set up secure transport so we can install PHP.

sudo apt-get install lsb-release apt-transport-https ca-certificates

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

sudo echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/php.list

sudo apt-update

Now install php 8;

sudo apt-get install php8.0 php8.0-{bcmath,bz2,intl,gd,mbstring,mysql,zip,xml,curl}

Disable deafult virtualhost and remove default webroot directory

sudo a2dissite * && sudo service apache2 restart
sudo rm -rf /var/www/html

Install LetsEncrypt for free SSL.

Unfortunately they made this a lot more complicated so first you have to install their preferred package manager.

sudo apt install snapd

sudo snap install core; sudo snap refresh core

sudo snap install –classic certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot

sudo certbot –apache

Set Up MySQL Database Server

First you have to install the repository;

sudo wget https://repo.mysql.com//mysql-apt-config_0.8.18-1_all.deb

sudo apt install ./mysql-apt-config_0.8.18-1_all.deb -y

Now update the repositories and install mysql-server;

sudo apt update && sudo apt install mysql-server

sudo mysql_secure_installation

Configuring mysql server is a nightmare. I like to reduce the max connections to 25 so that the server doesn’t consume too much resources.

Edit the file /etc/mysql/my.cnf and add the following lines to the end;

[mysqld]
max_connections = 25

Overview: Step One

My long-term plan is to use IPFS to distribute the files from the development server to the production server(s). But first I want to get everything working in a simpler way using BTSync. This is a very similar distribution paradigm but a lot of the hard parts of the work are abstracted away.

The process is to make changes in wordpress on the development server, update the local static copy, and then BTSync will mirror those changes onto the production servers automatically in real time.

Overview: Step Two

The goal state would be a simple system of round-robin dns which allows several cloud servers to handle serving all the static sites. Then IPFS rapidly pushes any updates from the dev server to those cloud servers.

The process here is to make changes in wordpress on the development server, update the local static copy, publish the changes to IPFS, and update the DNSLink record. The production servers will listen for the updated DNSLink record, and then download the updated files automatically.

Ideally this process will eventually happen over tor. Hopefully you can see where I’m going here. I am trying to incrementally move towards the ideal our-space model by taking incremental steps to change my current content distribution model to be more like our-space.

This way, a future our-space app can replicate this model by simply including any content management system and then pushing the content out through ipfs over tor and updating its public address.

Step One: BTSync Distribution

Install BTSync

This used to be less complicated but the old way doesn’t work anymore.

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 992A3C9A3C3DE741

sudo echo “deb http://deb.silvenga.com/btsync any main” >> /etc/apt/sources.list

apt-get update

apt-get install btsync

Not too bad, right?

You will have to change the ownership of the /var/www directory to allow btsync to pull files from there;

sudo chown btsync:www-data /var/www

Install PHPMyAdmin

Navigate to your webroot

cd /var/www

Download pma (Get the most recent link from phpmyadmin.net)

wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.zip

unzip php*.zip

rm php*.zip

mv php* pma

Modify Virtualhost

sudo nano /etc/apache2/sites-available/000-default.conf

Change the DocumentRoot to /var/www

Add the following block of text at the end of the file.

<Directorymatch “^/.*/\.git/”>
Order deny,allow
Deny from all
</Directorymatch>

<Directory /var/www/webs/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Now save that file and restart apache.

sudo service apache2 restart

 

Moisture Farming

Arizona, Southern California, and Northern Mexico are about to lose access to their main water source. Wells are drying up as rainfall decreases. Despite occasional deluges, many areas are now seeing half the rainfall they did historically. When I visited the Earthship Biotecture Academy at Taos, they said they are getting about half the annual rainfall they were getting a few decades ago. It’s a similar story around the world.

This is due, in part, to increased air pollution which causes moisture to stay in the air instead of precipitating as rainfall. That means there is a lot of extra water in the air which we can extract with special tools and techniques.

This really clicked for me earlier this year when I visited many off-grid farms in Tennessee. They were all complaining that the water table has been falling, meaning the wells have to go deeper and deeper to find water, and yet the air was extremely humid. I noticed many people collecting the condensation that drips from their air conditioners to use for watering plants or flushing toilets.

Fog Catchers

One of the easiest ways to harvest water from the air is using mesh fabrics in areas with high fog. This is especially easy in the hours just before sunrise when the air is supersaturated and just looking for an excuse to drop its water. Check out this video of the technology in action in Peru.

Air Wells

Air wells are an ancient technique for extracting useful water from the air. There are some techniques which can even create ice from the humidity in the air, in the desert heat.

Air Well

Air wells do have some disadvantages compared to the other techniques we will discuss. For example, they are large low-tech structures which may not produce as much water as a smaller and more technologically advanced piece of equipment.

Atmospheric Water Generators

An atmospheric water generator is a piece of high-tech equipment which is designed to produce as much water as possible, as efficiently as possible, and to make that water immediately safe to drink.

Atmospheric Water Generator

Atmospheric water generators have downsides too. They are more complex, more expensive, and require more maintenance.

Closing Loops

Regardless of the water source you’re using, the most important thing is conservation. We need to be reusing water as many times as possible; grey water should be used to water plants. The runoff from that should be used to flush toilets. Black water should be used to run a biogas digester and create power while reclaiming the water for reuse.

It doesn’t do us any good to find new water sources if we continue wasting the water we get. Air wells are a great way to extract water from the air, but we still have to be careful to protect and conserve that water as much as possible or else we will be right back in the same situation of unnecessary scarcity.

Current Camping Gear List

My Favorite Tent (~$55)

This tent is amazing. It packs down small and then all you have to do is unzip the bag and it pops up in literally two seconds. It’s unbelievably easy and it does great in heavy wind and rain. I have never staked it down or even used the guy lines; I just throw my duffle bag inside with the sleeping bag, and everything stays put.

As a burner and avid camper, I have owned a lot of tents from Kodiaks to Shiftpods and , and I still do. But this one is hands down my all-time favorite tent. It’s just so easy and so convenient. It’s also surprisingly durable for just fifty bucks. I’ve been using it for about a year now with no issues.

I also really like the large screens on the sides, roof and front door, and the super simple rain fly the covers the top when you need it.

Tent

My Favorite Sleeping Bag (~$85)

I have also tried a lot of sleeping bags. I like to find the best gear without spending much money. One thing I’ve learned is that the temperature ratings are misleading. If you buy a sleeping bag that is rated for 40 degrees, that means you’re not going to die if it’s 40 degrees. It does NOT mean you will be comfortable in 40 degree weather.

This sleeping bag is rated for -40 degrees. I’ve used it in the heat and the snow and it’s been super comfortable across the range of weather. It also comes with a cinch bag so it packs down very small. The best part is that since the foam is so dense, it also provides plenty of padding. I don’t even use a sleeping pad anymore because of how comfortable this sleeping bag is.

Sleeping Bag

Hammocks

I like the Eno Double Nest hammocks with the Atlas straps (See below). The Double Nest can hold two people comfortably and safely. The Atlas straps make it super easy to hanging securely between trees while also protecting the trees.

Hammocks, Atlas Straps, and Lights

Stove and Coffee

I love the Jetboil and the Bialetti Moka Pot. It’s eleven degrees below zero in the photo below, as you can see by the icy table. The Jetboil and Moka Pot had no trouble pumping out shots of espresso to warm us up on this cold Mammoth Lakes morning.

I have the Jetboil flash plus the pot support which helps keep the Moka Pot far enough from the built-in wind-screen to still let it breathe enough to burn.

I’ve also tried Jetboil’s french press insert, but I didn’t like it because it takes too much time and water to clean it compared to the Moka Pot.

It’s also super easy to make cowboy cold brew while camping. I did a whole explanation of that here.

 

Don’t Underestimate The Zhush

Decorating your camp site is a critical part of camping. You need to bring the magic and convey that you are a fun and approachable person, if you want to have an easy time making friends.

I don’t bring much with me when I go camping, so the fact that I put so much emphasis on this topic should tell you that it’s something I’ve found critical to a good camping experience.

I made a whole separate post about how to set up a simple and powerful solar power system that will give you plenty of power for charging your devices as well as powering lights and decorations.

My main advice would be to do everything with USB power which is very easy to set up and power. Here are the main zhushings that I recommend based on my experience…

You will need a reasonably large USB battery bank with passthrough (can power things while also charging). It can be hard to figure out which ones support this, but generally speaking I’ve found that the ones which have the charger and battery in one unit will support charging while also discharging.

If you’re going to do this for a whole weekend, get a usb solar panel to continuously charge the battery.

Several USB extension cords and several usb hubs to split the power up for all the devices. I like to use hubs with switches so I can turn things on and off more easily.

Several long (33ft) USB-powered fairy lights. I really like the way the blue ones look at night. They really make the color of the tent stand out, but in a reasonably subtle and non-obnoxious way.

I use four of these special usb electroluminescent drivers (For EL Wire) plus a bunch of different colors of EL wire.  I like to kind of pile these el wires up around the table to create a cool ambient effect that helps you see your camp table and avoid walking into it in the dark. I don’t like to bring a table, since most camp sites already have them, but I’ve had a good experience with this one in the past, if you really want to get one.

I also recommend something like strings of globe lights which are more for actual illumination than just decoration. I like to use velcro ties to hang these up in the tent which makes it super easy to take them down and put them up, and wrap them around the tent a few times to make sure you get plenty of light when you need it.

OurSpace Examples: OurTube, OurTok, etc

Building on my ongoing work on Ourspace, I think it’s important to consider a whole range of alternative apps formatted just like major products on the market.

Ourspace itself would be format agnostic. It’s a general purpose content distribution and sharing platform and protocol.

But you could easily build a version of it which looks only for short video content across the network and sorts it by positive reactions from friends or people with similar interests. This would be sort of like an OurTok.

Likewise, you could easily build a simple, free, distributed video service and call it OurTube.

The initial concept is just a general purpose browser app which implements the protocol and the technology and then allows anyone to publish or subscribe to others. Building on that, it would be easy to improve on the existing products by simply creating free, distributed, open-source alternatives to the products that are currently leading in the social media marketplace.

Why and How to Build a Fiber Foamie

During covid, I built a fully solar-powered off-grid micro-camper called a squaredrop. I designed it to tow behind my Honda Civic. I traveled over 22,000 miles to 35 national parks in 28 states. You can see the whole adventure at movingcabin.com.

What’s a Squaredrop?

A squaredrop is sort of like a teardrop trailer but more square. This means more room inside as well as more room outside for solar panels. The impact on towing efficiency is very small as long as the camper is not wider or taller than the tow vehicle.

I did design my camper to charge an electric vehicle, the Sondors Metacycle which I originally intended to buy. But a lot happened at home and I decided to postpone the rest of the national parks until after grad school and spend some time with my family.

Moving On Up

Since then, I traded in my Honda Civic and bought an electric car (The Chevy Bolt) which can tow and has great range!

@cjtrowbridgeI got a solar powered electric vehicle! ⚡♬ original sound – CJ Trowbridge

What’s Wrong With The First One?

My first-gen squaredrop camper is great but not perfect. It’s very overengineered. I built it to be extremely durable. It is made of 3/4 inch pressure treated plywood over a 2×6 deckboard frame and insulated with one inch polyisocyanurate foam, and then it’s painted with white flex seal.  On top of that, every joint is steel bracketed. So it’s fire proof, water proof, and it would probably survive a highway-speed rollover. But it’s also very heavy and too maximalistic.

So I decided to build something extremely light and extremely minimal that can still charge an electric vehicle. Another thing I wanted to improve on was the hubs and tires. The first-gen squaredrop has a top speed of 60mph which is super not ideal for transcontinental jaunts.

What’s A Foamie?

A foamie is a camper that’s built from foam instead of wood, and then it’s wrapped in something like fiberglass or more often “poor man’s fiberglass.” The construction technique is called composite core construction.

Here’s a really good and comprehensive explanation of the composite core construction technique…

Basically if you take a foam structure and wrap it in something stronger like fiberglass, then the whole structure acts like a solid piece of fiberglass. It’s a super cheap and very strong construction technique.

A foamie is just a camper that is made from this technique. Here’s an example timelapse of the construction process for a foamie…

What To Wrap It With?

The most popular way to wrap a foamie is with what’s called “poor man’s fiberglass.” This is what’s demonstrated in the video just above. Basically you wrap the foamie in canvas that’s been saturated in wood glue. Once it dries, it’s extremely strong. And then you can simply paint over it and you have a good looking and highly durable foamie camper.

I want to use carbon fiber instead. This is much lighter, much stronger, and much sexier. The technique is very similar, and the composite core construction video above explains the technique and best practices for doing something like carbon fiber or even fiberglass instead of the “poor man’s fiberglass.”

Design Inspirations

I almost feel like this motorcycle camper trailer is too big.

 

This is actually a carbon fiber teardrop, and it’s cute but the pure teardrop shape is boring because you can’t really put solar on it. Also the dark color means it will be extremely hot inside all the time.

 

I really like the angles on this one, and the styling on the side with the panels. I think this would be a good general aesthetic, but again the dark color means it will always be hot inside. And instead of a roof rack, I would put as much solar as I can fit.

 

This is basically perfect except it needs solar, and I’d definitely paint the ugly red trailer.  Also, it looks a little tall. I happen to know that this trailer frame is the 4×8 harbor freight frame. It looks like the trailer is five feet tall or more. I would want it to be a little shorter so that it is more efficient to tow.

 

This is a project I volunteered on earlier this year. I really like the way the structure is not tall enough to stand up in; the design forces you to spend at least some time outside, but provides shelter when it’s necessary.

 

On that note, I am interested in designing something similar to a single cell from a capsule hotel. It should have a bed, some basic lights, HVAC, and that’s basically it. I don’t need the full kitchen which I included in the first generation but almost never really used. The car has lots of space in the back for my bear-proof cooler if I feel the need to bring cold things.

round robin ipfs over http

a web gateway protocol that automatically fetches the DNSLink for any c-name pointed at the server and then locally replicates that site and serves it when requested

these could easily be round robined by adding redundant c-names to different gateways for your domain.

The protocol could be limited to file types like html, css, js, jpeg, gif, png, etc. And it could have limited file sizes so that people are really using it just for their personal sites and profiles without trying to host apps on it or something like that. Larger files like mp4, mkv, etc could simply link to a public ipfs gateway instead of hosting locally.

This is a good early-stage strategy for our-space which would make it fast and easy to access profiles without needing lots of bandwidth.

Fake News?

I think in many cases there are fundamental epistemic differences between people of different ideologies, and we need to learn to distinguish those kinds of claims from bad faith claims. Like if a trump supporter says he’s coming back in August, they really believe that to be true. And that’s different from Putin’s fake newspapers putting out stories that no one believes in. The far right often acts in what they see as good faith based on their assumptions about reality. I think it is a failure of discourse to dismiss their fundamental beliefs about reality as equivalent to news sources which have been deliberately constructed to push a narrative which its own authors regard to be false.

Does post-structuralism merely extend the hegemony of neoclassicalism?

As a queer nonbinary person who is wrestling with whether or not to embrace post-structuralism, it’s been very interesting over the years to hear so many arguments from fans of queer theory against things like hate crimes legislation or even marriage equality. One of the more obvious arguments has been the fact that marriage equality is essentially just the legislation of homonormativity or the way a certain class of affluent, able, cis, white, gay men try very hard to be just like affluent, able, cis, white, straight men; forsaking the duties their privileged identities confer on them.

They argue that marriage is not something we should want to earn through sufficient assimilation, but rather something to reject as fundamental to the cisheteropatriarchal hegemony we are ostensibly interested in dismantling. It’s sort of the same argument against second-wave feminism and its “Equality for White Women” mantra, or against groups like the Human Rights Campaign or the NAMES project which fired all the activists at some point and became bootlicker shills for neoliberal capitalism and actively worked against the interests of the groups they originally identified as fighting for.

On the other hand, I’ve heard critical theorists and utopian intentionalists alike argue that post-structuralism itself is merely acting in service of neoclassicalism by infinitely dividing classes that could otherwise stand together to oppose the cisheteropatriarchal hegemony of neoclassicalism.

How To Do 100-Watt USB-C PD In The Car

I have personally found a good solution to this problem. Modern laptops like mine require a much higher power input than what you can get out of a normal USB car charger. In the past, I really like this 39-watt QC-3 charger which is what I use in the car for charging my phone. Now this would eventually charge your PD-100 (Power Delivery at 100 watts) laptop but it will take much longer, and it’s not enough power to keep it running.

So how to get PD-100 (100 watts) for your USB-charging laptop in the car?

There are some cheap and super sketchy “PD” products on the market like this one. So there are a lot of red flags here. First of all it says it’s both QC 3 and PD-60. That doesn’t make any sense, especially considering it’s $15. Buying this kind of sketchy product is basically asking to get your laptop fried.

100w PD is too new to have reliable commodity accessories like this. PD chargers are expensive because its really easy to design them poorly and then they fry your computer. Don’t go cheap on your Power Delivery charger or you’ll regret it.

Just use an inverter with a 120v charger.

This is the charger that I use. I love it, it works great. It’s tiny and easy to store, and it can also charge a second device at the same time.

USB C Charger for MacBook Pro Air, RAVPower 90W 2-Port Wall Charger PD 3.0 GaN Type C Fast Charging Adapter

Then just plug that into a 120v inverter. I like this one because it’s affordable and reputable and super highly rated. It also has a couple of extra USB-A plugs that you can use to charge other things at the same time.

DEWALT DXAEPI140 Power Inverter 140W Car Converter 12V DC to 120V AC Power Outlet with Dual 3.1A USB PortsOf course your probably already have a PD-100 charger if you have a laptop that needs it, so just use that with this inverter or some other inverter. That way your laptop will be safe and you can easily run it in the car. Just make sure to get something reputable with good reviews from a trusted brand like this one.

I really like that Gallium Nitride charger I linked above because it’s tiny and easy to store and I can just leave it with the inverter in the glove box. Happy laptopping!

Looking Glass

A screen which changes perspective with regard to how you’re looking at it versus what it’s showing inside a virtual world where it’s virtual correspondent is. So if it’s easier looking at it from the right side then it should show you what it would look like if you were actually looking through a window that way versus looking at it from the other side.

This allows users to access NPC expert systems within their personal virtual workspace.