Replies: 2 comments 4 replies
-
Hihi! At least for my understanding these scripts won't include what are "Production ready" installations, but I'll suggest you read something like: https://www.keycloak.org/server/configuration-production Which includes common practices to expose a Keycloak instance to the world, and yeah you may change some things here and there. You could also have it LAN only (depending on how things are communicating in your servers, or if you are willing to develop something in the meantime your instance is ready to be exposed). Also here is a cool topic about it: https://medium.com/@atondelier/keycloak-for-production-level-saas-authentication-b2ef0b1138d4 In any case I'll suggest you ask in some or their social media https://www.keycloak.org/community |
Beta Was this translation helpful? Give feedback.
-
I think adding an optional production mode would be a good idea, it being an authentication platform and all. The current script gets Keycloak running quickly for evaluation, which is great, but it starts in development mode. That leaves a number of insecure defaults in place. I have taken the container produced by the script and brought it up to a basic production posture. I'll share the steps below in the hope they help with adding a production path that can automate most of this. My Keycloak sits behind an Nginx reverse proxy, so the configuration shown assumes TLS terminates at the proxy and Keycloak sees forwarded headers from a trusted source network or host.
If you want separate public and admin hostnames, add an
Permissions:
This creates an optimised server image under data/ so that subsequent starts are faster.
It is also possible for systemd to run Keycloak as a non-root service account, e.g. add
A quick aside on updates: the script is marked non-updateable and does not currently set up an update function, but in practice upgrading should be straightforward. Stop Keycloak, download the latest release from the upstream Git repository, unpack it over the existing installation, keep your existing configuration and environment files, run the build command again (i.e. kc.sh build --db=postgres) so the new version is optimised for quick startup, then restart the service. Keycloak will perform any required database migrations automatically on startup. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Disclaimer: This is a home lab deployment but for the sake of learning I wish to secure all my applications as if running in a business production setting. I am not very familiar with LXC containers yet.
I am pretty new to using Keycloak and deploying community-scripts such as these. I have read that it is not ideal to run Keycloak under development mode in a production environment for several security-related reasons.
How come that the script that installs Keycloak on an LXC does not account for this and deploys the service to run the executable in development mode? Is this intentional?
What is the intended way within the realm of this script to "upgrade" to production later on? Is there a way to switch to production within the Keycloak admin panel itself that I may have missed at some point? If not, should I edit the service itself to not use "start-dev" once everything is ready to run in production?
I do not intend to expose Keycloak directly as I will be putting it behind a reverse proxy.
Do you people have any advice for me? Am I overlooking something obvious?
Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions