symmetry-server
v1.0.13
Published
Symmetry Server is the server component of the Symmetry network, designed to facilitate distributed AI inference between connected peers on the symmetry network.
Downloads
224
Readme
Symmetry Server
Symmetry Server is the server component of the Symmetry network, designed to facilitate distributed AI inference between connected peers on the symmetry network.
Table of Contents
Installation
To install Symmetry Server, follow these steps:
Clone the repository:
git clone https://github.com/twinnydotdev/symmetry-server.git cd symmetry-server
Install dependencies:
npm install
Run database migrations
npm run db:up
Configuration
Symmetry Server uses a YAML configuration file. By default, it looks for the config file at:
~/.config/symmetry/server.yaml
Your config file should look like this
path: /home/twinnydotdev/.config/symmetry/server.yaml # The path to your config file.
wsPort: 4005 # The port to use for WebSocket connections.
publicKey: 4b4a9cc325d134dee6679e9407420023531fd7e96c563f6c5d00fd5549b77435
privateKey: xxx # The private key.
You can create a public and private key using hypercore-crypto
const crypto = require('hypercore-crypto')
const keyPair = crypto.keyPair()
console.log(keyPair.publicKey.toString('hex'))
console.log(keyPair.secretKey.toString('hex'))
You can specify a custom config file path using the -c
or --config
option when running the server.
Usage
To start the Symmetry Server, run:
Development
npm run dev
Production
npm run build
Then
node dist/symmetry-server.js
Or
pm2 start dist/symmetry-server.js
Command-line Options
Options:
-V, --version output the version number
-c, --config <path> Path to config file (default: "/home/richard/.config/symmetry/server.yaml")
-h, --help display help for command
Commands:
delete-peer <peerKey> Delete a peer from the network
License
This project is licensed under the MIT License.
Acknowledgments
We thank Hyperswarm for providing the underlying peer-to-peer networking capabilities.