Oddbean new post about | logout
ā–² ā–¼
 If you want to start hacking on getting nip44 in there too: https://github.com/rikmeijer/transpher/tree/main/src%2FNostr%2FNIP44 
ā–² ā–¼
 Woa neat, can I try this out already? Running a relay with PHP? That's something on my backlog as well. 
 I have it running on wss://nostr.rikmeijer.nl, just spin up the docker (with the env vars in env.example) 
 If everything works it sends you a message that it is availble. Very curious if you can get it up and running and the amount of effort it took (and other fewdback) 
ā–² ā–¼
 What I was thinking next was leveraging all these php shared hosting as nostr cdn using php. That language is still used on many hosting platforms and that way you could set up some kind of content delivery network using that 
 How does traditional webhosting can help #grownostr:

nostr:nevent1qqsqtd4c5g679y8a9xr5ql9hz2h77vsvzsytzggjwe4tgmzl5rn0pusprfmhxue69uhhyetvv9ujumn0wd68yerfvdjjucm0d5hsygx2g3llhkvr2ctkhudpvyn8dklhgnprxkahpsdund5tzg4jp4h2ccpsgqqqqqqshdz7t5 
ā–² ā–¼
 I just added a brief readme with an outline on how to get the docker container running. I run it through portainer and put a caddy reverse proxy in front of it to make it public 
ā–² ā–¼
 Great! I hope I can find some time to test it out soon.
Could you add the Dockerfile to the repo too? 
ā–² ā–¼
 My bad, I overlooked https://github.com/rikmeijer/transpher/tree/main/docker when I was checking the docker-compose.yml which uses a pre-build image. 
ā–² ā–¼
 Docker compose in the root, dockerfiles are under directory docker. 
ā–² ā–¼
 Iā€™m trying to run it local first, but the agent / websocket client tries to connect a 443 port. 
Is it possible to run it local? 
 I think thats because you filled wss:// in relay url, if so please try ws://127.0.0.1 first...relay url env is only used in the agent so it can find the relay 
ā–² ā–¼
 With using RELAY_URL=ws://127.0.0.1 in my .env: 

agent-1  | [2024-10-24T19:47:59.458397+00:00] agent.INFO: Client connecting to ws://127.0.0.1 [] []
agent-1  | PHP Fatal error:  Uncaught Amp\Socket\ConnectException: Connection to tcp://127.0.0.1:80 failed after 3 attempts; previous attempts: Connection to tcp://127.0.0.1:80 @ tcp://127.0.0.1:80 refused, Connection to tcp://127.0.0.1:80 @ tcp://127.0.0.1:80 refused in /app/vendor/amphp/socket/src/RetrySocketConnector.php:50
 
 Interesting,  you have them both running as php processes on the same host or are they running in separate processes? In the latter you would need to enter the ip of the relay-container which publishes that port or connect the host port to the container port using the -p parameter of docker