Skip to content

[Request]: Explain APP_KEYS environment variable in the docs #770

@NicoHof

Description

@NicoHof

Summary

When creating a new project this was automatically generated in config/server.js

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  app: {
    keys: env.array('APP_KEYS'),
  },
});

I am currently trying to deploy Strapi on Render. Documentation for this is fine so far. But deployment fails due to the error, that "APP_KEYS" env variable is missing. The APP_KEYS is stored in .env file. So far so good. So I fixed it by adding "APP_KEYS" to my env settings

But the main question is: what is this variable there for?

Why aren't they mentioned in the server.js docs here? https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/server.html#available-options

Or am I missing some documentation for this?

Why is it needed?

Documentation for "APP_KEYS" env variable. What is this for? Can it be omitted? Do I need to change this for different deployments?

Suggested solution(s)

Update those docs: https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/server.html#available-options

or link to the existing docs there (I cannot find)

Related issue(s)/PR(s)

No response

Metadata

Metadata

Assignees

Labels

issue: doc requestIssues that require adding new content, possibly with some prior researchsource: Dev DocsPRs/issues targeting the Developer Docstarget: v4Documentation PRs/issues targeting content from docs.strapi.io (main branch).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions