Build & Deploy
Config Files

Config Files

Config files allow you to add specific files to a designated path in your Koyeb Services at runtime. They are useful to make configuration files, certificates, or any other text-based files available to your application.

Each config file has the following components:

  • Path: The absolute path where the file will be copied in the Service. This can include subdirectories, for instance: /etc/nginx/nginx.conf.
  • Content: The file's content. You can use interpolation to reference Secrets, Koyeb-provided variables, or other environment variables.
  • Permissions: The file permissions to be set (using the Unix permission system) in octal notation. The default is 0644.

By default, the owner of the config file is the user executing the application process. To change the ownership, you will need to make the appropriate changes on your end.

Managing config files

You can define and modify config files using either the Koyeb control panel (opens in a new tab) or the Koyeb CLI.

When using the Koyeb control panel, you can manage config files for your Service on the Service configuration screen. This screen is accessible both during your initial Service configuration and later in your Service's Settings tab.

From the Settings tab, expand the Environment variables and files section and select the Files tab.

To add a new config file, click Add file. Set the file's content and path where the file will be added at runtime.

To modify a config file, update its content or specify a new path.

To delete a config file, click the trash icon associated with the config file line.

Using config files with interpolation

You can use interpolation in config files to substitute environment variables and secret values. Koyeb will dynamically replace these references with their respective values in the file content at runtime.

Refer to the following documentation to learn how to use Environment variable and Secret interpolation for more details.