Handling follow requests in Writefreely

The set up of writefreely was ridiculously easy.
Impressed and thankful.

With Federation enabled, I am able to find my writefreely instance in the search of my Pleroma instance, and on other Mastodon instances, but attempts to follow in both Masdodon and Pleroma only return a follow request rather than a follow. I see no setting in the interface or in config.ini to fix this, and I see no way of managing follow requests in the Writefreely UI.

How do I approach this?

This is a bump.

Ive gotten federation working in my writefreely instance, which is running behind a reverse proxy.
But all attempts to follow my writefreely instance from Pleroma or Mastodon result in a “follow request” rather than a follow. With no way of approving follow requests in writefreely, im not sure how to approach this.
I see no obvious setting, or option in config.ini. What am I missing?

So the “follow request” is a red herring here – there isn’t actually any “request” you can act on, it just means Mastodon / Pleroma sent a Follow but never received anything in return from your server. This is usually due to a configuration issue with the WriteFreely server.

Can you share your WriteFreely config, as well as any config for a reverse proxy you might be using in front of it?

Absolutely.
Thank you for the help.
I appreciate it.


Here is my config.ini:

[server]
hidden_host          = 
port                 = 8080
bind                 = localhost
tls_cert_path        = 
tls_key_path         = 
autocert             = false
templates_parent_dir = 
static_parent_dir    = 
pages_parent_dir     = 
keys_parent_dir      = 
hash_seed            = 
gopher_port          = 0

[database]
type     = sqlite3
filename = writefreely.db
username = 
password = 
database = writefreely
host     = localhost
port     = 3306
tls      = false

[app]
site_name             = atyh
site_description      = ~/atyh/write freely
host                  = https://atyh.cc
theme                 = write
editor                = 
disable_js            = false
webfonts              = true
landing               = 
simple_nav            = true
wf_modesty            = true
chorus                = false
forest                = false
disable_drafts        = false
single_user           = true
open_registration     = false
open_deletion         = false
min_username_len      = 3
max_blogs             = 1
federation            = true
public_stats          = false
monetization          = false
notes_only            = false
private               = false
local_timeline        = true
user_invites          = 
default_visibility    = unlisted
update_checks         = false
disable_password_auth = false

[oauth.slack]
client_id          = 
client_secret      = 
team_id            = 
callback_proxy     = 
callback_proxy_api = 

[oauth.writeas]
client_id          = 
client_secret      = 
auth_location      = 
token_location     = 
inspect_location   = 
callback_proxy     = 
callback_proxy_api = 

[oauth.gitlab]
client_id          = 
client_secret      = 
host               = 
display_name       = 
callback_proxy     = 
callback_proxy_api = 

[oauth.gitea]
client_id          = 
client_secret      = 
host               = 
display_name       = 
callback_proxy     = 
callback_proxy_api = 

[oauth.generic]
client_id          = 
client_secret      = 
host               = 
display_name       = 
callback_proxy     = 
callback_proxy_api = 
token_endpoint     = 
inspect_endpoint   = 
auth_endpoint      = 
scope              = 
allow_disconnect   = false
map_user_id        = 
map_username       = 
map_display_name   = 
map_email          = 

And here is my nginx config:

server {

    server_name atyh.cc;

    gzip on;
    gzip_types
      application/javascript
      application/x-javascript
      application/json
      application/rss+xml
      application/xml
      image/svg+xml
      image/x-icon
      application/vnd.ms-fontobject
      application/font-sfnt
      text/css
      text/plain;
    gzip_min_length 256;
    gzip_comp_level 5;
    gzip_http_version 1.1;
    gzip_vary on;

    location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect off;
    }

    location ~ ^/(css|img|js|fonts)/ {
        root /var/www/atyh.cc/static;
        # Optionally cache these files in the browser:
        # expires 12M;
    }

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect off;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/atyh.cc-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/atyh.cc-0001/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = atyh.cc) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;

    server_name atyh.cc;
    return 404; # managed by Certbot


}

Of course, your right about the requests not getting out.
Ive been reading nginx docs most of the morning. Haven’t figured it out…

Nov 10 19:48:24 atyh writefreely[570]: 2022/11/10 19:48:24 Fetching actor https://fosstodon.org/users/artyr3 locally
Nov 10 19:48:24 atyh writefreely[570]: 2022/11/10 19:48:24 Not found; fetching actor https://fosstodon.org/users/artyr3 remotely
Nov 10 19:48:24 atyh writefreely[570]: 2022/11/10 19:48:24 GET https://fosstodon.org/users/artyr3
Nov 10 19:48:24 atyh writefreely[570]: ERROR: 2022/11/10 19:48:24 activitypub.go:808: Unable to get actor! failed to decode PEM block containing private key
Nov 10 19:48:24 atyh writefreely[570]: ERROR: 2022/11/10 19:48:24 activitypub.go:413: Unable to resolve Follow: Couldn't fetch actor.

I’m having a similar issue. Attempt to follow a WriteFreely user from Mastodon 4.0.0rc2 against the latest writefreely with reverse proxy to nginx and certbot install and there’s always a PEM failure.

writefreely process output:

Nov 11 00:13:47 writer writefreely[3975]: 2022/11/11 00:13:47 "POST /api/collections/madduck/inbox" 200 1.767658ms "http.rb/5.0.4 (Mastodon/3.5.2; +https://mastodon.world/)"
Nov 11 00:13:50 writer writefreely[3975]: 2022/11/11 00:13:50 Fetching actor https://oliphant.social/users/madduck locally
Nov 11 00:13:50 writer writefreely[3975]: 2022/11/11 00:13:50 "POST /api/collections/shawn/inbox" 200 3.935637ms "http.rb/5.1.0 (Mastodon/4.0.0rc2; +https://oliphant.social/)"
Nov 11 00:13:52 writer writefreely[3975]: 2022/11/11 00:13:52 POST https://oliphant.social/users/madduck/inbox
Nov 11 00:13:52 writer writefreely[3975]: ERROR: 2022/11/11 00:13:52 activitypub.go:438: Unable to make activity POST: failed to decode PEM block containing private key

This is my config file

[server]
hidden_host          =
port                 = 8080
bind                 = localhost
tls_cert_path        =
tls_key_path         =
autocert             = false
...

[app]
site_name             = writer.oliphant.social
site_description      =
host                  = https://writer.oliphant.social
...

My nginx server config is very similar to the OP.

So it looks like you all were running into the same bug brought up here:

I just fixed that and put out the next WriteFreely release, v0.13.2. Please give the latest version a shot and let me know if you still run into any issues!

2 Likes

Heck yeah! That solved it for me.

1 Like