Keycloak
Sign in to Keycloak on Cottage, replace the temporary admin, create a realm and users, connect your apps with single sign-on and set up email.
Updated November 24, 2026
On this page
Keycloak is an identity and access management server. It gives your other apps single sign-on with OpenID Connect or SAML, and manages users, groups, roles and two-factor sign-in in one place.
Getting started
- Sign in. Open
/adminon your app's address, for examplehttps://two-words.cottagehost.com/admin. The username isadminand the password is the Admin password in Sign-in details on the app's page in Cottage. - Replace the temporary admin. Keycloak marks this first account as temporary. In the master realm, open Users and choose Create new user. Set a password on the user's Credentials tab and turn Temporary off. Give the user the admin role, sign in as that user, then delete the temporary
adminaccount. Keep the master realm for administrators only. - Create a realm for your apps. Choose Manage realms, then Create realm, enter a Realm name and choose Create. Everything below happens in this realm.
- Add users. Open Users, choose Create new user, fill in the Username and optional details, and choose Create. On the Credentials tab, set a password. With Temporary on, the person must choose a new one at first sign-in.
- Connect an app. Open Clients and choose Create client. Set Client type to OpenID Connect, enter a Client ID, and under Login settings enter the app's Valid redirect URIs, exactly as the app documents them. In the app you're connecting, give its OpenID Connect or SSO settings your realm's address:
https://two-words.cottagehost.com/realms/<your realm>
Many apps find the rest from /.well-known/openid-configuration under that address.
6. Check sign-up and password reset. Self-registration is off by default. Turn it on under Realm settings → Login only if you want people to register themselves. The same page has the Forgot password switch.
7. Set up email. Under Realm settings → Email, enter your mail provider's details: Host, Port, Encryption, and the Username and Password if it needs a sign-in. Use port 587 or 465, since port 25 is blocked on Cottage. Do this for each realm. See Sending email from your apps. Until then, set passwords for people yourself on their Credentials tab.
People manage their own profile and password at /realms/<your realm>/account on your app's address.
Frequently asked questions
Why can't I use the master realm for my apps?
You can, but it's meant for administering Keycloak itself. A separate realm keeps your users, clients and settings apart from the admin accounts.
How do I require two-factor sign-in?
For one person, open them under Users, go to Credentials, choose Credential Reset, and set Reset Actions to Configure OTP. They then set up an authenticator app at their next sign-in. Realm-wide rules live under Authentication, and the Keycloak server administration guide covers them.
Can I sign in with Google, GitHub or an existing directory?
Yes. Keycloak supports social logins and existing LDAP directories, and the server administration guide walks through each one.
Is my data kept safe?
Users, passwords and settings are stored in Keycloak's own database on Cottage. Cottage backs up the whole app every night, keeps 14 days of backups, and lets you download one from Backups on the app's page in Cottage (how).
How do I export my setup?
Open a realm's Realm settings, then choose Action → Partial export. You get a JSON file with its clients, groups and roles. It doesn't include users, so rely on Cottage's backups for those.
Can I use my own domain?
Yes, choose Add a web address under Your web address on the app's page in Cottage (how). Keycloak puts its public address into the sign-in links it creates, so after the address changes, check that your connected apps use the new one and that each client's Valid redirect URIs are still right.
Is Keycloak updated automatically?
Yes. Cottage installs new versions for you, and Updates on the app's page in Cottage shows what changed.
Troubleshooting
Sign-in fails with "Invalid parameter: redirect_uri"
The app's redirect address doesn't match the client's Valid redirect URIs. Open the client in Clients and add the exact address the app uses, then try again.
I can't sign in to the admin console
Use the admin account and the Admin password in Sign-in details on the app's page in Cottage, if you haven't replaced the temporary admin yet. Once you have, use your own account. The first admin is only created on the very first start, so changing the value in Cottage won't reset a password. If you can no longer sign in with any administrator, contact support at support@cottage.host.
Verification or "forgot password" emails don't arrive
- Open Realm settings → Email for the realm the user belongs to. Each realm has its own mail settings.
- Check the Host, Port, Encryption and sign-in details against your provider. Use 587 or 465, not 25.
- Make sure the sender address is one your provider lets you send from.
- Check the Technical log under Advanced on the app's page in Cottage for errors.
Links or redirects point to the wrong address
Keycloak builds its links from the public address Cottage sets for the app. When a custom domain goes live, Cottage switches Keycloak to it and restarts the app. Then point your connected apps at the new address and add it to each client's Valid redirect URIs.
Keycloak is slow or keeps restarting
Keycloak needs more memory than most apps, and the first start takes a little while. Use Change size on the app's page in Cottage to add memory, then use Restart. Check the Technical log under Advanced for out-of-memory errors.
Still stuck?
Email support@cottage.host. A person reads every message. If something seems down, check Cottage's status page.