Symmetry Server is the server component of the Symmetry network, designed to facilitate distributed AI inference between connected peers on the symmetry network.
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
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 # 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.
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
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
This project is licensed under the MIT License.
We thank Hyperswarm for providing the underlying peer-to-peer networking capabilities.