text: (window.webpackJsonp=window.webpackJsonp||[]).push([[101],{159:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return i})),t.d(n,"metadata",(function(){return c})),t.d(n,"rightToc",(function(){return l})),t.d(n,"default",(function(){return u}));var r=t(2),o=t(6),a=(t(0),t(412)),i={id:"configuring",title:"Configuring"},c={unversionedId:"configuring",id:"configuring",isDocsHomePage:!1,title:"Configuring",description:"This document describes how the service can be configured. For a documentation",source:"@site/docs/configuring.md",slug:"/configuring",permalink:"/kratos/docs/next/configuring",editUrl:"https://github.com/ory/kratos/edit/master/docs/docs/configuring.md",version:"current",lastUpdatedBy:"Patrik",lastUpdatedAt:1596634577,sidebar:"docs",previous:{title:"Installation",permalink:"/kratos/docs/next/install"},next:{title:"Overview",permalink:"/kratos/docs/next/concepts/index"}},l=[{value:"Configuration File",id:"configuration-file",children:[]},{value:"Environmental Variables",id:"environmental-variables",children:[]}],s={rightToc:l};function u(e){var n=e.components,t=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},s,t,{components:n,mdxType:"MDXLayout"}),Object(a.b)("p",null,"This document describes ",Object(a.b)("em",{parentName:"p"},"how")," the service can be configured. For a documentation\non all configuration values head over to the\n",Object(a.b)("a",Object(r.a)({parentName:"p"},{href:"/kratos/docs/next/reference/configuration"}),"configuration reference"),"."),Object(a.b)("h2",{id:"configuration-file"},"Configuration File"),Object(a.b)("p",null,"Files in the format of JSON, YAML and TOML are supported. When starting Kratos\nyou specify the path to the config file via the ",Object(a.b)("inlineCode",{parentName:"p"},"--config")," flag. For more\nin-depth info run ",Object(a.b)("inlineCode",{parentName:"p"},"kratos help"),". We recommend you name your configuration file\n",Object(a.b)("inlineCode",{parentName:"p"},"kratos.(json|yml|yaml|toml)"),". This will enable automatic validation and code\ncompletion in VSCode, JetBrains' IDEs and other tools that utilise\n",Object(a.b)("a",Object(r.a)({parentName:"p"},{href:"https://www.schemastore.org/json/"}),"schemastore.org")," JSON schemas. Alternatively\nyou can add the schema mapping manually as well. It is recommended to prevent\nleaking of secrets by setting sensitive values via environmental variables as\ndescribed in the following section."),Object(a.b)("h2",{id:"environmental-variables"},"Environmental Variables"),Object(a.b)("p",null,"Environmental variables take precedence over config file values. Nested paths\nget mapped to config values by putting an underscore ",Object(a.b)("inlineCode",{parentName:"p"},"_")," between every level,\ne.g. ",Object(a.b)("inlineCode",{parentName:"p"},"selfservice.flows.settings.ui_url")," becomes\n",Object(a.b)("inlineCode",{parentName:"p"},"SELFSERVICE_FLOWS_SETTINGS_UI_URL=<value>"),"."),Object(a.b)("p",null,"Please note that there are some caveats when using env vars\n",Object(a.b)("a",Object(r.a)({parentName:"p"},{href:"https://www.ory.sh/docs/ecosystem/configuring"}),"documented here"),"."))}u.isMDXComponent=!0},412:function(e,n,t){"use strict";t.d(n,"a",(function(){return p})),t.d(n,"b",(function(){return b}));var r=t(0),o=t.n(r);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=o.a.createContext({}),u=function(e){var n=o.a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},p=function(e){var n=u(e.components);return o.a.createElement(s.Provider,{value:n},e.children)},f={inlineCode:"code",wrapper:function(e){var n=e.children;return o.a.createElement(o.a.Fragment,{},n)}},d=o.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=u(t),d=r,b=p["".concat(i,".").concat(d)]||p[d]||f[d]||a;return t?o.a.createElement(b,c(c({ref:n},s),{},{components:t})):o.a.createElement(b,c({ref:n},s))}));function b(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=d;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var s=2;s<a;s++)i[s]=t[s];return o.a.createElement.apply(null,i)}return o.a.createElement.apply(null,t)}d.displayName="MDXCreateElement"}}]);