Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nostriphant/transpher
Nostr relay in PHP
https://github.com/nostriphant/transpher
Last synced: about 1 month ago
JSON representation
Nostr relay in PHP
- Host: GitHub
- URL: https://github.com/nostriphant/transpher
- Owner: nostriphant
- License: mit
- Created: 2024-08-22T07:01:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-26T07:50:56.000Z (3 months ago)
- Last Synced: 2024-10-27T08:30:58.485Z (3 months ago)
- Language: PHP
- Size: 654 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nostr - Transpher - experimental PHP implementation with file or sqlite storage, configurable limits (Relays / Implementations)
README
# Running using docker
Create environment file (stack.env), with following variables (see .env.example):
```
# Enable debug mode for AMP library
AMP_DEBUG=0RELAY_MAX_CONNECTIONS_PER_IP=1000
AGENT_NSEC=
RELAY_URL=
RELAY_OWNER_NPUB=
RELAY_NAME=
RELAY_DESCRIPTION=
RELAY_CONTACT=
RELAY_PORT=2121
```Spin up
```
docker compose up
```Your relay should be listening at the IP address of your docker container at port 80. You can create a reverse proxy in front of it to open it up to the public
## Run the relay locally
Let's say you want to run the relay locally for development purposes.
Copy and paste the `.env.example` file to `.env` and set all variables in this file.
Make sure to set this variable there `RELAY_URL=ws://10.8.0.8` so the agent container can connect to the relay container.
Now you can spin up the Docker containers.```bash
docker compose -f docker-compose.local.yml up
```To connect to the relay, you can use `ws://127.0.0.1:` as a URI.