2020-03-04 22:10:58 +00:00
# Portable mode
SFTPGo allows to share a single directory on demand using the `portable` subcommand:
2020-06-15 21:46:11 +00:00
```console
2020-03-04 22:10:58 +00:00
sftpgo portable --help
2020-07-09 16:58:22 +00:00
To serve the current working directory with auto generated credentials simply
use:
2020-03-04 22:10:58 +00:00
2020-07-09 16:58:22 +00:00
$ sftpgo portable
2020-03-04 22:10:58 +00:00
Please take a look at the usage below to customize the serving parameters
Usage:
sftpgo portable [flags]
Flags:
2020-11-15 21:04:48 +00:00
-C, --advertise-credentials If the SFTP/FTP service is
advertised via multicast DNS, this
flag allows to put username/password
inside the advertised TXT record
2020-11-24 12:44:57 +00:00
-S, --advertise-service Advertise configured services using
2020-11-15 21:04:48 +00:00
multicast DNS
--allowed-patterns stringArray Allowed file patterns case insensitive.
The format is:
/dir::pattern1,pattern2.
For example: "/somedir::*.jpg,a*b?.png"
--az-access-tier string Leave empty to use the default
container setting
2020-10-25 20:42:43 +00:00
--az-account-key string
--az-account-name string
--az-container string
2020-11-15 21:04:48 +00:00
--az-endpoint string Leave empty to use the default:
"blob.core.windows.net"
--az-key-prefix string Allows to restrict access to the
virtual folder identified by this
prefix and its contents
--az-sas-url string Shared access signature URL
--az-upload-concurrency int How many parts are uploaded in
parallel (default 2)
--az-upload-part-size int The buffer size for multipart uploads
(MB) (default 4)
2020-10-25 20:42:43 +00:00
--az-use-emulator
2020-12-05 12:48:13 +00:00
--crypto-passphrase string Passphrase for encryption/decryption
2020-11-15 21:04:48 +00:00
--denied-patterns stringArray Denied file patterns case insensitive.
The format is:
/dir::pattern1,pattern2.
For example: "/somedir::*.jpg,a*b?.png"
-d, --directory string Path to the directory to serve.
This can be an absolute path or a path
relative to the current directory
(default ".")
-f, --fs-provider int 0 => local filesystem
1 => AWS S3 compatible
2 => Google Cloud Storage
3 => Azure Blob Storage
2020-12-05 12:48:13 +00:00
4 => Encrypted local filesystem
2020-12-12 09:31:09 +00:00
5 => SFTP
2020-11-15 21:04:48 +00:00
--ftpd-cert string Path to the certificate file for FTPS
--ftpd-key string Path to the key file for FTPS
--ftpd-port int 0 means a random unprivileged port,
< 0 disabled ( default -1 )
--gcs-automatic-credentials int 0 means explicit credentials using
a JSON credentials file, 1 automatic
(default 1)
2020-03-04 22:10:58 +00:00
--gcs-bucket string
2020-11-15 21:04:48 +00:00
--gcs-credentials-file string Google Cloud Storage JSON credentials
file
--gcs-key-prefix string Allows to restrict access to the
virtual folder identified by this
prefix and its contents
2020-03-04 22:10:58 +00:00
--gcs-storage-class string
2020-11-15 21:04:48 +00:00
-h, --help help for portable
-l, --log-file-path string Leave empty to disable logging
-v, --log-verbose Enable verbose logs
-p, --password string Leave empty to use an auto generated
value
-g, --permissions strings User's permissions. "*" means any
permission (default [list,download])
2020-03-04 22:10:58 +00:00
-k, --public-key strings
--s3-access-key string
--s3-access-secret string
--s3-bucket string
--s3-endpoint string
2020-11-15 21:04:48 +00:00
--s3-key-prefix string Allows to restrict access to the
virtual folder identified by this
prefix and its contents
2020-03-04 22:10:58 +00:00
--s3-region string
--s3-storage-class string
2020-11-15 21:04:48 +00:00
--s3-upload-concurrency int How many parts are uploaded in
parallel (default 2)
--s3-upload-part-size int The buffer size for multipart uploads
(MB) (default 5)
2021-04-07 17:47:39 +00:00
--sftp-buffer-size int The size of the buffer (in MB) to use
for transfers. By enabling buffering,
the reads and writes, from/to the
remote SFTP server, are split in
multiple concurrent requests and this
allows data to be transferred at a
faster rate, over high latency networks,
by overlapping round-trip times
2021-03-06 14:41:40 +00:00
--sftp-disable-concurrent-reads Concurrent reads are safe to use and
disabling them will degrade performance.
Disable for read once servers
2020-12-12 09:31:09 +00:00
--sftp-endpoint string SFTP endpoint as host:port for SFTP
provider
--sftp-fingerprints strings SFTP fingerprints to verify remote host
key for SFTP provider
--sftp-key-path string SFTP private key path for SFTP provider
--sftp-password string SFTP password for SFTP provider
--sftp-prefix string SFTP prefix allows restrict all
operations to a given path within the
remote SFTP server
--sftp-username string SFTP user for SFTP provider
2020-11-24 12:44:57 +00:00
-s, --sftpd-port int 0 means a random unprivileged port,
< 0 disabled
2020-11-15 21:04:48 +00:00
-c, --ssh-commands strings SSH commands to enable.
"*" means any supported SSH command
including scp
(default [md5sum,sha1sum,cd,pwd,scp])
-u, --username string Leave empty to use an auto generated
value
--webdav-cert string Path to the certificate file for WebDAV
over HTTPS
--webdav-key string Path to the key file for WebDAV over
HTTPS
--webdav-port int 0 means a random unprivileged port,
< 0 disabled ( default -1 )
2020-03-04 22:10:58 +00:00
```
2020-07-29 19:56:56 +00:00
In portable mode, SFTPGo can advertise the SFTP/FTP services and, optionally, the credentials via multicast DNS, so there is a standard way to discover the service and to automatically connect to it.
2020-03-04 22:10:58 +00:00
2020-07-29 19:56:56 +00:00
Here is an example of the advertised SFTP service including credentials as seen using `avahi-browse` :
2020-03-04 22:10:58 +00:00
2020-06-15 21:46:11 +00:00
```console
2020-03-04 22:10:58 +00:00
= enp0s31f6 IPv4 SFTPGo portable 53705 SFTP File Transfer local
hostname = [p1.local]
address = [192.168.1.230]
port = [53705]
txt = ["password=EWOo6pJe" "user=user" "version=0.9.3-dev-b409523-dirty-2019-10-26T13:43:32Z"]
```