Configuration using .env files
Most OttoFMS settings are available from the OttoFMS console, but some settings are only available by editing an .env
file directly. The .env
file is a text file that contains key-value pairs that are used to configure the OttoFMS server. the .env
file is located in the OttoFMS config directory, which is located inside of the OttoFMS application folder. It can also be found in the OttoFMS File Manager under OttoFMS Config.
In the File Manager:
- .env
In the Server File System:
- .env
Environment level settings
Custom FileMaker Server Configuration
If you are using a custom FileMaker server configuration (ie. a non-standard install directory or a different fmserver username and password) you can set these values in the .env
file. The following keys are available:
- FMS_SERVER_PATH=/path/to/fmserver
- FMSERVER_USERNAME=username
- FMSERVER_PASSWORD=password
Just In Time Build Management
By default, OttoFMS deletes Just In Time builds from the source server after they are used. If you would like to keep just in time builds on the source, you can set the following key on the destination server:
- KEEPJIT=1
OttoFMS Debug Logging
OttoFMS has a debug logging mode that can be enabled by setting the following key:
- DEBUG=true
OttoFMS debug logs include more information than the default logging. This can be useful for debugging issues with builds, deployments, and other OttoFMS processes.
App Log Debug logs
The App Log can be configured to log an extra level of messages for debugging purposes. To enable debug logs, set the following key:
- DEBUG_APP_LOG=true
This enables sending logs with the "debug","verbose", and "http" levels to a new log file called app-debug.log
. See the App Log Guide for details on setting up application logging with OttoFMS.
Just In Time Build timeout
When running a deployment, Just in Time builds can be used to create a build on the source server. If creating copies of very large files these can take a long time. By default, OttoFMS will time out of a Just In Time build after 30 minutes. If you would like to change this timeout, you can set the following key:
- JIT_BUILD_TIMEOUT_IN_SEC=3600
Backup Timeout
When running a backup, the backup process can take a long time. By default, OttoFMS will time out of a backup after 10 minutes. If you would like to change this timeout, you can set the following key:
- BACKUP_FILE_TIMEOUT_IN_SEC=600
Build and Deployment script timeouts
When running a build or deployment, OttoFMS exposes a pre-build, pre-deployment, and post-deployment script. These scripts can take a long time to run, and OttoFMS has a default timeout of 1 hour, at which point OttoFMS will throw an error and possibly abort the build or deployment. If you would like to change this timeout, you can set the following keys:
- PRE_BUILD_SCRIPT_TIMEOUT_IN_SEC=3600
- PRE_DEPLOYMENT_SCRIPT_TIMEOUT_IN_SEC=3600
- POST_DEPLOYMENT_SCRIPT_TIMEOUT_IN_SEC=3600
These timeouts can also be overriden on a per-build or per-deployment basis by setting the timeout in the script options.
Changing the migration folder
When running a deployment that migrates files, OttoFMS migrates the data from your current live file to a temporary file which is stored in the build inbox. This works well for servers where there is only a single disk, but it can cause slow-downs on servers where the backup folder is on a different disk than the live databases as the build inbox is stored within the default backup directory.
To get around this issue, you can set the USE_DATABASE_FOLDER_FOR_MIGRATIONS
key to "true" in your env file. This will perform the migration into the Removed_By_FMS/Removed
folder within your database folder, avoiding the need to migrate large quentities of data across disk boundaries. .
Be aware that migrating within the database folder has fewer protections than performing the migration in the build inbox, as OttoFMS will not check to see that you have enough disk space to perform the migration on your database disk and the migrated file may not be deleted if the deployment does not complete
- USE_DATABASE_FOLDER_FOR_MIGRATIONS=true
Hide Server Details for Demos
If you want to do a demo of OttoFMS and you'd like to hide server details like urls and ip addresses, you can set the following key:
- PUBLIC_HIDE_SERVER_INFO=true
Example .env File
Here is an example of an .env
file for OttoFMS:
FMS_SERVER_PATH=/path/to/fmserver
FMSERVER_USERNAME=username
FMSERVER_PASSWORD=password
KEEPJIT=1
DEBUG_APP_LOG=true