Nostr Server

see directsponsor.net

Below Is Redundant

Keeping the stuff below to show why we started our own server from scratch. Maybe things will get better over time, but for now we have to build our own.

https://github.com/fabianfabian/nostr-media/releases/tag/0.12-beta
Nostr Media Uploads for WordPress

https://usenostr.org/relay But as usual, it’s a pile of crap. It says its “easy” but then you need to know a load of stuff beforehand, and of course, even rocket science is easy if you’ve already built a load of rockets. The config file it says to copy is on a server that doesn’t exist and searching for a config shows that there are many different ones for many different purposes, the names of which mean nothing and have no explanations. I am so glad this is not “hard”.

I found what may be usable as the missing file. (it came with no explanations.)

For Base setup

version: "3.7"

services:
  public-relay:
    image: scsibug/nostr-rs-relay
    restart: on-failure
    volumes:
      - ${PWD}/data/relay/config.toml:/home/.nostr-rs-relay/config.toml
      - ${PWD}/data/relay/db:/home/.nostr-rs-relay/db
    container_name: public-relay
    networks:
      - caddy

  web:
    image: getumbrel/umbrel-nostr-relay
    build: .
    user: "1000:1000"
    container_name: public-relay-web
    restart: on-failure
    environment:
      RELAY_HOST: "public-relay"
      RELAY_PORT: "8080"
    # port 3000 web
    networks:
      - caddy

networks:
  caddy:
    name: caddy

For Caddy (Proxy Setup)

version: "3.7"
name: "caddy-stack"

services:
  caddy:
    image: caddy:2-alpine
    container_name: caddy
    ports:
      - 80:80
      - 443:443
    networks:
      - caddy
      - default
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
      - ./caddy_data/data:/data
      - ./caddy_data/config:/config
    restart: unless-stopped

networks:
  caddy:
    name: caddy

Caddyfile Contents

{
	email your@mail.com #Mail used to generate the HTTPS certificate.
}

# Replace your.relay.domain by the domain name of your choice!
your.relay.domain {
    reverse_proxy public-relay:8080
}

dash.your.relay.domain {
    reverse_proxy public-relay-web:3000
}

Still to do: edit the config file with the address of the relay etc. (first 3 lines mostly) plus the contact address etc. Set up the router, set up the subdomain and point to the Orange Pi.

output from the docker compose up command:
andy@orangepi5:~/nostr-relay$ sudo docker compose up -d
[sudo] password for andy:
WARN[0000] /home/andy/nostr-relay/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 15/15
✔ web Pulled 33.3s
✔ 9b18e9b68314 Pull complete 2.7s
✔ 480d8737fa00 Pull complete 2.9s
✔ ee8b251ca0b5 Pull complete 2.9s
✔ 9543d07ca789 Pull complete 4.1s
✔ 88e0320d2afc Pull complete 4.1s
✔ 0f234a4da84e Pull complete 4.1s
✔ 08121a609662 Pull complete 4.1s
✔ cc60ed5c4f1d Pull complete 30.3s
✔ public-relay Pulled 11.6s
✔ 1f7ce2fa46ab Pull complete 6.1s
✔ d50133f7f81a Pull complete 6.7s
✔ d24479914e96 Pull complete 6.7s
✔ 4b5189a2138d Pull complete 7.9s
✔ d496c7060238 Pull complete 9.1s
[+] Running 2/4
✔ Network caddy Created0.2s 1.3s
⠼ Container public-relay-web [+] Running 2/4 Starting1.4s
✔ Network caddy Created0.2s
⠴ Container public-relay-web [+] Running 2/4 Starting1.5s
✔ Network caddy Created0.2s
⠦ Container public-relay-web [+] Running 4/4 Starting1.6s
✔ Network caddy Created0.2s
✔ Container public-relay-web Started1.7s
✔ Container public-relay Started1.7s
! public-relay The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s
andy@orangepi5:~/nostr-relay$

Try https://github.com/nodetec/relaywizard?tab=readme-ov-file#readme maybe that will work.

It seems like groups are possible too. https://nips.nostr.com/29 and more about that (I think) here: https://chachi.chat/ but it’s all pretty scatty and confusing.

or https://hivetalk.org/active

CDNs

https://www.fastly.com/pricing has $50 per month of free CDN traffic.

https://cloudinary.com/pricing is not straightforward, it depends what counts as “transformations”.

https://uploadcare.com/pricing has a free tier.

https://www.jsdelivr.com is a “free CDN for open source projects”.

https://aws.amazon.com/cloudfront/pricing/?loc=ft#AWS_Free_Usage_Tier but its a real crappy proprietary system that takes many years to learn. And then it changes.