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
|
|
|
--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
|
2022-02-21 18:01:31 +00:00
|
|
|
--az-download-concurrency int How many parts are downloaded in
|
|
|
|
parallel (default 5)
|
|
|
|
--az-download-part-size int The buffer size for multipart downloads
|
|
|
|
(MB) (default 5)
|
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
|
2022-02-21 18:01:31 +00:00
|
|
|
parallel (default 5)
|
2020-11-15 21:04:48 +00:00
|
|
|
--az-upload-part-size int The buffer size for multipart uploads
|
2022-02-21 18:01:31 +00:00
|
|
|
(MB) (default 5)
|
2020-10-25 20:42:43 +00:00
|
|
|
--az-use-emulator
|
2023-09-25 16:20:09 +00:00
|
|
|
-c, --config-dir string Location of the config dir. This directory
|
|
|
|
is used as the base for files with a relative
|
|
|
|
path, e.g. the private keys for the SFTP
|
|
|
|
server or the database file if you use a
|
|
|
|
file-based data provider.
|
|
|
|
The configuration file, if not explicitly set,
|
|
|
|
is looked for in this dir. We support reading
|
|
|
|
from JSON, TOML, YAML, HCL, envfile and Java
|
|
|
|
properties config files. The default config
|
|
|
|
file name is "sftpgo" and therefore
|
|
|
|
"sftpgo.json", "sftpgo.yaml" and so on are
|
|
|
|
searched.
|
|
|
|
This flag can be set using SFTPGO_CONFIG_DIR
|
|
|
|
env var too. (default ".")
|
|
|
|
--config-file string Path to SFTPGo configuration file.
|
|
|
|
This flag explicitly defines the path, name
|
|
|
|
and extension of the config file. If must be
|
|
|
|
an absolute path or a path relative to the
|
|
|
|
configuration directory. The specified file
|
|
|
|
name must have a supported extension (JSON,
|
|
|
|
YAML, TOML, HCL or Java properties).
|
|
|
|
This flag can be set using SFTPGO_CONFIG_FILE
|
|
|
|
env var too.
|
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 ".")
|
2021-06-19 17:40:53 +00:00
|
|
|
-f, --fs-provider string osfs => local filesystem (legacy value: 0)
|
|
|
|
s3fs => AWS S3 compatible (legacy: 1)
|
|
|
|
gcsfs => Google Cloud Storage (legacy: 2)
|
|
|
|
azblobfs => Azure Blob Storage (legacy: 3)
|
|
|
|
cryptfs => Encrypted local filesystem (legacy: 4)
|
|
|
|
sftpfs => SFTP (legacy: 5) (default "osfs")
|
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
|
2022-10-22 09:56:41 +00:00
|
|
|
--grace-time int This grace time defines the number of
|
|
|
|
seconds allowed for existing transfers
|
|
|
|
to get completed before shutting down.
|
|
|
|
A graceful shutdown is triggered by an
|
|
|
|
interrupt signal.
|
|
|
|
|
2020-11-15 21:04:48 +00:00
|
|
|
-h, --help help for portable
|
2023-08-10 17:02:55 +00:00
|
|
|
--httpd-cert string Path to the certificate file for WebClient
|
|
|
|
over HTTPS
|
|
|
|
--httpd-key string Path to the key file for WebClient over
|
|
|
|
HTTPS
|
|
|
|
--httpd-port int 0 means a random unprivileged port,
|
|
|
|
< 0 disabled (default -1)
|
2020-11-15 21:04:48 +00:00
|
|
|
-l, --log-file-path string Leave empty to disable logging
|
2022-07-13 08:40:24 +00:00
|
|
|
--log-level string Set the log level.
|
|
|
|
Supported values:
|
|
|
|
|
|
|
|
debug, info, warn, error.
|
|
|
|
(default "debug")
|
2021-11-06 15:27:01 +00:00
|
|
|
--log-utc-time Use UTC time for logging
|
2020-11-15 21:04:48 +00:00
|
|
|
-p, --password string Leave empty to use an auto generated
|
|
|
|
value
|
2023-02-25 09:24:23 +00:00
|
|
|
--password-file string Read the password from the specified
|
|
|
|
file path. Leave empty to use an auto
|
|
|
|
generated value
|
2020-11-15 21:04:48 +00:00
|
|
|
-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
|
2021-11-13 15:05:40 +00:00
|
|
|
--s3-acl string
|
2020-03-04 22:10:58 +00:00
|
|
|
--s3-bucket string
|
|
|
|
--s3-endpoint string
|
2021-11-26 18:00:44 +00:00
|
|
|
--s3-force-path-style Force path style bucket URL
|
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
|
2022-03-27 14:32:21 +00:00
|
|
|
--s3-role-arn string
|
2023-11-05 18:27:11 +00:00
|
|
|
--s3-skip-tls-verify If enabled the S3 client accepts any TLS
|
|
|
|
certificate presented by the server and
|
|
|
|
any host name in that certificate.
|
|
|
|
In this mode, TLS is susceptible to
|
|
|
|
man-in-the-middle attacks.
|
|
|
|
This should be used only for testing.
|
|
|
|
|
2020-03-04 22:10:58 +00:00
|
|
|
--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
|
2023-09-25 16:20:09 +00:00
|
|
|
--ssh-commands strings SSH commands to enable.
|
2020-11-15 21:04:48 +00:00
|
|
|
"*" means any supported SSH command
|
|
|
|
including scp
|
2022-03-27 14:32:21 +00:00
|
|
|
(default [md5sum,sha1sum,sha256sum,cd,pwd,scp])
|
2022-03-03 11:44:56 +00:00
|
|
|
--start-directory string Alternate start directory.
|
|
|
|
This is a virtual path not a filesystem
|
|
|
|
path (default "/")
|
2020-11-15 21:04:48 +00:00
|
|
|
-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
|
|
|
```
|
2023-12-17 08:09:18 +00:00
|
|
|
|
|
|
|
In portable mode you can apply further customizations using a configuration file/environment variables as for the service mode.
|
|
|
|
SFTP, FTP, HTTP and WebDAV settings configured using the CLI flags are applied to the first binding, any additional bindings will not be affected.
|