Skip to main content
SuperTokens Core can be self-hosted on your own infrastructure, giving you complete control over your authentication data and user information.

System Requirements

Hardware Requirements

  • CPU: Minimum 1 core, recommended 2+ cores for production
  • Memory: Minimum 256MB RAM, recommended 512MB+ for production
  • Disk Space: 100MB for the application, additional space for database storage

Software Requirements

  • Java Runtime: OpenJDK 21 (JDK 21.0.7+) - bundled with official distributions
  • Operating Systems:
    • Linux (Ubuntu, Debian, CentOS, RHEL)
    • macOS
    • Windows
  • Database: One of the following:
    • PostgreSQL 11+
    • MySQL 5.7+
    • MongoDB (via plugin)
    • SQLite (for development/testing only)

Installation Methods

The easiest way to run SuperTokens Core is using Docker:
For MySQL:
See the Docker deployment guide for detailed configuration.

Binary Installation

Linux/macOS

  1. Download the latest release:
  1. Configure your database connection in config.yaml
  2. Start the service:

Windows

  1. Download the Windows installer from supertokens.io
  2. Run the installer
  3. Configure config.yaml
  4. Run supertokens.bat start

From Source

For advanced users who want to build from source:
See the GitHub wiki for complete build instructions.

Configuration

Basic Configuration

The main configuration file is config.yaml. Key settings include:

Security Settings

Always set api_keys in production to secure your SuperTokens instance.

Token Configuration

Password Hashing

Supported algorithms:

Running as a Service

Systemd (Linux)

Create /etc/systemd/system/supertokens.service:
Enable and start:

Docker Compose

For production deployments with Docker, use Docker Compose:
See the Docker deployment guide for complete examples.

Environment Variables

All config.yaml parameters can be overridden with environment variables:

Base Path Configuration

To run SuperTokens behind a reverse proxy with a base path:
All API endpoints will be prefixed with /auth.

Telemetry

SuperTokens collects anonymous usage statistics by default:
Learn more about telemetry.

Scaling Considerations

Horizontal Scaling

  • SuperTokens Core is stateless and can be horizontally scaled
  • Run multiple instances behind a load balancer
  • All instances must connect to the same database
  • Session verification happens in the backend SDK (no core contact needed)

Performance Tuning

Health Checks

Verify SuperTokens is running:
Expected response: Hello See Monitoring for comprehensive health check strategies.

Upgrading

Docker

Binary

  1. Stop the service
  2. Backup your database
  3. Download the new version
  4. Replace the binaries
  5. Start the service
Always backup your database before upgrading.

Troubleshooting

Common Issues

Service won’t start
  • Check Java version: java -version (requires Java 21)
  • Verify database connectivity
  • Check logs in error.log
Database connection errors
  • Verify connection URI format
  • Check database credentials
  • Ensure database exists and is accessible
  • Verify firewall rules
Port already in use
  • Change the port in config.yaml
  • Check for other services using port 3567

Logs

Log locations:
  • Docker: docker logs <container-id>
  • Binary: logs/info.log and logs/error.log in installation directory
  • Systemd: journalctl -u supertokens

Next Steps