Documentation · Installing the server · Access modes

Access modes

Who can use your server's relay: open, team, or channel.

Access modes

The access mode sets who can use your server's : ACCESS_MODE in server.conf.

ModeWho readsWho writesWhat the card does
openanyone who has the cardanyone who has the cardadds the server
teammembersmembersadds the server; with an invite, makes the card holder a member
channeleveryone, without a keymembersthe same; a channel link works even without the card

You, the owner (ADMIN_PUBKEY, your npub or hex key), are always a member and the one who invites. A server with one relay asks for the mode on the first run (it suggests team) and for your key. A server in a network of several relays, a server joining a network, and a server installed before this setting existed stay open.

veydan-server mode team                     # or open, channel; then:
veydan-server rerun
veydan-server invite                        # a card with an invite for one person, valid for 7 days
veydan-server invite --uses 20 --days 30 --label sales
veydan-server invite list                   # invites and how many times each was used
veydan-server invite revoke <id>            # cancels an invite
veydan-server members list
veydan-server members add <npub|hex>        # a member without an invite
veydan-server members remove <npub|hex>     # no longer a member
veydan-server card --invite <code>          # a card with an invite you already have

invite prints a with the invite (&inv=) and, separately, the code itself, for an app that asks for a code. The relay sees changes to members and invites right away.

A blogger's channel

ACCESS_MODE=channel. You publish, along with the people you've made members: veydan-server members add <npub> or an invite for your editors. Anyone with the channel link reads it without the card and without a key. Only members can write to the relay and upload files. For what this means for the channel, see A channel on your own server.

A company team server

ACCESS_MODE=team. Send each colleague a card with an invite: veydan-server invite --uses 1, or one invite for the whole department with --uses 30. The first app that opens the card becomes a member. A card without an invite only adds the server, and the relay doesn't answer anyone who isn't a member. When someone leaves: veydan-server members remove <npub>.

What to know about the modes

  • A mode applies to one relay: members and invites are stored in that relay's vguard, and the other relays in the network don't know about them and don't ask. Install one relay per server; if MESH_RELAYS lists others, the installer warns you.
  • Media: with MEDIA_UPLOAD_KEY=required, only a member can upload with the . The network's other and the channel team's work as before.
  • Downloading files by hash is open in any mode: anyone who has a file's hash (it's inside the encrypted message) can download the file.
  • The team and channel modes need vguard 0.7.0 or later. If the installed vguard doesn't know the mode, the installer stops, so a team server never ends up open.
  • Without the owner's key (ADMIN_PUBKEY), a server in team or channel mode isn't installed.
  • Where things are: /opt/vguard/data/members.txt (one key per line), /opt/vguard/data/invites.json, and the secret that signs the invites, /opt/vguard/etc/access.key. It's created once; a new secret cancels all invites.