Skip to content

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.

md
.                   # Root folder
|- uploads          # Folder for the uploads
- sharenton         # The executable
- config.conf       <-- Create "config.conf" file here

ADMIN_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)
md
#Example
ADMIN_PASSWORD=secret123

ADMIN_PASSWORD_ENCRYPT

If set to true, you can set the ADMIN_PASSWORD parameter to be an bcrypt encrypted hash.

  • Default: false
md
#Example
ADMIN_PASSWORD_ENCRYPT=true

AUTOCLEAN_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)
md
#Example (Deletes files older than 3 days)
AUTOCLEAN_OLD_FILES=3

DISABLE_PUBLIC

Disable the public user. Unauthorized access will then no longer be possible.

  • Default: false
md
#Example
DISABLE_PUBLIC=true

DISABLE_UPLOAD

Disable all uploads. Downloads are still possible.

  • Default: false
md
#Example
DISABLE_UPLOAD=true

DISABLE_UPLOAD_PUBLIC

Disable the upload for the public user only. Other users are not affected.

  • Default: false
md
#Example
DISABLE_UPLOAD_PUBLIC=true

IP

Set the listen IP address.

  • Default: (All interfaces, IPv4 and IPv6)
md
#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
md
#Options

- info
- error
- false

#Example (disabled)
LOG_LEVEL=false

MAX_FILES

How many files are allowed to upload in one operation.

  • Default: 50
md
#Example
MAX_FILES=15

MAX_FILE_NAME_LENGTH

Truncates the file name to the set value.

  • Default: 75
md
#Example
MAX_FILE_NAME_LENGTH=30

MAX_FILE_SIZE

Set the maximun allowed upload size for a file in megabytes.

  • Default: 0 (unlimited)
md
#Example (1 Gigabyte)
MAX_FILE_SIZE=1000

PORT

Set the listen port.

  • Default: 5050
md
#Example
PORT=3000

SSL

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
md
#Example (Put your own "cert.pem" and "key.pem" in the root folder)
SSL=true