Files
pingvin-share/docs/docs/setup/configuration.md
Mattia Müggler 9dfb52a145 feat: add ability to configure application with a config file (#740)
* add config file possibility

* revert port in docker compose

* Update docker-compose.yml

Co-authored-by: Elias Schneider <login@eliasschneider.com>

* Update docker-compose.yml

Co-authored-by: Elias Schneider <login@eliasschneider.com>

* add attribute description to config file

* remove email message config

* add package to resolve errors

* remove email messages from config

* move config initialization to config module

* revert unnecessary change

* add order

* improve alert

* run formatter

* remove unnecessary packages

* remove unnecessary types

* use logger

* don't save yaml config to db

* allowEdit if no yaml config is set

* improve docs

* fix allow edit state

* remove unnecessary check and refactor code

* restore old config file

* add script that generates `config.example.yaml` automatically

* allow config variables to be changed if they are not set in the `config.yml`

* add back init user

* Revert "allow config variables to be changed if they are not set in the `config.yml`"

This reverts commit 7dbdb6729034be5b083f126f854d5e1411735a54.

* improve info box text

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
2025-02-28 11:01:54 +01:00

4.2 KiB

id
id
configuration

Configuration

General configuration

There are plenty of settings you can adjust to your needs. Pingvin Share can be configured in two ways:

UI

You can change the settings in the UI (/admin/config)

YAML file

You can set the configuration via a YAML file. If you choose this way, you won't be able to change the settings in the UI.

If you use Docker you can create a config.yml file based on the config.example.yaml and mount it to /opt/app/config.yaml in the container.

If you run Pingvin Share without Docker, you can create a config.yml file based on the config.example.yaml in the root directory of the project.


Environment variables

For installation specific configuration, you can use environment variables. The following variables are available:

Backend

Variable Default Value Description
BACKEND_PORT 8080 The port on which the backend listens.
DATABASE_URL file:../data/pingvin-share.db?connection_limit=1 The URL of the SQLite database.
DATA_DIRECTORY ./data The directory where data is stored.
CLAMAV_HOST 127.0.0.1 or clamav when running with Docker The IP address of the ClamAV server. See the ClamAV docs for more information.
CLAMAV_PORT 3310 The port number of the ClamAV server.

Frontend

Variable Default Value Description
PORT 3000 The port on which the frontend listens.
API_URL http://localhost:8080 The URL of the backend for the frontend.

Docker specific

Environment variables that are only available when running Pingvin Share with Docker.

Variable Default Value Description
TRUST_PROXY false Whether Pingvin Share is behind a reverse proxy. If set to true, the X-Forwarded-For header is trusted.
PUID and PGID 1000 The user and group ID of the user who should run Pingvin Share inside the Docker container and owns the files that are mounted with the volume. You can get the PUID and GUID of your user on your host machine by using the command id. For more information see this article.