Skip to content

Quick Start

Get ApiMeld running in under 5 minutes with Docker.

Prerequisites

1. Run the container

bash
docker run -d \
  --name apimeld \
  -p 8080:8080 \
  -e SETUP_DB_HOST=your-postgres-host \
  -e SETUP_DB_PORT=5432 \
  -e SETUP_DB_NAME=apimeld \
  -e SETUP_DB_USERNAME=postgres \
  -e SETUP_DB_PASSWORD=your-password \
  -e SETUP_ADMIN_EMAIL=admin@example.com \
  -e SETUP_ADMIN_PASSWORD=YourSecurePassword1 \
  -e App__BaseUrl=http://localhost:8080 \
  -v apimeld_config:/app/config \
  gitea.apimeld.com/meld/apimeld-scheduler:latest

Open http://localhost:8080 — the app will configure itself on first boot and redirect you to the login page.

Persistent config

Always mount the /app/config volume. This is where ApiMeld writes its generated configuration (connection strings, encryption keys). Without it, config is lost on container restart.

2. Log in

Use the SETUP_ADMIN_EMAIL and SETUP_ADMIN_PASSWORD you provided above.

On first login you'll be prompted to configure email/SMTP. This step is optional — you can skip it and configure email later from Admin → Settings.

3. Create your first task

  1. Click New Task in the sidebar
  2. Give it a name and choose a language (PowerShell, JavaScript, etc.)
  3. Write a script in the editor — for example:
powershell
Write-Output "Hello from ApiMeld!"
$date = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Write-Output "Current time: $date"
  1. Click Run Now to test it — output streams live in the panel below the editor
  2. Set a schedule using the cron picker if you want it to run automatically
  3. Click Save

Running PostgreSQL with Docker

If you don't already have a PostgreSQL instance, you can run one with Docker. Use a named volume — without it the database is lost when the container is removed.

Standalone (docker run):

bash
docker run -d \
  --name apimeld-postgres \
  -e POSTGRES_DB=apimeld \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=yourpassword \
  -v apimeld_pg_data:/var/lib/postgresql/data \
  -p 5432:5432 \
  postgres:16-alpine

Then set SETUP_DB_HOST to host.docker.internal (Docker Desktop on Mac/Windows) or your host's IP when running ApiMeld with docker run.

Pin your PostgreSQL version

Always use a specific major version tag (postgres:16-alpine, not postgres:latest). PostgreSQL major versions are not data-compatible — latest can silently pull a new major version that cannot read your existing data directory. Stick to one major version until you deliberately plan an upgrade.

Keep your data

The -v apimeld_pg_data:/var/lib/postgresql/data volume is what persists your database across restarts and upgrades. Without it, all data is lost when the container stops. Always use a named volume or a bind mount to a directory you control.

Using Docker Compose

The easiest way to run both ApiMeld and PostgreSQL together — volumes are handled automatically:

yaml
services:
  app:
    image: gitea.apimeld.com/meld/apimeld-scheduler:latest
    ports:
      - "8080:8080"
    environment:
      - SETUP_DB_HOST=db
      - SETUP_DB_PORT=5432
      - SETUP_DB_NAME=apimeld
      - SETUP_DB_USERNAME=postgres
      - SETUP_DB_PASSWORD=yourpassword
      - SETUP_ADMIN_EMAIL=admin@example.com
      - SETUP_ADMIN_PASSWORD=YourSecurePassword1
      - App__BaseUrl=http://localhost:8080
      - PROXY_ENABLED=true   # if running behind nginx/traefik
    volumes:
      - apimeld_config:/app/config
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: apimeld
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: yourpassword
    volumes:
      - pg_data:/var/lib/postgresql/data
    restart: unless-stopped

volumes:
  apimeld_config:   # ApiMeld runtime config — encryption keys, connection strings
  pg_data:          # PostgreSQL data — your tasks, run history, users

Save this as docker-compose.yml and run:

bash
docker compose up -d

Next steps

ApiMeld Task Scheduler