Storj

Contents

Storj#

docker-compose#

Storj is a distributed filesystem where node operators are rewarded with cryptocurrency for storing data.

See also

  • Sign up and host a Node on Storj [1]

  • Identity | Storj Docs [2]

  • QUIC requirements | Storj Docs [3]

  • Storage Node | Storj Docs [4]

  • How do I hold STORJ? What is a valid address or compatible wallet? – Storj [5]

  1. follow the Docker instructions

  2. create an ERC-20 compatible wallet

  3. open the 28967 TCP and UDP ports on your firewalls. These ports are for data transfers. Port 14002 is instead used to monitor your Storj node with a web browser. Port 14002 is not required to be exposed

  4. create the jobs directories

    mkdir -p /home/jobs/scripts/by-user/root/docker/storj
    
  5. create a Docker compose file

    /home/jobs/scripts/by-user/root/docker/storj/docker-compose.yml#
     1version: '3.2'
     2
     3volumes:
     4  storj:
     5
     6services:
     7  app:
     8    image: storjlabs/storagenode:latest
     9    restart: always
    10    ports:
    11      - 127.0.0.1:14002:14002
    12      - 28967:28967/tcp
    13      - 28967:28967/udp
    14    volumes:
    15      - type: bind
    16        source: /home/jobs/scripts/by-user/root/docker/storj/identity
    17        target: /app/identity
    18      - type: bind
    19        source: ${DATA_PATH}
    20        target: /app/config
    21    environment:
    22      - SETUP=true
    23      - WALLET=${WALLET_ADDRESS}
    24      - ADDRESS=${MAIN_DOMAIN}:28967
    25      - STORAGE=1.5TB
    26    networks:
    27      - mynetwork
    28
    29networks:
    30  mynetwork:
    31    driver: bridge
    32    driver_opts:
    33      com.docker.network.bridge.name: br_docker_storj
    

    Note

    Replace MAIN_DOMAIN, WALLET_ADDRESS and DATA_PATH with appropriate values.

  6. download the identity executable

    cd /home/jobs/scripts/by-user/root/docker/storj
    curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_amd64.zip -o identity_linux_amd64.zip
    unzip -o identity_linux_amd64.zip
    chmod +x identity
    
  7. create the authorization token from the host a node page

  8. create and authorize the identity

    ./identity create storagenode
    ./identity authorize storagenode ${authorization_token}
    
  9. move and backup the identity files

    cp -aR /root/.local/share/storj/identity/storagenode identity
    cp -aR /root/.local/share/storj key_backup
    rm -rf /root/.local/share/storj
    
  10. run the setup

    docker-compose up --remove orphans
    docker-compose down --remove orphans
    
  11. set the SETUP environment variable to false in the docker-compose file

  12. use this Systemd service unit file

    /home/jobs/services/by-user/root/docker-compose.storj.service#
     1[Unit]
     2Requires=docker.service
     3Requires=network-online.target
     4After=docker.service
     5After=network-online.target
     6
     7[Service]
     8Type=simple
     9WorkingDirectory=/home/jobs/scripts/by-user/root/docker/storj
    10
    11ExecStart=/usr/bin/docker-compose up --remove-orphans
    12ExecStop=/usr/bin/docker-compose down --remove-orphans
    13
    14Restart=always
    15
    16[Install]
    17WantedBy=multi-user.target
    
  13. fix the permissions

    chmod 700 /home/jobs/scripts/by-user/root/docker/storj/docker-compose.yml
    chmod 700 -R /home/jobs/services/by-user/root
    
  14. run the deploy script

Footnotes