# Connect data providers

Profuz LAPIS allows to connect local, network, FTP, Google Drive, Dropbox, S3 and many others storages

1. Open ~/apache-tomcat/production-cofig.json file in your favorite text editor
2. Add or edit the following entry in "providers" array:

```json
  {
      "storageId": 11,
      "className": "com.profuzdigital.data_server.database.providers.vfs.VfsDataProvider",
      "name": [ { "language": "en", "country": "US", "searchValue": "Storage Name" } ],
      "enabled": true,
      "authenticationDataProperties": {
        "public": ["domain", "username"],
        "sensitive": ["password"]
      },
      "indexPath": "data/vfs-blob-index",
      "uri": "file:///DATA/DATA/DATA/",
      "fileMonitorDelay": 3600000,
      "rootAuthentication": {
        "domain": null,
        "username": "guest",
        "password": ""
      },
      "defaultAuthentication": {
        "domain": null,
        "username": "guest",
        "password": ""
      }
  }

```

   
Fields explanation:

- **storageId**: use unique number for each additional storage. Numbers below 7 are preserved by LAPIS
- **className**: 
    - for local file system (includded system mapped folders), SAMBA, NAS, FTP, WebDav, S3 and similar file storages use "com.profuzdigital.data\_server.database.providers.vfs.VfsDataProvider"
    - for YouTube use "com.profuzdigital.data\_server.database.providers.you\_tube.YouTubeDataProvider"
- **name**: in searchValue put the name you want to see in LAPIS UI. For example change "Starage Name" to "My External Storage"
- **enabled**: if true it will be connected, else if false it will be skipped
- **authenticationDataProperties**: describe autentication parameters. In the above example both domain and username must be used and password is case sensitive.
- **uri**: put the uri to access your connected storage. 
    - for local file system: file:///path/to/the/folder
    - for ftp: [ftp://ftp.example.com/optional/path/to/folder](ftp://ftp.example.com/optional/path/to/folder)
    - for SAMBA: [smb://serveraddress/path/to/the/folder](smb://serveraddress/path/to/the/folder)
    - for S3: [s3://server.example.com/path](s3://server.example.com/path)
    - for Dropbox: dropbox:///
    - for Guugle Drive: gdrive:///
- **fileMonitorDelay**: value in milisecods ro rescan remote file structure if needed
- **domain**, **username**, **password**: authentication parameters for the remote connection

Save and restart tomcat to apply the changes:

sudo systemctl restart tomcat.service