Running the yagna daemon from sources
Alternatively to running yagna from binaries, especially if you're an adventurous type, you might want to run it directly from sources.
Running from sources allows you to have a closer look at its internals and to try all the latest features while they're being developed. It's important to note that, unless you really know what you're doing, you'll be much better off using our bundled binaries.
yagnafrom sources, you'll need to have a
rustdevelopment environment installed - it will be needed to run the
yagnadaemon itself. If you don't have it, please refer to the docs to install it: https://www.rust-lang.org/learn/get-started
Afterwards, you'll need to launch the
git clone https://github.com/golemfactory/yagna.git
Once you have cloned it and checked out, enter its directory and copy the template environment file onto a proper .env file:
cp .env-template .env
cargo run service run
This command will build
yagnausing the Rust compiler (which might take a considerable time unless you're working on a really fast machine) and once it's built, will subsequently launch it.
Once the daemon launches, it will start emitting some debug messages among which one of the first ones will look like:
[2020-07-16T12:11:33Z INFO yagna] Starting yagna service!.
There you go! You have successfully started the yagna daemon and can now use it to connect to the Golem network, run our examples and develop your own Golem apps.
Remember that, when running from sources, the
yagnacommand must be replaced with
cargo runin any of the examples we provide elsewhere in this documentation. E.g. instead of:
yagna app-key listyou'd run:
cargo run app-key list.
If you're running
yagnafrom source, then you won't have the
gftpbinary around and you will also need to build it yourself. To do so, once again, go to your
yagnasource directory and execute:
cargo install --path .
This will build and install the
gftpbinary for you.
yagnadaemon is now ready!