Installing Mycorrhiza on OpenBSD
Mycorrhiza is an excellent wiki, and it's the same software that runs this very website! First, install it on OpenBSD by running # pkg_add mycorrhiza
. You can find more details on mycorrhiza.wiki, but instead of using httpd
and relayd
, I'm using Nginx.
(Thank you to Solene for writing a tutorial on Nginx on OpenBSD.)
Installing Betula on OpenBSD
Betula is a bookmarking service just like Pinboard, but it's built for a single person. Just like Mycorrhiza, it's designed to be easy to deploy. It can also talk to the fediverse!
-
First, follow Betula's installation instructions to build the binary. Copy the binary from
go/bin/betula
to/usr/local/bin/betula
. -
We don't want to run this as
root
so we can create a user calledbetula
using the commandadduser
. -
Create a directory called
/var/betula
which will hold the SQLite file. Runchmod -R betula:betula /var/betula
to set permissions to thebetula
user. -
Add
betula
in/etc/doas.conf
. -
Run Betula when the computer starts using cron:
@reboot doas -u betula /usr/local/bin/betula /var/betula/links.betula
Note: Perhaps I can turn this into a package by taking inspiration from Mycorrhiza's Makefile?
Nginx configuration
# Durian
server {
listen 80;
server_name durian-distro.org;
root /var/www/htdocs/durian-distro.org;
location /.well-known/acme-challenge/ {
rewrite ^/.well-known/acme-challenge/(.*) /$1 break;
root /acme;
}
}
# Mycorrhiza
server {
listen 80;
server_name jagtalon.net jagtalon.com www.jagtalon.net www.jagtalon.com;
location / {
proxy_pass http://127.0.0.1:1737;
}
location /.well-known/acme-challenge/ {
rewrite ^/.well-known/acme-challenge/(.*) /$1 break;
root /acme;
}
}
# Betula
server {
listen 80;
server_name links.jagtalon.net;
location / {
proxy_pass http://127.0.0.1:1738;
}
location /.well-known/acme-challenge/ {
rewrite ^/.well-known/acme-challenge/(.*) /$1 break;
root /acme;
}
}
server {
listen 443 ssl;
http2 on;
server_name durian-distro.org;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header Onion-Location http://j3rcq2et2mbop4ftzgvcu4pt2wjoij7nyhvnhehe36ge4hebxkhvunyd.onion$request_uri;
root /var/www/htdocs/durian-distro.org;
ssl_certificate /etc/ssl/jagtalon.net.crt;
ssl_certificate_key /etc/ssl/private/jagtalon.net.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
ssl_prefer_server_ciphers on;
}
server {
listen 443 ssl;
http2 on;
server_name jagtalon.net jagtalon.com www.jagtalon.net www.jagtalon.com;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header Onion-Location http://q4yjadza5ad62fie7jx36vcrpyqzjjafo2bbrxkbcaufevrhhkhey6ad.onion$request_uri;
location / {
proxy_pass http://127.0.0.1:1737;
}
ssl_certificate /etc/ssl/jagtalon.net.crt;
ssl_certificate_key /etc/ssl/private/jagtalon.net.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
ssl_prefer_server_ciphers on;
}
server {
listen 443 ssl;
http2 on;
server_name links.jagtalon.net;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header Onion-Location http://ciyhhtxwyouczbqlganda6ndppahz5uspzha6wr5s3wa4sgvrn3i72id.onion$request_uri;
location / {
proxy_pass http://127.0.0.1:1738;
}
ssl_certificate /etc/ssl/jagtalon.net.crt;
ssl_certificate_key /etc/ssl/private/jagtalon.net.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
ssl_prefer_server_ciphers on;
}
No copyright
Do whatever you the fuck you want with anything in here. Steal, copy, distribute, modify, even sell the contents of this website.
Contact
-
Mastodon: @jag@weirder.earth and @durian@ni.hil.ist
Other websites
-
Zines and masks: Durian Distro
-
Bookmarks: Betula
-
Photos: Flickr