Setting up Swarm

To run swarm you first need to install geth and bzzd which is the swarm daemon.

go install
go install

Now we'll generate a new geth account.

$ geth account new

Your new account is locked with a password. Please give a password. Do not forget this password.
Repeat passphrase:
Address: {970ef9790b54425bea2c02e25cab01e48cf92573}

Export the environment variable BZZKEY mapping to the geth account address we just generated.

export BZZKEY=970ef9790b54425bea2c02e25cab01e48cf92573

And now run swarm with the specified account to be our swarm account. Swarm by default will run on port 8500.

$ swarm --bzzaccount $BZZKEY
Unlocking swarm account 0x970EF9790B54425BEA2C02e25cAb01E48CF92573 [1/3]
WARN [06-12|13:11:41] Starting Swarm service

Now that we have the swarm daemon set up and running, let's learn how to upload files to swarm in the next section.

Full code


go install
go install
geth account new
export BZZKEY=970ef9790b54425bea2c02e25cab01e48cf92573
swarm --bzzaccount $BZZKEY

results matching ""

    No results matching ""