pluja / nerostr Goto Github PK
View Code? Open in Web Editor NEWnostr paid relay, but with monero
Home Page: https://xmr.usenostr.org
nostr paid relay, but with monero
Home Page: https://xmr.usenostr.org
Hey @pluja and other Nerostr users,
as you can see here and here, the website could not read the NIP-11 information document from our relays.
I checked my config from strfry.conf, it seems correct:
info {
# NIP-11: Name of this server. Short/descriptive (< 30 characters)
name = "nostr-portemonero"
# NIP-11: Detailed information about relay, free-form
description = "Nostr Relay powered by Nerostr. Monero is real money."
# NIP-11: Administrative nostr pubkey, for contact purposes
pubkey = "ffe7daceb57342af434f1ff7607042db5ed4b9b90feb6fd460e0573d3487c006"
# NIP-11: Alternative administrative contact (email, website, etc)
contact = "https://twitter.com/hundehausen"
}
In the protocol description they write:
When a relay receives an HTTP(s) request with an Accept header of application/nostr+json to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure.
{
"name": <string identifying relay>,
"description": <string with detailed information>,
"pubkey": <administrative contact pubkey>,
"contact": <administrative alternate contact>,
"supported_nips": <a list of NIP numbers supported by the relay>,
"software": <string identifying relay software URL>,
"version": <string version identifier>
}
Any field may be omitted, and clients MUST ignore any additional fields they do not understand. Relays MUST accept CORS requests by sending Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods headers.
Is our Caddyfile missing something?
Hi pluja,
i’m giving all my time to this docker-compose file and i can say that it starts to finally work : i can access the pay-wall
and add public keys via API (curl cmdline)
Only issue is with nginx reverse-proxy, see :
nginx doesn’t allow duplicate entrypoint ( here the slash ‘/’)
so i declared 8089 port in yml file and left 7777 port for strfry service
server {
location / {
proxy_pass http://localhost:8089;
}
location /strfry-nerostr-relay {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:7777;
}
}
I tried multiples configurations but all of them hit a wall when clicking ‘Pay-to-relay’ button :
{"error":"Post \"http://monero-wallet-rpc:28081/json_rpc\": dial tcp 192.168.0.2:28081: connect: connection refused"}
I event tried to replace 'monero-wallet-rpc' with my own monero-node-url [ localhost :) ] but without success
Shouldn’t the vhost file contain those sort of lines, where app2 would be declared in docker-compose.yml ?
server {
listen 80;
server_name xmr.usenostr.org;
location / {
proxy_pass http://nerostr:8089;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /app2/ {
proxy_pass http://strfry-nerostr-relay:7777;
}
}
Cheers, wish you the best
Hey Pluja,
I have some issues with my nerostr instance.
As you can see here my relay is nor readable.
Here is the log of the strfry-nerostr-relay
It says that /app/nerostr-auth.sh: is not found, but when I look into the containers file system I see the file.
Do you have any idea?
2023-09-30 18:57:10.941 ( 0.105s) [main thread ]INFO| arguments: /app/strfry relay
2023-09-30 18:57:10.941 ( 0.105s) [main thread ]INFO| Current dir: /app
2023-09-30 18:57:10.941 ( 0.105s) [main thread ]INFO| stderr verbosity: 0
2023-09-30 18:57:10.941 ( 0.105s) [main thread ]INFO| -----------------------------------
2023-09-30 18:57:10.941 ( 0.105s) [main thread ]INFO| CONFIG: Loading config from file: /etc/strfry.conf
2023-09-30 18:57:10.960 ( 0.123s) [main thread ]INFO| CONFIG: successfully installed
2023-09-30 18:57:11.011 ( 0.175s) [Websocket ]INFO| Started websocket server on 0.0.0.0:7777
2023-09-30 18:57:11.444 ( 0.607s) [Websocket ]INFO| [1] Connect from 65.108.194.160 compression=Y sliding=N
2023-09-30 18:57:11.444 ( 0.607s) [Websocket ]INFO| [2] Connect from 87.210.44.58 compression=Y sliding=Y
2023-09-30 18:57:20.555 ( 9.719s) [Websocket ]INFO| [3] Connect from 210.151.194.53 compression=Y sliding=Y
2023-09-30 18:57:21.955 ( 11.118s) [Websocket ]INFO| [4] Connect from 172.71.142.49 compression=N sliding=N
2023-09-30 18:57:22.170 ( 11.334s) [Ingester 1 ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 ( 11.334s) [Ingester 1 ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 ( 11.334s) [Ingester 1 ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 ( 11.335s) [Ingester 1 ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 ( 11.336s) [Writer ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found
2023-09-30 18:57:22.174 ( 11.338s) [Writer ] ERR| Couldn't setup plugin: pipe to plugin was closed (plugin crashed?)
2023-09-30 18:57:22.174 ( 11.338s) [Writer ]INFO| [4] write policy blocked event 0135af0a07e0cace7f61d53e5c10b93d6aa78ac0e58365aeb7c850051be543f2: error: internal error
2023-09-30 18:57:22.174 ( 11.338s) [Writer ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found
Hi man,
in your docker-compose.yml, the volume defined in monero-wallet-rpc service points from './nerostr_data/wallet/' to :
volumes:
- ./nerostr_data/wallet/:/home/monero/wallet/
Does it mean one should create this user 'monero' on his server ?
Any hint appreciated
Cheers
I have got the paywall set up and tested it with a change to the docker-compose.yml file for the rpc port of monero-wallet-rpc
However, if I don't add
ports:
- "127.0.0.1:7777:7777"
to the docker-compose.yml file in the strfry-nerostr-relay:
section the strfry does not bind to port 7777. However, when I add this port to the docker-compose.yml file, I get "connection reset by peer" errors when testing the wss
Any advice would be greatly appreciated. Thanks you!
Hey @pluja,
I'm not sure if this is an issue or if I am misunderstanding something.
Please compare
My relay
https://nostr.watch/relay/nostr.portemonero.com
and your relay
https://nostr.watch/relay/xmr.usenostr.org
Your relay is readable, mine is not. Why is that? Is my reverse proxy configured wrong?
nostr.portemonero.com {
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
encode zstd gzip
reverse_proxy @websockets localhost:7777
reverse_proxy localhost:8089
header {
Access-Control-Allow-Origin *
}
handle_path /.well-known* {
root * /home/hundehausen/well-known
file_server
header {
Access-Control-Allow-Origin *
}
}
handle_path /.public* {
root * /home/hundehausen/public
file_server
header {
Access-Control-Allow-Origin *
}
}
}
Why could the site not parse NIP-11 information document about our relays?
Does strfry not support NIP-11?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.