Skip to content

bitvora/team-relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nostr Relay Software

This relay software specializes in providing a Nostr relay to a team. This guide will help you set up and run the software on a Linux machine.

Table of Contents

Prerequisites

  • A Linux-based operating system
  • Docker installed on your system
  • Go installed on your system

Setting Environment Variables

  1. Create a .env file in the root directory of your project.

  2. Add your environment variables to the .env file. For example:

    RELAY_NAME="Bitvora"
    RELAY_PUBKEY="8ad8f1f78c8e11966242e28a7ca15c936b23a999d5fb91bfe4e4472e2d6eaf55"
    RELAY_DESCRIPTION="Bitvora Team Relay"
    
    POSTGRES_USER=bitvora
    POSTGRES_PASSWORD=password
    POSTGRES_DB=relay
    POSTGRES_HOST=localhost
    POSTGRES_PORT=5437
    
    TEAM_DOMAIN="bitvora.com"
    

Running Docker

  1. Run Docker Compose
docker-compose up -d

Compiling the Application

  1. Clone the repository:

    git clone https://github.com/bitvora/team-relay.git
    cd team-relay
  2. Build the application:

    go build -o team-relay

Running the Application as a Service

  1. Create a systemd service file:

    sudo nano /etc/systemd/system/team-relay.service
  2. Add the following content to the service file: (update paths and usernames as needed)

    [Unit]
    Description=Team Relay
    After=network.target
    
    [Service]
    ExecStart=/path/to/yourappname
    WorkingDirectory=/path/to/team-relay
    EnvironmentFile=/path/to/team-relay/.env
    Restart=always
    User=ubuntu
    
    [Install]
    WantedBy=multi-user.target
  3. Reload the systemd daemon:

    sudo systemctl daemon-reload
  4. Enable and start the service:

    sudo systemctl enable team-relay
    sudo systemctl start team-relay
  5. Check the status of the service:

    sudo systemctl status team-relay

Conclusion

Your team relay will be running at localhost:3334. Feel free to serve it with nginx or any other reverse proxy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages