Config File
Use a config file to control how goshs behaves
It is possible to control goshs
via a config file. You just need to create the yaml config and provide all parameters.
Info
The config file will overwrite all provided config flags.
You can use this config struct as an example.
{
"interface": "0.0.0.0",
"port": 8000,
"directory": ".",
"ssl": false,
"self_signed": false,
"private_key": "",
"certificate": "",
"p12": "",
"letsencrypt": false,
"letsencrypt_domain": "",
"letsencrypt_email": "",
"letsencrypt_http_port": "80",
"letsencrypt_tls_port": "443",
"auth_username": "",
"auth_password": "",
"certificate_auth": "",
"webdav": false,
"webdav_port": 8001,
"upload_only": false,
"read_only": false,
"no_clipboard": false,
"verbose": false,
"silent": false,
"running_user": "",
"cli": false,
"embedded": false,
"output": ""
}
Or you use the one here or you can even print and redirect one by running:
goshs -P > /path/to/config.yaml
The config file behaves like the corresponding flags and should be self explenatory.
Warning
Make sure not to host the config.yaml in the directory you are serving with goshs. This would be a security issue. Also if you use basic auth make sure to use a hashed password by generating one with goshs -H
.