Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto

Keycloak on a VPS

Keycloak is an open-source identity provider with single sign-on over OpenID Connect and SAML, user federation and two-factor login, run on your VPS.

2 GBMinimum memory
Ubuntu 24.04 LTSBase image
8080/tcp, 8443/tcp, 9000/tcpPorts
Apache-2.0License

About Keycloak

Keycloak is an Apache-2.0 identity and access management server. Applications hand login over to it through OpenID Connect, OAuth 2.0 or SAML 2.0, and it handles users, groups, roles, social login, LDAP or Active Directory federation and two-factor authentication.

An identity provider holds every password and session, so many teams keep it on infrastructure they control. A 2 GB CloudSat VPS covers Keycloak's base footprint of about 1.25 GB, and root access lets you tune the JVM, the database and TLS.

After deploy Keycloak listens on 8080 for HTTP, 8443 for HTTPS and 9000 for health and metrics, with the admin console at /admin.

What you get with Keycloak

  • Single sign-on over OpenID Connect, OAuth 2.0 and SAML 2.0
  • User federation with LDAP and Active Directory
  • Login through external providers such as Google or GitHub
  • Two-factor authentication with OTP apps and WebAuthn
  • Roles, groups and customizable login themes

Keycloak use cases

  • One login across internal tools such as Grafana, GitLab and wikis
  • Customer accounts for a SaaS product with social login
  • Bridging an existing LDAP directory to OIDC apps

After you deploy Keycloak

  1. Once the server is Running, open /admin on port 8080 or 8443 and sign in with the bootstrap admin, created at first start from KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD.
  2. That account is temporary: create a permanent admin in the master realm, then delete it.
  3. Create a separate realm for your applications instead of using master.
  4. Set a hostname and a TLS certificate, since production mode refuses to start without them.

Keycloak ports

Open these in your firewall if you use one: 8080/tcp HTTP, 8443/tcp HTTPS, 9000/tcp health and metrics.

Keycloak FAQ

How much memory does Keycloak need?

Keycloak's sizing guide puts one instance with realm caches and 10,000 sessions at about 1,250 MB, so treat 2 GB as the floor.

Does Keycloak need an external database?

For production, yes. The built-in development database is for testing only; point KC_DB at PostgreSQL, MySQL or MariaDB before real users arrive.

Disclaimer. The Keycloak project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.

Keycloak on your own server.
Ready in under 5 minutes.

Pick a region and a size; the console shows the address as soon as it is up.

Every server delivered in under 5 minutesPay with crypto14-day money-back