I've been trying out this new self-hosted blogging platform, WriteFreely. It's minimalist but pretty nice.

= Getting it working =

I'm running version 0.12.0 from https://github.com/writeas/writefreely/releases/tag/v0.12.0

I wanna host it at https://rant.meidokon.net, as a multi-user instance so that I'll get `/furinkan` on it. I've installed it on [[servers/illustrious]] in my own homedir.

Installed mariadb, added a new user and gave them a DB (both are `writefreely_rant`)

Followed the [[https://writefreely.org/start| official guide]] and created a multi-user instance to play with.

Installed certbot with snap as per this guide: https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx

Ran certbot and let it SSL-ify my rant.meidokon vhost

Pointed the hostname to my public IP, can't use a CNAME (was trying to use thighhighs).
Also had to add a CAA record for the subdomain, I thought the top-level would've covered it, as we're already permitted for letsencrypt

Tested dryrun renewal, looks good

Auto-renewal actually looks good this time! `/etc/systemd/system/snap.certbot.renew.timer`

Kick off the service: `systemctl enable --now writefreely-rant.service`

Looking good! https://rant.meidokon.net/furinkan/


= Timezone issues =

WF assumes your server is on UTC timezone, which is just silly if you ask me. As a result, after importing a bunch of posts I've had to fix the timestamps on them. Mostly, it was pushing them into the next day because I'm at Australia/Sydney (UTC+10).

Get on the mysql shell and you can fix them up though.

{{{
-- Make lots of changes
UPDATE posts SET created = DATE_ADD(created, INTERVAL -16 HOUR) WHERE created > '2012-12-29 00:00:00' AND created < '2013-01-02 00:00:00';
Query OK, 4 rows affected (0.042 sec)
Rows matched: 4  Changed: 4  Warnings: 0

-- Or just fix a single post
UPDATE posts SET created = DATE_ADD(created, INTERVAL -14 HOUR) WHERE id = 'vw37yqy1ap';

-- Check the results
SELECT id, slug, language, created, updated, title FROM posts WHERE created > '2012-12-24 00:00:00' AND created < '2013-01-02 00:00:00' ORDER BY created DESC ;
}}}

I mostly had to wind them back by 14 hours, as I've settled on a timestamp of 08:00 being good.