Militant

Militant API Installation

Militant API Installation

The Militant API can be installed in several ways depending on your needs.

Option 1: API in /api/ folder (default)

The API is in the /api/ folder of your Militant instance with its own configuration.

Default configuration:

Customize connection: If you want to connect the API to another database, create /api/.env:

API_DB_HOST=other-server.com
API_DB_NAME=militant
API_DB_USER=api_user
API_DB_PASS=password

Test:

curl https://your-instance.com/api/v1/

Option 2: Separate API with Docker

Run the API on a separate server with Docker.

Quick installation:

cd api/
cp .env.example .env
nano .env  # Configure
docker-compose up -d

Option 3: API on CasaOS

Installation via CasaOS App Store.

Installation: 1. Open App Center 2. Custom Install 3. Paste docker-compose.casaos.yml

Next steps

After installation: 1. Test the API 2. Explore endpoints 3. Read FAQ


Retour au Wiki