Skip to main content

Quick Installation

Pyrsia can easily be setup on a local Ubuntu (or Debian based) machine by using our apt installer package.

Supported Platforms

We support the following platforms to run Pyrsia.

Please let us know if the platform of your choice is not yet supported.

Windows

Minimal installer functionality

In version 0.2 we chose to include a minimal Windows installer. It simply installs the node and cli executables that need to be run manually. Also the installer is not yet signed, so you need to ignore some warnings. We plan to fix this in subsequent releases.

  • Download the latest Windows installer from our release page.

  • Run the installer

    • Either simply double-click or use the msiexec command described below
    • You need to ignore a warning because we didn't sign our installer yet

Instead of double-clicking the installer, you can also run it like this, open a command prompt (type: Win+R + cmd):

msiexec /i Downloads/pyrsia-installer-0.2.0.msi ROOTDRIVE="C:"
  • The installer will now install Pyrsia (pyrsia_node.exe and pyrsia.exe) in C:\Pyrsia unless you specified a different ROOTDRIVE in the previous step.

  • Open a command prompt (type Win+R + cmd) and type

SET RUST_LOG=info
cd c:\Pyrsia\Pyrsia\service
pyrsia_node.exe

This will start your local Pyrsia node with info logs. (you can also skip SET RUST_LOG=info if you don't want logs, or set this to SET RUST_LOG=debug to see even more logs)

When you first start the Pyrsia node, Windows might ask you to allow Pyrsia to make network connections, so make sure to allow this.

  • Once your Pyrsia node is running, open another command prompt and verify it's running:
pyrsia --version
pyrsia_cli 0.2.0
pyrsia ping
Connection Successful !!

If the pyrsia command cannot be found, make sure C:\Pyrsia\Pyrsia\bin is in your %PATH% or simply cd to that path and run pyrsia from there.

To verify you received the transparency logs from the network, run this:

pyrsia inspect-log docker --image alpine:3.16.0

This should output something like this:

[
{
"artifact_hash": "2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8",
"artifact_id": "f3f2c69c-3387-47d0-96c8-cb57b3e9f1ae",
"id": "70d17e31-14b5-4e00-9107-acc95e8bf5c8",
"node_id": "bde95c7a-1397-470a-8f07-d9f13e97dffe",
"node_public_key": "a65f7c06-cdc9-4210-b0c1-1a08311231ec",
"num_artifacts": 4,
"operation": "AddArtifact",
"package_specific_artifact_id": "alpine@sha256:2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8",
"package_specific_id": "alpine:3.16.0",
"package_type": "Docker",
"source_id": "ddd37612-5da8-4b74-b884-5fa1e2fb1a52",
"timestamp": 1666096808
},
...
]

Including the JSON output of the retrieved transparency logs for alpine:3.16.0.

Now you are ready to follow the instructions in Configure Docker to use Pyrsia to make actual use of Pyrsia.

macOS

Minimal installer functionality

In version 0.2 we choose to include minimalistic macOS installer. The installer is available through Homebrew package manager.

Using Homebrew Package Manager

  • Homebrew is a free macOS package manager that allows you to install, update, or remove software by running commands in the terminal. Homebrew makes it easy to install the latest versions of various software for macOS. Find the Homebrew installation link here.

  • Use Pyrsia Taps (Third-Party Repositories)

brew tap pyrsia/pyrsia
  • Use brew installer to install Pyrsia
brew install pyrsia
  • Open a terminal and start Pyrsia Node as background service using the following
brew services start pyrsia

As per service configuration, Pyrsia Node service logging level set to info except module pyrsia set to debug.

When you start the Pyrsia node for the first time, a directory is created in $(brew --prefix)/var/pyrsia/ where all logs and blockchain data are saved. Also macOS might ask for network connection permission. So make sure to allow this.

  • Once Pyrsia node is running state, similar kind of logs can be found in the Homebrew log file.
 $ tail -f $(brew --prefix)/var/pyrsia/logs/stdout/pyrsia_node.log
2022-10-20T07:45:57.707Z INFO pyrsia_node > Pyrsia Node will start running on 0.0.0.0:7888
2022-10-20T07:45:57.708Z INFO pyrsia_node > Looking up bootstrap node
2022-10-20T07:45:57.709Z INFO pyrsia::network::event_loop > Local node is listening on "/ip4/192.168.86.171/tcp/54690/p2p/12D3KooWL8xbhUABLVUAmpcVoCZSghRX1XZZmoyMPo4VC28CEx6P"
2022-10-20T07:45:57.709Z INFO pyrsia::network::event_loop > Local node is listening on "/ip4/127.0.0.1/tcp/54690/p2p/12D3KooWL8xbhUABLVUAmpcVoCZSghRX1XZZmoyMPo4VC28CEx6P"
2022-10-20T07:45:57.709Z INFO pyrsia::network::event_loop > Local node is listening on "/ip4/100.64.0.1/tcp/54690/p2p/12D3KooWL8xbhUABLVUAmpcVoCZSghRX1XZZmoyMPo4VC28CEx6P"
2022-10-20T07:45:57.929Z INFO pyrsia_node > Found bootstrap peer_addr "/ip4/104.198.178.107/tcp/44000/p2p/12D3KooWERQcvMrdmRc8a3oSuEDU2AmMZ974ADpisbbpFDrSZ8hx"
2022-10-20T07:45:57.930Z INFO pyrsia_node > Probing "/ip4/104.198.178.107/tcp/44000/p2p/12D3KooWERQcvMrdmRc8a3oSuEDU2AmMZ974ADpisbbpFDrSZ8hx"
2022-10-20T07:46:23.248Z INFO pyrsia::network::event_loop > Autonat status changed from Unknown to Private
  • Open another terminal to verify everything is running smoothly.
    • To verify Pyrsia version
pyrsia --version

Display the version pyrsia_cli 0.2.0

- To verify your local Pyrsia node connected to Pyrsia network
pyrsia ping

If your node successfully connected to the Pyrsia network you will see Connection Successful !!

- To verify you received the transparency logs from the network, run this:
pyrsia inspect-log docker --image alpine:3.16.0

This should output something like this:

Inspect log request returns the following logs: ...

Including the JSON output of the retrieved transparency logs for alpine:3.16.0.

Now you are ready to follow the instructions in Configure Docker to use Pyrsia to make actual use of Pyrsia.

Linux

Using the Web Script

curl -sS https://pyrsia.io/install.sh | sh

From the Command Line

# Update system and install base tooling
sudo apt-get update
sudo apt-get install -y wget gnupg

# Add the Pyrsia keys to verify packages
wget -q -O - https://repo.pyrsia.io/repos/Release.key | gpg --dearmor > pyrsia.gpg
sudo install -o root -g root -m 644 pyrsia.gpg /etc/apt/trusted.gpg.d/
rm pyrsia.gpg
echo "deb https://repo.pyrsia.io/repos/nightly focal main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get update

# Install
sudo apt-get install -y pyrsia

Verify everything is running smoothly

$ pyrsia --version
pyrsia 0.2.0
$ pyrsia ping
Connection Successful !!

If you see the following output, then your installation has failed.

$ pyrsia ping
Error: error sending request for url (http://localhost:7888/v2): error trying to connect: tcp connect error: Connection refused (os error 111)

To verify you received the transparency logs from the network, run this:

pyrsia inspect-log docker --image alpine:3.16.0

This should output something like this:

[
{
"artifact_hash": "2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8",
"artifact_id": "f3f2c69c-3387-47d0-96c8-cb57b3e9f1ae",
"id": "70d17e31-14b5-4e00-9107-acc95e8bf5c8",
"node_id": "bde95c7a-1397-470a-8f07-d9f13e97dffe",
"node_public_key": "a65f7c06-cdc9-4210-b0c1-1a08311231ec",
"num_artifacts": 4,
"operation": "AddArtifact",
"package_specific_artifact_id": "alpine@sha256:2408cc74d12b6cd092bb8b516ba7d5e290f485d3eb9672efc00f0583730179e8",
"package_specific_id": "alpine:3.16.0",
"package_type": "Docker",
"source_id": "ddd37612-5da8-4b74-b884-5fa1e2fb1a52",
"timestamp": 1666096808
},
...
]

Including the JSON output of the retrieved transparency logs for alpine:3.16.0

Now you are ready to follow the instructions in Configure Docker to use Pyrsia to make actual use of Pyrsia.

Run Pyrsia in Docker

As a temporary alternative to the installation scripts for the supported platforms, you can also choose to run our pre-built Docker image available in Docker Hub.

Docker

Make sure you have Docker installed on your system and run in the background:

(Add an option -e RUST_LOG=debug to change the log level from the default value, info.)

docker run -d -p 7888:7888 --name pyrsia_node pyrsiaoss/pyrsia-node:0.2.0-2342

Tail the logs to check if Pyrsia started correctly:

docker logs -f pyrsia_node

Or use the pyrsia CLI like this:

docker exec pyrsia_node pyrsia ping
Connection Successful !!

Docker Compose

Use this docker-compose.yml file:

services:
pyrsia:
image: pyrsiaoss/pyrsia-node:0.2.0-2342
ports:
- "7888:7888"
volumes:
- "pyrsia:/pyrsia"

volumes:
pyrsia:

Add the following setting to change the log level (info is set as a default value):

services:
pyrsia:
environment: # This is optional.
- RUST_LOG=debug

Start running Pyrsia in the background:

docker-compose up -d

Tail the logs to check if Pyrsia started correctly:

docker-compose logs -f

Or use the pyrsia CLI like this:

docker exec pyrsia-1 pyrsia ping
Connection Successful !!

(replace pyrsia-1 with the name of your Pyrsia container)