selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

api200 logo

Self-host api200

v0.3.0

Open-source API gateway for third-party integrations

BetaSource AvailableOther
Updatedlast year
LanguageTypescript
Setup difficultyAdvanced
Stars
257
Ports
3000 (Frontend UI), 8080 (Backend API handler)
Requires
GoTrue (Auth), Kong, PostgreSQL, PostgREST, Redis, Supavisor (Connection Pooler)
Docker
api200/backend
Install with Docker Compose
API 200 features overview showing the dashboard with API integrations, monitoring, and configuration panels

What is api200?

API 200 is an open-source API gateway that helps developers manage third-party API integrations efficiently. It handles authentication, caches responses, retries failed requests automatically, and can return mock data for testing. The platform also transforms responses, provides fallbacks when upstream services fail, and lets you add custom headers. It watches for schema changes in connected APIs, detects incidents automatically, includes an in-browser Swagger viewer, imports endpoints from OpenAPI or Postman, shows monitoring charts, and logs all traffic. An MCP server exposes your configured endpoints to LLM clients. Self-hosting runs a Next.js frontend on port 3000 and a Koa backend on port 8080, backed by Redis and a full Supabase stack (PostgreSQL, Kong, GoTrue auth, PostgREST, and a connection pooler) via Docker Compose. The code uses a custom Sustainable Use License allowing free non-commercial and internal business use but not commercial redistribution.

Should you self-host api200?

api200 scores 38/100 on selfhost.directory (how scoring works) and ranks #32 of 39 in API Gateway. It has 257 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is Other-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 314 stars). It scores higher overall, so compare the two before you pick. See api200 vs Kong Gateway side by side.

Features

  • Authentication management
  • Automatic Retries
  • Comprehensive logging
  • Custom Headers
  • Endpoint Monitoring
  • Fallback Responses
  • In-browser Swagger integration
  • Incident Detection
  • MCP (Model Context Protocol) Support
  • Mock Responses
  • OAuth 2.0 supportListed as a feature in progress on the roadmap
  • OpenAPI/Postman import
  • Response caching
  • Response Transformation
  • Schema Watching

api200 README

How to install api200

Install api200 with Docker Compose

Docker, Docker Compose, Node.js, npm
Environment variables
NODE_ENV, PORT, IS_SELFHOSTED, SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, ENCRYPTION_KEY, POSTGRES_PASSWORD, POOLER_TENANT_ID, REDIS_URL, NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, NEXT_PUBLIC_BACKEND_URL, NEXT_PUBLIC_IS_SELFHOSTED, and many Supabase-related variables (JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY, DASHBOARD_USERNAME, DASHBOARD_PASSWORD, etc.)

Clone the repository and install dependencies

git clone https://github.com/API-200/api200-selfhosted cd api200-selfhosted npm i

Run setup script

For localhost (admin privileges recommended):

sudo node setup.js

OR for non-localhost:

node setup.js

Start services

docker-compose up -d

Localhost setup requires host file modification (127.0.0.1 kong), needing admin privileges. The setup.js script generates all required environment files.

How to configure api200

  • ADDITIONAL_REDIRECT_URLSAdditional OAuth redirect URLs

    Additional OAuth redirect URLs

  • ANON_KEYgenerated JWT with 1-year expirySupabase anonymous key JWT

    Supabase anonymous key JWT

  • API_EXTERNAL_URLhttp://localhost:8000 or http://<hostname>:8000External API URL for Kong

    External API URL for Kong

  • BASE_API_URLhttps://eu.api200.co/apiBase API URL for MCP server (defaults to cloud)

    Base API URL for MCP server (defaults to cloud)

  • DASHBOARD_PASSWORDgenerated 16-char stringSupabase dashboard password

    Supabase dashboard password

  • DASHBOARD_USERNAMEsupabaseSupabase dashboard username

    Supabase dashboard username

  • DEBUGEnable debug logging for MCP server

    Enable debug logging for MCP server

    values: true/false

  • DISABLE_SIGNUPfalseDisable user signup

    Disable user signup

    values: true/false

  • DOCKER_SOCKET_LOCATION/var/run/docker.sockDocker socket path

    Docker socket path

  • ENABLE_ANONYMOUS_USERSfalseEnable anonymous users

    Enable anonymous users

    values: true/false

  • ENABLE_EMAIL_AUTOCONFIRMtrueAuto-confirm email signups

    Auto-confirm email signups

    values: true/false

  • ENABLE_EMAIL_SIGNUPtrueEnable email/password signup

    Enable email/password signup

    values: true/false

  • ENABLE_PHONE_AUTOCONFIRMtrueAuto-confirm phone signups

    Auto-confirm phone signups

    values: true/false

  • ENABLE_PHONE_SIGNUPtrueEnable phone signup

    Enable phone signup

    values: true/false

  • ENCRYPTION_KEYgenerated 32-byte hexEncryption key for sensitive data

    Encryption key for sensitive data

  • FUNCTIONS_VERIFY_JWTfalseVerify JWT for edge functions

    Verify JWT for edge functions

    values: true/false

  • GOOGLE_PROJECT_IDGOOGLE_PROJECT_IDGoogle Cloud project ID

    Google Cloud project ID

  • GOOGLE_PROJECT_NUMBERGOOGLE_PROJECT_NUMBERGoogle Cloud project number

    Google Cloud project number

  • IMGPROXY_ENABLE_WEBP_DETECTIONtrueEnable WebP detection for imgproxy

    Enable WebP detection for imgproxy

    values: true/false

  • IS_SELFHOSTEDtrueFlag indicating self-hosted deployment

    Flag indicating self-hosted deployment

  • JWT_EXPIRY3600JWT token expiry in seconds

    JWT token expiry in seconds

  • JWT_SECRETgenerated 40-char stringJWT signing secret

    JWT signing secret

  • KONG_HTTP_PORT8000Kong HTTP port mapping

    Kong HTTP port mapping

  • KONG_HTTPS_PORT8443Kong HTTPS port mapping

    Kong HTTPS port mapping

  • LOGFLARE_API_KEYgenerated 64-char stringLogflare API key

    Logflare API key

  • LOGFLARE_LOGGER_BACKEND_API_KEYgenerated 64-char stringLogflare logger backend API key

    Logflare logger backend API key

  • NEXT_PUBLIC_BACKEND_URLhttp://<hostname>:8080Backend API URL for frontend

    Backend API URL for frontend

  • NEXT_PUBLIC_IS_SELFHOSTEDtrueFlag indicating self-hosted mode for frontend

    Flag indicating self-hosted mode for frontend

  • NEXT_PUBLIC_SUPABASE_ANON_KEYgenerated JWTPublic Supabase anonymous key

    Public Supabase anonymous key

  • NEXT_PUBLIC_SUPABASE_URLhttp://kong:8000 (localhost) or http://<hostname>:8000Public Supabase URL for frontend

    Public Supabase URL for frontend

  • NODE_ENVproductionNode.js environment mode

    Node.js environment mode

  • OPENAI_API_KEYOpenAI API key for AI features

    OpenAI API key for AI features

  • PGRST_DB_SCHEMASpublic,storage,graphql_publicPostgREST exposed schemas

    PostgREST exposed schemas

  • POOLER_DEFAULT_POOL_SIZE20Default pool size for Supavisor

    Default pool size for Supavisor

  • POOLER_MAX_CLIENT_CONN100Max client connections for Supavisor

    Max client connections for Supavisor

  • POOLER_PROXY_PORT_TRANSACTION6543Supavisor transaction pooler port

    Supavisor transaction pooler port

  • POOLER_TENANT_IDgenerated 16-char stringSupavisor pooler tenant identifier

    Supavisor pooler tenant identifier

  • PORT8080Backend server port

    Backend server port

  • POSTGRES_DBpostgresPostgreSQL database name

    PostgreSQL database name

  • POSTGRES_HOSTdbPostgreSQL host

    PostgreSQL host

  • POSTGRES_PASSWORDgenerated 16-char stringPostgreSQL database password

    PostgreSQL database password

  • POSTGRES_PORT5432PostgreSQL port

    PostgreSQL port

  • REDIS_URLredis://redis:6379Redis connection URL

    Redis connection URL

  • SECRET_KEY_BASEgenerated 64-char stringSecret key base for Elixir/Erlang services

    Secret key base for Elixir/Erlang services

  • SERVICE_ROLE_KEYgenerated JWT with 1-year expirySupabase service role key JWT

    Supabase service role key JWT

  • SITE_URLhttp://localhost:3000 or http://<hostname>:3000Site URL for auth redirects

    Site URL for auth redirects

  • SMTP_HOSTsupabase-mailSMTP server host

    SMTP server host

  • SMTP_PASSfake_mail_passwordSMTP password

    SMTP password

  • SMTP_PORT2500SMTP server port

    SMTP server port

  • SMTP_SENDER_NAMEfake_senderSMTP sender name

    SMTP sender name

  • SMTP_USERfake_mail_userSMTP username

    SMTP username

  • STUDIO_DEFAULT_ORGANIZATIONDefault OrganizationDefault organization name

    Default organization name

  • STUDIO_DEFAULT_PROJECTDefault ProjectDefault project name

    Default project name

  • STUDIO_PORT3000Studio port

    Studio port

  • SUPABASE_PUBLIC_URLhttp://localhost:8000 or http://<hostname>:8000Public Supabase URL

    Public Supabase URL

  • SUPABASE_SERVICE_ROLE_KEYgenerated JWTSupabase service role key for admin access

    Supabase service role key for admin access

  • SUPABASE_URLhttp://kong:8000 (localhost) or http://<hostname>:8000Supabase API URL

    Supabase API URL

  • USER_KEYAPI200 API key for MCP server

    API200 API key for MCP server

  • VAULT_ENC_KEYgenerated 32-char stringVault encryption key

    Vault encryption key

api200 releases & version history

More in API Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…