Configuration
Create a "config.conf" (without the ") file in the root folder and customize sharenton with the following parameters. But you can also setup the configuration as environment variables. The environment variables has the same name as the config parameters. If you have the same parameter as environment value and config value, the config value overwrites the environment value.
. # Root folder
|- uploads # Folder for the uploads
- sharenton # The executable
- config.conf <-- Create "config.conf" file hereADMIN_PASSWORD
Set the password to gain access to the admin dashboard. If no password was set, access to the dashboard is not possible. You can open the Dashboard under "/admin/dashboard" or the shortcut "/admin", for example http://localhost:5050/admin/dashboard.
- Default: (Disabled)
#Example
ADMIN_PASSWORD=secret123ADMIN_PASSWORD_ENCRYPT
If set to true, you can set the ADMIN_PASSWORD parameter to be an bcrypt encrypted hash.
- Default: false
#Example
ADMIN_PASSWORD_ENCRYPT=trueAUTOCLEAN_OLD_FILES
Delete files older as the set value in days. Checked every hour. Deletion is based on modification time of the file. Empty folders are automatically removed too.
- Default: (Disabled)
#Example (Deletes files older than 3 days)
AUTOCLEAN_OLD_FILES=3DISABLE_PUBLIC
Disable the public user. Unauthorized access will then no longer be possible.
- Default: false
#Example
DISABLE_PUBLIC=trueDISABLE_UPLOAD
Disable all uploads. Downloads are still possible.
- Default: false
#Example
DISABLE_UPLOAD=trueDISABLE_UPLOAD_PUBLIC
Disable the upload for the public user only. Other users are not affected.
- Default: false
#Example
DISABLE_UPLOAD_PUBLIC=trueIP
Set the listen IP address.
- Default: (All interfaces, IPv4 and IPv6)
#Example
IP=127.0.0.1
IP=[::1]LOG_LEVEL
Set the amount of information that gets logged. Log messages output to stdout. You can pipe it to a file from there for example.
- Default: error
#Options
- info
- error
- false
#Example (disabled)
LOG_LEVEL=falseMAX_FILES
How many files are allowed to upload in one operation.
- Default: 50
#Example
MAX_FILES=15MAX_FILE_NAME_LENGTH
Truncates the file name to the set value.
- Default: 75
#Example
MAX_FILE_NAME_LENGTH=30MAX_FILE_SIZE
Set the maximun allowed upload size for a file in megabytes.
- Default: 0 (unlimited)
#Example (1 Gigabyte)
MAX_FILE_SIZE=1000PORT
Set the listen port.
- Default: 5050
#Example
PORT=3000SSL
Enable the webserver to use encrypted HTTPS instead of unencrypted HTTP. You can provide a "cert.pem" and a "key.pem" with your certificate and key in the root folder. If you dont provide a certificate and a key, Sharenton will generate them for you (untrusted).
- Default: false
#Example (Put your own "cert.pem" and "key.pem" in the root folder)
SSL=true