Skip to content

App Packages

Overview

Apps have their own config files that can be edited to further configure or customize the app.

Customization Strategy

As an example, the SFTPGo app has a /app/data/sftpgo.json file where users can add custom configuration.

At the same time, Cloudron has to ensure that some configurations are made so the basic functionally like database, email, authentication is always given. Cloudron sets these configurations on every app restart.

What configurations are overwritten by default can be viewed in the app startup file in the package repository.

For the SFTPGo app, the start.sh has lines like this:

# postgresql
yq -i -o json '.data_provider.driver="postgresql"' $config_file
yq -i -o json '.data_provider.name=strenv(CLOUDRON_POSTGRESQL_DATABASE)' $config_file
yq -i -o json '.data_provider.host=strenv(CLOUDRON_POSTGRESQL_HOST)' $config_file
yq -i -o json '.data_provider.port=strenv(CLOUDRON_POSTGRESQL_PORT)' $config_file
yq -i -o json '.data_provider.username=strenv(CLOUDRON_POSTGRESQL_USERNAME)' $config_file
yq -i -o json '.data_provider.password=strenv(CLOUDRON_POSTGRESQL_PASSWORD)' $config_file

This will always be executed on every app restart and PostgreSQL settings will always be overwritten.

If you ever encounter a situation where the config file resets on its own, this might be the culprit. You can always confirm that with a bit of code review of the app in question - Packages Repos.