Shadowchat
- Self-hosted, non-custodial and minimalist Monero (XMR) superchat system
written in Go.
- No JavaScript required (Minimally used to enhance QoL).
- Provides notification methods usable in OBS with an HTML page.
Installation
Building shadowchat requires:
For the purposes of the examples, it is assumed that shadowchat will be
installed in /opt/shadowchat
.
Running shadowchat requires:
Compiling
Once the executable is built, it is self-contained (portable) and can
be copied around. The rest of the source directory is only required
if customzing the appearance.
Installing a Release (Simple)
$ sudo mkdir -p /opt/shadowchat
$ sudo chown shadowchat:shadowchat /opt/shadowchat
$ go install gitgud.io/greyarea/shadowchat@latest
$ sudo mv $(go env GOPATH)/bin/shadowchat /opt/shadowchat/
Installing from Git
$ git clone https://gitgud.io/greyarea/shadowchat.git
$ cd shadowchat
$ go build
You may wish to checkout a release tag instead of building master as
master is not guaranteed to be stable.
Setup
Monero Wallet
- Decide if your installation will have the shadowchat spawn
monero-wallet-rpc
(recomended) or not.
- Generate a view only wallet using your preferred wallet software such
as
monero-wallet-gui
/monero-wallet-cli
. If shadowchat will spawn
monero-wallet-rpc
do NOT set a password.
- Copy the
walletname_viewonly
and walletname_viewonly.keys
files
to the host that will run the wallet backend. Both files MUST be
in the same directory (eg: /opt/shadowchat/walletname_viewonly
and
/opt/shadowchat/walletname_viewonly.keys
).
If you are NOT going to have shadowchat spawn monero-wallet-rpc
,
start the RPC service:
$ monero-wallet-rpc \
--rpc-bind-port 28088 \
--daemon-address http://node.monerodevs.org:18089 \
--wallet-file /opt/shadowchat/walletname_viewonly \
--disable-rpc-login --password ""
Shadowchat
The shadowchat executable can create a commented example configuration
file to use as the basis for the configuration. This MUST be edited
and shadowchat will refuse to run with the default configuration.
$ /opt/shadowchat/shadowchat default-config -o /opt/shadowchat/config.yml
$ vi /opt/shadowchat/config.yml
The following config options should be set:
display.auth_key
: The "authentication key" for the view and alert
pages.
wallet.daemon.enable
: true
to have shadowchat spawn monero-wallet-rpc
.
wallet.daemon.wallet_path
: The path of the view-only wallet (eg:
/opt/shadowchat/walletname_viewonly
).
Start the shadowchat service:
$ /opt/shadowchat/shadowchat -f /opt/shadowchat/config.yml
A simple systemd unit file is provided as an example.
Usage
- Visit 127.0.0.1:8900 to make superchats.
- Visit 127.0.0.1:8900/view?auth=auth_key_here to view the superchat history.
- Visit 127.0.0.1:8900/alert?auth=auth_key_here to view the alert "widget".
This is designed to be run on a cloud server behind a reverse-proxy that
provides TLS, such as nginx.
There are a handful of sub-commands that can be used to administer a
running instance, see shadowchat --help
for more details.
If something goes horribly wrong and you wish to start over and delete
all pending and paid-for superchats, stop the service and delete the
store.db
file.
If you decide to stop using shadowchat, but want to preserve the
shadowchat history, see shadowchat dump --help
.
OBS Alerts
- Add a Browser source in OBS and point it at
https://shadowchat.example.com/alert?auth=auth_key_here
Customization
Unless you want to customize the assets, the shadowchat executable is
portable and nothing else in the repository is required. Otherwise
a copy of the assets
directory from the source distribution is
needed.
Changes made to the included assets will not be applied unless the
binary is rebuilt OR the assets are explicitly loaded via setting
BOTH the assets.disable_internal
and assets.asset_dir
config
options.
JavaScript is 100% optional, content is generated server-side via
the Go template library. All of
the .tmpl
files are HTML files containing templates.
The non-locale specific static assets such as images (eg: xmr.svg) and
stylesheets (eg: style.css) can be overridden on a per-locale basis if
a file of the same name is present in a locale sub-directory (eg:
assets/en_US/style.css
will take precidence over assets/style.css
).
WARNING: When compiling shadowchat, all files in the assets
sub-directory will be embedded in the executable, regardless of if
they are used or not.
Future plans
- Improve the admin interface.
- Add an API endpoint to allow third-party client development.
- Widget for displaying top donors.
License
GPLv3-Only
The Shadowchan mascot (assets/logo.png
) is distributed under
CC BY-SA 4.0, and is free to copy, share, remix, and reuse
under the terms of that license.
Origin
The shadowchat project was started at https://git.sr.ht/~anon_/shadowchat.
The original author vanished off the face of the earth and the repository
also has been removed, likely due to sr.ht's policies.
This fork loosly based on:
The current implementation has little in common with the original or
other forks.
Donate
The current maintainer is not accepting donations.