This command can only be used by root

Solution 1:

You need to change your wget command from:

wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add -

to:

wget -O - http://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -

Solution 2:

The error message is from apt-key, and as it says, use it with sudo:

wget -O - http://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -