G
G
Golem SDK
Search…
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.
To run yagna from sources, you'll need to have a rust development environment installed - it will be needed to run the yagna daemon 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 yagna service.
First, clone the yagna repository from: https://github.com/golemfactory/yagna/
1
git clone https://github.com/golemfactory/yagna.git
Copied!
Once you have cloned it and checked out, enter its directory and copy the template environment file onto a proper .env file:
1
cp .env-template .env
Copied!
then run:
1
cargo run service run
Copied!
This command will build yagna using 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 yagna command must be replaced with cargo runin any of the examples we provide elsewhere in this documentation. E.g. instead of: yagna app-key list you'd run: cargo run app-key list.

Build the gftp binary

If you're running yagna from source, then you won't have the gftp binary around and you will also need to build it yourself. To do so, once again, go to your yagna source directory and execute:
1
cd core/gftp
2
cargo install --path .
Copied!
This will build and install the gftp binary for you.
Your yagna daemon is now ready!
Last modified 6d ago
Copy link