Skip to main content

Gateway Setup

How to install and run the LibreApps Gateway.

Overview

The LibreApps Gateway is typically run as a set of Docker containers.

Prerequisites

  • Docker & Docker Compose: Required for containerized deployment.
  • 16GB+ RAM: Recommended for running the full platform.
  • OpenAI/Anthropic API Keys: Required for AI features.

Installation Steps

1. Clone the Repository

git clone https://github.com/libre-apps/gateway.git
cd gateway

2. Configure Environment

Copy the example environment file and fill in your secrets.

cp .env.example .env
# Edit .env with your API keys and passwords

3. Generate Secrets

Run the provided script to generate secure random keys for the platform.

./scripts/generate-secrets.sh

4. Start the Platform

docker compose up -d

5. Initialize Routes

Initialize the APISIX routing configuration.

bash scripts/init-routes.sh

Verifying the Setup

You can verify that the Gateway is running by accessing the health check endpoint:

curl http://localhost:19080/health

You can also access the APISIX Dashboard at http://localhost:19000 (default login: admin/admin).

Best Practices

  • Do this: Use the generate-secrets.sh script to ensure all services have unique, secure keys.
  • Do this: Monitor the logs of the gateway_apisix container for any routing issues.
  • Don't do this: Expose the APISIX Admin API (port 9180) to the public internet.

Best Practices

  • Do this: Use Docker Compose for local development to ensure all dependencies are correctly linked.
  • Do this: Configure health checks for the Gateway to allow for automated recovery.
  • Don't do this: Run the Gateway with default security settings in a production environment.