Authorities

Learn what authorities are and how you can connect to them.

Data flow during an OnlyNv sync operation.

Diagram of the data flow during an OnlyNv sync operation. From right to left: local .env, an Agent, the Authority, and a Database.

Authorities

An authority is a trusted host of the OnlyNv platform that you can connect to and can issue Personal Access Tokens (PATs) to authenticate with its instance.

An authority typically hosts a fork or derivation of onlynv/platform.

In order for an authority to be valid, it must implement the endpoints described in the API Reference.

To change your project from the default authority, you can update the authority key in your .lnvrc file.

.lnvrc
    authority: '@onlynv/platform'
    authority: 'https://your-authority.com'

Connections

A connection is the alphanumeric string that identifies a project to an authority. It is used to authenticate with the authority and to connect and sync devices and deployments.

Your connection will be generated when you create a new project. It will typically be automatically added to your .lnvrc file, but you can also find it in your authority's dashboard.

Your agent will use this connection to communicate with the authority.

Implementation

In the official OnlyNv platform, a connection is a nanoID generated server-side during the init process.

Here's a few examples of a connection string:

JgvmzH0JJxmOAO3Bh2TYK
Jtm87566WqiBrtKigbtm3
eJRiNnKSKqqcJnA9W9Wj1

Agents

An agent is a piece of software that runs on a device or deployment and communicates with the OnlyNv platform. Agents are responsible for syncing environment variables, initialising projects, and linking devices to the platform.

Unlike authorities, agents are not stored in the .lnvrc file. This allows multiple agents to be used with a single connection.

On this page