{"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"hosting-options","__idx":0},"children":["Hosting options"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"danger","name":"Deprecated docs"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The developer portal beta is ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/product-timelines"},"children":["approaching end of life"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use Realm and Reunite instead. Read the ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs-legacy/developer-portal/migrate-from-legacy-portal"},"children":["migration guide"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"host-the-portal-in-redocly-workflows","__idx":1},"children":["Host the portal in Redocly Workflows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Like Reference docs, the Developer portal can be hosted in Redocly Workflows. On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Portals"]}," page, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add new"]}," to import a Developer portal from any of the supported sources."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When all configuration options are set and the Developer portal successfully built, you can access it from the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Portals"]}," page. Additional options like custom domain and access control are available in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]}," tab for each of the configured Developer portals."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"host-the-portal-on-premise","__idx":2},"children":["Host the portal on-premise"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can host the Developer portal on your own servers - either directly as a static site or with Docker. The ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs-legacy/developer-portal/configuration/rbac"},"children":["role-based access control (RBAC)"]}," feature requires the Docker approach if you want to use it on-premise."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On-premise Developer portal deployments currently support a single identity provider configuration."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-to-host-the-developer-portal-with-docker","__idx":3},"children":["How to host the Developer portal with Docker"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, update the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["siteConfig.yaml"]}," in your portal repository. The only required change in this step is adding the authentication settings."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"auth:\n  idps:\n    main:\n      type: oidc\n      configurationUrl: https://auth.example.com/.well-known/openid-configuration\n      clientId: OIDC CLIENT_ID\n      clientSecret: '****'\n      scopes:\n        - list\n        - of\n        - scopes\n  globalAuthRequirement: public | <idpId>\n  allowLoginWith: <idpId>\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["main"]}," = the ID of the identity provider."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," = type of the identity provider. Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oidc"]}," is supported."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationUrl"]}," = OIDC server configuration URL (.well-known)."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientSecret"]}," = can be provided using environment variables, as explained further in this text."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["globalAuthRequirement"]}," = controls the auth requirement for accessing the site content. You can use the special value ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["public"]}," here."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowLoginWith"]}," = you can allow login functionality if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["globalAuthRequirement"]}," is set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["public"]},". Auth details can be used by custom components or by ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs-legacy/developer-portal/configuration/rbac"},"children":["RBAC features"]},"."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then, ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs-legacy/developer-portal/introduction"},"children":["build"]}," the Developer portal static site. To do so, run the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm run build"]}," command in the root directory of the Developer portal project."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the build is finished, you can run the portal Docker image in two ways. Either create your own Docker image (based on the official image published by Redocly), or run our official image and use the Docker volume to mount the portal directory."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-new-docker-image","__idx":4},"children":["Create a new Docker image"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the following lines to a Dockerfile, and build a new image from it:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"docker","header":{"controls":{"copy":{}}},"source":"FROM redocly/developer-portal-server:latest\n\nCOPY ./path/to/portal/public /portal\n","lang":"docker"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mount-volume-to-the-existing-docker-image","__idx":5},"children":["Mount volume to the existing Docker image"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"docker","header":{"controls":{"copy":{}}},"source":"docker run -p 80:80 -v ./path/to/portal/public:/portal redocly/developer-portal-server:latest\n","lang":"docker"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-environment-variables","__idx":6},"children":["Use environment variables"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can set environment variables at runtime like in the example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"docker","header":{"controls":{"copy":{}}},"source":"docker run -p 80:80 --env REDOCLY_IDP_MAIN_CLIENTSECRET=some_value -v ./path/to/portal/public:/portal redocly/developer-portal-server:latest\n","lang":"docker"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To specify IdP configuration values as environment variables, use the following format:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"REDOCLY_IDP_{{IDP_ID}}_{{PARAMETER_NAME}}\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDP_ID"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PARAMETER_NAME"]}," parameters must be upper-cased."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientSecret"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["main"]}," IdP, use the following environment variable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"REDOCLY_IDP_MAIN_CLIENTSECRET\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"enable-https","__idx":7},"children":["Enable HTTPS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To enable the HTTPS protocol support, provide all of the following environment variables:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTPS_ENABLE=1"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SSL_CERT_PATH"]},", path to the SSL certificate"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SSL_KEY_PATH"]},", path to the SSL key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SSL_PASSPHRASE"]},", default with no pass-phrase"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTPS_PORT"]},", default 443"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We suggest mounting a separate Docker volume with the SSL keys for better separation and security between your data and certificates, as in this example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"docker","header":{"controls":{"copy":{}}},"source":"docker run -p 443:443 -p 80:80 --env SSL_CERT_PATH=/ssl/cert.pem --env SSL_KEY_PATH=/ssl/key.pem -v /path/to/portal/public/:/portal -v /path/to/ssl/keys/:/ssl redocly-developer-portal-server:latest\n","lang":"docker"},"children":[]}]},"frontmatter":{"seo":{"title":"How to host the Developer portal"},"enableToc":true,"excludeFromSearch":true},"tagList":["admonition","partial"],"title":"How to host the Developer portal","lastModified":"2025-05-28T16:01:32.000Z"}