This repository contains the necessary configuration to deploy Keycloak using Docker Compose, with Postgres as the database and Nginx as the reverse proxy.
- Docker and Docker Compose installed on your machine.
- A domain name (e.g.,
auth.yourdomain.com) with DNS configured to point to your server's IP address. - Certbot installed for obtaining SSL certificates.
keycloak-deployment/ ├── docker-compose.yml ├── nginx/ │ ├── nginx.conf ├── README.md
git clone https://github.com/mitexleo/keycloak-deployment.git cd keycloak-deployment
Copy the provided Nginx configuration to the appropriate directory on your server.
sudo cp nginx/sites-available/auth.yourdomain.com /etc/nginx/sites-available/ sudo ln -s /etc/nginx/sites-available/auth.yourdomain.com /etc/nginx/sites-enabled/
Use Certbot to obtain SSL certificates for your domain.
sudo certbot --nginx -d auth.yourdomain.com
Run the following command to start the Keycloak and Postgres containers.
docker-compose up -d
Open a web browser and navigate to https://auth.yourdomain.com. You should see the Keycloak welcome page.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
- Keycloak
- Postgres
- Nginx
- Certbot