Home

rwtxt

rwtxt

How rwtxt is configured on this server

NGINX

location ~ ^/(n/|login|ws)(.*) {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect off;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_pass http://localhost:8152;
    }

NOTE:

  1. I created a domain called n that I’m exposing as a “public domain” in rwtxt’s parlance.
  2. I’m not exposing the /public endpoint because I do not want spam.

Static files

I copied the $src/static directory to the “root” of my web server.

Systemd

On a ubuntu server, create a service file as /etc/systemd/system/rwtxt.service:

[Unit]
Description=rwtxt service
After=syslog.target network.target

[Service]
Type=simple
WorkingDirectory=/srv/www.btbytes.com/rwtxt
ExecStart=/srv/www.btbytes.com/rwtxt/rwtxt
User=www-data
Group=www-data

[Install]
WantedBy=multi-user.target

and then –