# Connecting to Swarm (Simple)¶

These instructions layout the simplest way to use swarm.

## How do I connect?¶

To start a basic swarm node you must have both geth and swarm installed on your manchine. You can find the relevant instructions in the Installation section of the Swarm manual.

Note

You can find the relevant instructions in the Installation and Updates section of the Swarm manual.

If you do have not yet made your Ethereum account, start by running the following command:

geth account new


You will be prompted for a password:

Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat passphrase:


Address: {2f1cd699b0bf461dcfbf0098ad8f5587b038f0f1}


Since we need to use it later, save it into your ENV variables under the name BZZKEY

BZZKEY=2f1cd699b0bf461dcfbf0098ad8f5587b038f0f1


Next, start your geth node and establish connection with Ethereum main network with the following command

geth


After the connection is established, open another terminal window and connect to Swarm with

swarm --bzzaccount \$BZZKEY


To upload a single file, run this:

curl -H "Content-Type: text/plain" --data-binary "some-data" http://localhost:8500/bzz:/


Once the file is uploaded, you will receive a hex string which will look similar to.

027e57bcbae76c4b6a1c5ce589be41232498f1af86e1b1a2fc2bdffd740e9b39


curl -s http://localhost:8500/bzz:/027e57bcbae76c4b6a1c5ce589be41232498f1af86e1b1a2fc2bdffd740e9b39