Writefreely

WriteFreely is built around writing. There’s no news feed, notifications, or unnecessary likes or claps to take you away from your train of thought. Reach outside your own site with federation via ActivityPub. WriteFreely lets anyone on Mastodon, Pleroma, or any ActivityPub-enabled service follow your blog, bookmark your posts, and share them with their followers. WriteFreely is written in Go (golang), so it runs anywhere and takes up very few resources.


Note

For this guide you should be familiar with the basic concepts of

License

Writefreely is released under the AGPL v3.0.

Prerequisites

Set up your URL:

[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$

You’ll need your MySQL credentials. Get them with my_print_defaults:

[isabell@stardust ~]$ my_print_defaults client
--default-character-set=utf8mb4
--user=isabell
--password=MySuperSecretPassword
[isabell@stardust ~]$

Installation

Use wget to download the latest release:

[isabell@stardust ~]$ wget https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_amd64.tar.gz
[isabell@stardust ~]$ tar xzf writefreely_0.12.0_linux_amd64.tar.gz
[isabell@stardust ~]$

Configuration

Database Setup

Create a new database:

[isabell@stardust ~]$ mysql -e "CREATE DATABASE ${USER}_writefreely CHARACTER SET latin1 COLLATE latin1_swedish_ci;"
[isabell@stardust ~]$

Writefreely Config

Change to writefreely directory and start config mode to create a config file:

[isabell@stardust ~]$ cd ~/writefreely
[isabell@stardust writefreely]$ ./writefreely config start
[isabell@stardust writefreely]$

Setup Writefreely interactively. Use Production behind reverse proxy in Server setup and confirm default port:

Loaded configuration config.ini.

 ✍ WriteFreely Configuration ✍

 This quick configuration process will update the application's config
file, config.ini.

 It validates your input along the way, so you can be sure any future
errors aren't caused by a bad configuration. If you'd rather configure your
server manually, instead run: writefreely --create-config and edit that
file.

Server setup
Production, behind reverse proxy
Local port: 8080

Choose MySQL in Database Setup and use credentials shown earlier. Use <username>_writefreely, replacing <username> with your username. Confirm default MySQL host and port:

Database setup
MySQL
Username: isabell
Password: *******************
Database name: isabell_writefreely
Host: localhost
Port: 3306

Enter admin and blog details as needed, enter your domain with https:// and without port. Choose other options to your liking:

App setup
Single user blog
Admin username: admin
Admin password: <choose_a_password>
Blog name: this.ven
Public URL: https://isabell.uber.space

...

2020/11/08 23:52:14 Done!

After interactive configuration alter bind key in config.ini; look for the [server] block:

...

bind                 = 0.0.0.0

...

Learn about other configuration options in the documentation’s admin guide.

Key generation

Generate the encryption keys for your instance:

[isabell@stardust writefreely]$ ./writefreely keys generate
[isabell@stardust writefreely]$

Web Backend Config

Note

Writefreely is running on port 8080.

To make the application accessible from the outside, configure a web backend:

[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Supervisord Daemon Setup

Create ~/etc/services.d/writefreely.ini with the following content:

[program:writefreely]
directory=%(ENV_HOME)s/writefreely/
command=%(ENV_HOME)s/writefreely/writefreely
autostart=yes
autorestart=yes

After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

If it’s not in state RUNNING, check your configuration.

Finishing installation

Your Writefreely installation should now be reachable on https://isabell.uber.space. Log in with the username and password provided during configuration.

RSS feed is automatically served at: https://isabell.uber.space/feed/

You can overwrite the default design with own CSS in Customize settings. There are some examples for basic selectors in Writefreely’s documentation.

Updates

Note

Check the update feed regularly to stay informed about the newest version.

[isabell@stardust ~]$ mv ~/writefreely ~/writefreely-backup
[isabell@stardust ~]$ wget https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_amd64.tar.gz
[isabell@stardust ~]$ tar xzf writefreely_0.13.0_linux_amd64.tar.gz
[isabell@stardust ~]$ cp ~/writefreely-backup/config.ini ~/writefreely/config.ini
[isabell@stardust ~]$ cp -r ~/writefreely-backup/keys ~/writefreely/keys

Restart Writefreely by supervisorctl restart writefreely command. If it’s not starting, repeat config mode procedure.


Tested on Uberspace v7.7.0 with Go 1.15.1 and Writefreely v0.12.0.

Written by: this.ven <https://this.ven.uber.space>