mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
Improve documentation
This commit is contained in:
parent
bd7b6a785e
commit
788e068e13
3 changed files with 21 additions and 14 deletions
26
README.md
26
README.md
|
@ -84,8 +84,8 @@ The `sftpgo.conf` configuration file contains the following sections:
|
|||
- `username`
|
||||
- `path`
|
||||
- `target_path`, added for `rename` action only
|
||||
- `keys`, struct array. It contains the daemon's private keys
|
||||
- `private_key`, path to the private key file
|
||||
- `keys`, struct array. It contains the daemon's private keys. If empty or missing the daemon will search or try to generate `id_rsa` in the configuration directory.
|
||||
- `private_key`, path to the private key file. It can be a path relative to the config dir or an absolute one.
|
||||
- **"data_provider"**, the configuration for the data provider
|
||||
- `driver`, string. Supported drivers are `sqlite`, `mysql`, `postgresql`
|
||||
- `name`, string. Database name. For driver `sqlite` this can be the database name relative to the config dir or the absolute path to the SQLite database.
|
||||
|
@ -121,14 +121,7 @@ Here is a full example showing the default config:
|
|||
"command": "",
|
||||
"http_notification_url": ""
|
||||
},
|
||||
"keys": [
|
||||
{
|
||||
"private_key": "id_rsa"
|
||||
},
|
||||
{
|
||||
"private_key": "id_ecdsa"
|
||||
}
|
||||
]
|
||||
"keys": []
|
||||
},
|
||||
"data_provider": {
|
||||
"driver": "sqlite",
|
||||
|
@ -150,6 +143,19 @@ Here is a full example showing the default config:
|
|||
}
|
||||
```
|
||||
|
||||
If you want to use a private key that use an algorithm different from RSA or more than one private key then replace the empty `keys` array with something like this:
|
||||
|
||||
```json
|
||||
"keys": [
|
||||
{
|
||||
"private_key": "id_rsa"
|
||||
},
|
||||
{
|
||||
"private_key": "id_ecdsa"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Account's configuration properties
|
||||
|
||||
For each account the following properties can be configured:
|
||||
|
|
|
@ -49,9 +49,9 @@ type Configuration struct {
|
|||
Keys []Key `json:"keys"`
|
||||
}
|
||||
|
||||
// Struct containing information about host keys
|
||||
// Key contains information about host keys
|
||||
type Key struct {
|
||||
// The private key
|
||||
// The private key path relative to the configuration directory or absolute
|
||||
PrivateKey string `json:"private_key"`
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ func (c Configuration) Initialize(configDir string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Add our private key to the server configuration.
|
||||
// Add private key to the server configuration.
|
||||
serverConfig.AddHostKey(private)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
"execute_on": [],
|
||||
"command": "",
|
||||
"http_notification_url": ""
|
||||
}
|
||||
},
|
||||
"keys": []
|
||||
},
|
||||
"data_provider": {
|
||||
"driver": "sqlite",
|
||||
|
|
Loading…
Reference in a new issue