# Guide: Deploying Web App to BTFS (Part 2)

By [DeFi Simon](https://paragraph.com/@defi-simon) · 2023-07-22

---

> This guide introduces two methods to deploy the front-end of a web application on BTFS, and compares the differences between BTFS, CDN, and Amazon S3.

Method Two: Using BTFS CLI
--------------------------

### Deployment Method

#### Installing BTFS Node

Please refer to: [Install BTFS Node](https://docs.btfs.io/docs/install-run-btfs20-node)

#### Adding Files/Folders

Execute the `btfs add` command:

    $ btfs add <file-name>
    
    // Output
    added QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCmnb <file-name>
     163 B / 163 B [=======================================================] 100.00%
    
    $ btfs add -r <dir-name>
    
    // Output
    added QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCmnb <dir-name/file-name>
    added QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCmnb <dir-name/file-name>
    ......
    added QmdBX8seLx4TGHwr8Tu9L2QSByaJ9bbFUpxFvKAYyxCmnb <dir-name>
     163 B / 163 B [=======================================================] 100.00%
    

Upload files to the BTFS network:

    $ btfs storage upload <file-hash>
    

#### Checking Upload Status

    $ btfs storage upload <session-id> status | jq '.Status'
    

#### Accessing Deployed Website

Open your browser and enter the URL: `https://gateway.btfs.io/btfs/<file-hash>` to view the deployed website.

#### Downloading Files

Execute the `btfs get` command:

    // get file
    $ btfs get <file-hash>
    
    
    // get dir(files)
    $ btfs get <dir-hash>
    

This will download the respective file from the BTFS network.

#### Deleting Files

To delete files from the network, run:

    $ btfs rm <file-hash>
    

[Subscribe](null)

---

*Originally published on [DeFi Simon](https://paragraph.com/@defi-simon/guide-deploying-web-app-to-btfs-part-2)*
