1. 安装程序:

    git clone <https://github.com/EverythingSuckz/TG-FileStreamBot>
    cd TG-FileStreamBot
    go build ./cmd/fsb/
    
    #修改权限
    chmod +x fsb
    #重命名
    mv fsb.sample.env fsb.env
    
  2. 编写配置:

    nano fsb.env
    
    # Required Variables (DO NOT SKIP THESE)
    
    API_ID=20391635
    API_HASH=cff9586ad856f1f43ea384d70426e703
    BOT_TOKEN=7277519882:AAFFhcmOPryrWaN85fiCHpwWlEhnNVAMxy0
    LOG_CHANNEL=-1002499340224
    
    # Optional Variables
    
    PORT=45644
    
    # The length of the hash in your URLs
    # <https://domain.tld/1254?hash=asd45a>
    #                              ^^^^^^
    #                                /
    #                         This is the hash
    
    HASH_LENGTH=6
    
    # you can use IP address
    HOST=http://file.diss.us.kg
    # Or you can also use a domain name
    # HOST=https://example.com
    
    # For muti token support
    # Refer <https://github.com/EverythingSuckz/TG-FileStreamBot/tree/golang#use-multiple-bots-to-speed-up>
    
    #MULTI_TOKEN1=7277519882:AAFFhcmOPryrWaN85fiCHpwWlEhnNVAMxy0
    #MULTI_TOKEN2=6741529638:AAFq_bcqoc2SlRTBTkG29JJPftAbqlsUtA8
    # MULTI_TOKEN3=6941936497:AAGJzfoMHXshS8gVcsefUzpwyrbfU7gKRMM
    # MULTI_TOKEN4=6546079247:AAF2k3uvO9Hqadfhjaskjds8jnzOAfQYUzTZ
    
  3. 启动程序:

    nohup ${HOME}/TG-FileStreamBot/fsb run >/dev/null 2>&1 &