# Server configuration
./config/server.js is used to define server configuration for the Strapi application.
Changes to the
server.js file require rebuilding the admin panel. After saving the modified file run either
yarn build or
npm run build in the terminal to implement the changes.
# Available options
./config/server.js file can include the following parameters:
|Port on which the server should be running.||integer|
|Declare session keys (based on Koa session (opens new window)), which is used by the ||string|
| ||Listens on a socket. Host and port are cosmetic when this option is provided and likewise use ||string | integer|
| ||Enable errors to be emitted to ||boolean|
| ||Public url of the server. Required for many different features (ex: reset password, third login providers etc.). Also enables proxy support such as Apache or Nginx, example: ||string|
| ||Set the koa variable ||boolean|
| ||Cron configuration (powered by ||object|
| ||Enable or disable CRON jobs to schedule jobs at specific dates.||boolean|
| ||Declare CRON jobs to be run at specific dates.||object|
| ||Path configuration of different directories Strapi uses.||object|
| ||Customize the path of the public folder.||string|
./config/server.js file should at least include a minimal configuration with the
port parameters. Additional parameters can be included for a full configuration.
Environmental configurations (i.e. using the
env() helper) do not need to contain all the values so long as they exist in the default