💾 Archived View for siiky.srht.site › kB45oC › redbean-mirrors.gmi captured on 2024-08-18 at 17:52:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

-=-=-=-=-=-=-

Local offline mirrors with redbean

siiky

2023/11/16

2023/11/16

en

AT LAST! Got redbean working as a local offline mirror webserver!

https://redbean.dev

Firstly, download redbean. The "original" flavor (no ssl, lua, or sqlite) is enough for this purpose.

Thenly mirror the website. For example, using GNU WGET, the following command will mirror my public wiki-like thing (but nothing up the tree, such as this post), excluding the assets directory. Some of the arguments aren't always necessary, adapt to your own needs.

# --execute robots=false  ignores robots.txt -- do good and not evil!
wget \
  --no-host-directories \
  --user-agent=friendlypersonalarchiver \
  --execute robots=off \
  --mirror \
  --convert-links \
  --wait=2 \
  --random-wait \
  --limit-rate=100k \
  --no-parent \
  --page-requisites \
  -o mirror.log \
  --exclude-directories /wiki/assets/ \
  https://siiky.srht.site/wiki/
# Also interesting is  --cut-dirs=<n>

../wiki/index.gmi

Don't actually do this for my capsule, though, it's mighty inefficient! See the following page for that:

../alt.gmi

Finally, after that's done, change to the wiki directory, ZIP everything up into redbean, make it executable, and run it:

cd siiky.srht.site/wiki/
zip -n: -r -9 -X ../../redbean-original-2.2.com *
cd -
chmod 0700 redbean-original-2.2.com
./redbean-original-2.2.com

Now when you go to http://localhost:8080/ you'll be greeted with the wiki's index.html.

Of course I still think one shouldn't need to go through all this hassle... Nonetheless, redbean is fucking awesome!

mirrors.gmi

pagat-archive.gmi