Automatic .env and nodes.md Script for Farmerbot (.sh and .py)

Hey farmers,

Some of you asked for simpler ways to set the Farmerbot. With this in mind, we present here a script to write the .env and nodes.md files.

This is an ongoing work. Please share your ideas and feedback if you have any.

All the steps are on this link: https://github.com/Mik-TF/farmerbot-script
You should double-check the files once the script is done.

Let us know if you have any questions.

Note: This isn’t an official script from Threefold. It might become an official one later. Who knows?


Steps to Create the Files

  • Create a folder to store the script and the files
    • cd ~
      
    • mkdir -p farmerbot_script && cd "$_" || exit
      
  • Download the script
    • Bash version
      • wget -O farmerbot_script.sh https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script.sh
        
    • Python version
      • wget -O farmerbot_script.py https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/farmerbot_script.py
        
  • Set the permissions to run the script
    • Bash version
      • chmod +x farmerbot_script.sh
        
    • Python version
      • chmod +x farmerbot_script.py
        
  • Run the script
    • Bash version
      • ./farmerbot_script.sh
        
    • Python version
      • python farmerbot_script.py
        
  • Enter the values asked
  • The .env and config.md files are saved in the folder /farmerbot_script/farmerbot_files

Steps to See the Content of the Files

  • Go to the newly created folder
    • cd farmerbot_files
      
  • See the content of the file config.md
    • cat config.md
      
  • See the content of the file .env
    • cat .env
      
1 Like

EDIT:

I updated the script to take into account potential input errors.

See the readme.md file for more information.

You can check the code: everything is done on your local computer. Your seed phrase should be safe. Check for yourself! DYOR.

UPDATE:

The script is now available in python, as was discussed and requested in this issue.

The whole process is very straightforward.

The main post has been updated with the updated steps for the python version.

Very nice. Hope to do this soon.

1 Like

ThreeFold Farmerbot Deployment

We present a quick way to deploy the Farmerbot.

  • In the first section, we create the files and the folder structure for the Farmerbot.
  • In the second section, we download and run the Farmerbot.

Steps to Create the Files

  • Create the parent folder
    • cd ~
      
    • mkdir -p farmerbot_docker && cd "$_" || exit
      
      • Note: you can choose a different name for your parent folder
  • Download and run the file creator
    • Download the file creator
      • wget -O fbot_file_creator.v https://raw.githubusercontent.com/Mik-TF/farmerbot-script/main/fbot_file_creator.v
        
    • Run the file creator
      • Download Vlang
      • v run fbot_file_creator.v
        
    • Enter the values asked
    • The .env file is saved in the parent folder
    • The config.md file is saved in config within the parent folder

Steps to Run the Farmerbot

  • Install and run docker
  • To download the Farmerbot .yaml file, write the following
    • wget https://raw.githubusercontent.com/threefoldtech/farmerbot/development/docker-compose.yaml
      
  • To run the Farmerbot, write the following
    • docker compose up -d
      

Reference: https://github.com/Mik-TF/farmerbot-script/blob/main/fbot_README.md