Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# Running using docker

Create environment file (stack.env), with following variables (see .env.example):
```
# Enable debug mode for AMP library
AMP_DEBUG=0

RELAY_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.