Skip to content

Deployment

This guide covers different installation methods for USSO.


The easiest way to run USSO is using Docker Compose.

Prerequisites

  • Docker 20.10+ and Docker Compose V2

Steps

  1. Clone the repository
git clone https://github.com/ussoio/usso.git
cd usso
  1. Configure environment
cp sample.env .env

Edit .env file:

# Required
PROJECT_NAME=usso
DOMAIN=localhost
MONGO_URI=mongodb://mongo:27017/usso
REDIS_URI=redis://redis:6379/0
SYSTEM_PASSWORD=your-secure-password

# Optional: Email
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=[email protected]
SMTP_PASSWORD=your-app-password
SMTP_SENDER=[email protected]
  1. Start services
docker compose up -d
  1. Verify installation
# Check services are running
docker compose ps

# View logs
docker compose logs -f app
  1. Access the API

  2. API: http://localhost:8000/api/sso/v1

  3. Docs: http://localhost:8000/api/sso/v1/docs

Manual Installation

For development or if you prefer not to use Docker:

Prerequisites

  • Python 3.10 or higher
  • MongoDB 4.4+
  • Redis 6.0+
  • pip and virtualenv

Steps

  1. Clone repository
git clone https://github.com/ussoio/usso.git
cd usso/app
  1. Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Configure environment
cp ../sample.env ../.env
# Edit ../.env with your settings
  1. Start MongoDB and Redis

Using system services or Docker:

# MongoDB
docker run -d -p 27017:27017 --name mongo mongo:latest

# Redis
docker run -d -p 6379:6379 --name redis redis:latest
  1. Run USSO
python main.py

Production Deployment

For production, see our Production Setup Guide.


Troubleshooting

Port Already in Use

If port 8000 is busy:

# Change port in docker-compose.yml
services:
  app:
    ports:
      - "8080:8000"

MongoDB Connection Failed

Check MongoDB is running:

docker compose logs mongo

Permission Denied

On Linux, you may need to run with sudo or add your user to docker group:

sudo usermod -aG docker $USER
newgrp docker