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.

Llana logo

Self-host Llana

v1.32.0

No-code API wrapper for databases

ReleaseOpen SourceBSD-4-Clause
Updatedlast year
LanguageTypescript
Setup difficultyModerate
Stars
207
Port
3000 (HTTP API server)
Requires
Database (MySQL, PostgreSQL, MSSQL, MongoDB, etc.)
Docker
juicyllama/llana
Install with Docker Compose
Llana screenshot 1

What is Llana?

Llana is a lightweight, open-source API wrapper built with NestJS that automatically generates a REST API for your database. Connect MySQL, PostgreSQL, MSSQL, MongoDB, Airtable, and other data sources, then configure access roles and permissions. It includes JWT and API key authentication, role-based access control, in-memory and Redis caching, webhooks, WebSockets for real-time sync, OpenAPI 3.1 documentation, and soft delete support. Deploy via Docker (juicyllama/llana), Docker Compose, or run directly with Node.js. The project is actively developed with version 1.32.0 released.

Should you self-host Llana?

Llana scores 48/100 on selfhost.directory (how scoring works) and ranks #16 of 19 in API Management. It has 207 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 moderate: expect some configuration beyond a single command. An official Docker image is available. It is BSD-4-Clause-licensed and written mostly in Typescript.

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

Features

  • API Key Authentication
  • Host allowlisting
  • In-memory caching
  • Manual relations
  • OpenAPI 3.1 documentation
  • Public tables
  • REST API generation
  • Role-based Access Control
  • Soft delete support
  • Table/request caching
  • Webhooks
  • WebSockets

Llana README

How to install Llana

Install Llana with Docker Compose

Docker Compose
Environment variables
DATABASE_URI, JWT_KEY, JWT_REFRESH_KEY, HOSTS, SOFT_DELETE_COLUMN, etc.

docker compose -f ./docker/docker-compose.dev.yml up --build --detach

Development setup with MySQL, PostgreSQL, MongoDB, MSSQL, Redis containers

How to configure Llana

  • ADMIN_EMAILtest@test.comAdmin email address

    Admin email address

  • AUTH_COOKIES_DOMAINDomain for authentication cookies

    Domain for authentication cookies

  • AUTH_USER_API_KEY_FIELDUserApiKey.apiKeyColumn of user's API key in identity table

    Column of user's API key in identity table

  • AUTH_USER_API_KEY_LOCATIONHEADERLocation of API key in requests

    Location of API key in requests

    values: HEADER, QUERY, BODY

  • AUTH_USER_API_KEY_NAMEx-api-keyKey name for API key header/query/body

    Key name for API key header/query/body

  • AUTH_USER_IDENTITY_COLUMNColumn containing user identity key

    Column containing user identity key

  • AUTH_USER_TABLE_NAMEUserMain identity table containing user identity

    Main identity table containing user identity

  • AUTH_USER_TABLE_PASSWORD_ENCRYPTIONBCRYPTPassword encryption method

    Password encryption method

    values: BCRYPT, SHA1, SHA256, SHA512, MD5, ARGON2

  • AUTH_USER_TABLE_PASSWORD_FIELDpasswordPassword field in user identity table

    Password field in user identity table

  • AUTH_USER_TABLE_PASSWORD_SALT10Salt for password encryption

    Salt for password encryption

  • AUTH_USER_TABLE_USERNAME_FIELDemailUsername field in user identity table

    Username field in user identity table

  • BASE_URL_APIBase URL for the Llana backend API

    Base URL for the Llana backend API

  • BASE_URL_APPBase URL for the frontend application

    Base URL for the frontend application

  • CACHE_IDENTITY_DATA_TTL60000Identity data cache TTL in milliseconds

    Identity data cache TTL in milliseconds

  • CACHE_TABLE_SCHEMA_TTL3600000Table schema cache TTL in milliseconds

    Table schema cache TTL in milliseconds

  • CRON_EXPRESSION_CACHE_CHECKCron expression for cache check frequency

    Cron expression for cache check frequency

  • DATABASE_URIDatabase connection string

    Database connection string

  • DOCS_TITLEAPI DocumentationTitle for API documentation

    Title for API documentation

  • HOSTSComma-separated list of allowed IP addresses

    Comma-separated list of allowed IP addresses

  • JWT_EXPIRES_IN15mJWT access token expiration

    JWT access token expiration

  • JWT_KEYSecret key for signing JWT access tokens

    Secret key for signing JWT access tokens

  • JWT_REFRESH_EXPIRES_IN14dJWT refresh token expiration

    JWT refresh token expiration

  • JWT_REFRESH_KEYSecret key for signing JWT refresh tokens

    Secret key for signing JWT refresh tokens

  • LOG_LEVELSerror,warn,log,debug,verboseLogging levels to enable

    Logging levels to enable

  • PORT3000Port the application listens on

    Port the application listens on

  • REDIS_HOSTRedis server hostname or IP

    Redis server hostname or IP

  • REDIS_PASSRedis password (optional)

    Redis password (optional)

  • REDIS_PORTRedis server port

    Redis server port

  • REDIS_USERRedis username (optional)

    Redis username (optional)

  • ROLE_LOCATION_USER_TABLE_IDENTITY_COLUMNundefinedColumn containing user identity key in roles table

    Column containing user identity key in roles table

  • ROLE_LOCATION_USER_TABLE_NAME$AUTH_USER_TABLE_NAMETable containing user roles

    Table containing user roles

  • ROLE_LOCATION_USER_TABLE_ROLE_FIELDroleColumn containing user role type

    Column containing user role type

  • SKIP_AUTHSkip authentication to make all endpoints public

    Skip authentication to make all endpoints public

    values: true

  • SKIP_DOCSDisable OpenAPI documentation

    Disable OpenAPI documentation

    values: true

  • SOFT_DELETE_COLUMNColumn name for soft delete (e.g., deletedAt)

    Column name for soft delete (e.g., deletedAt)

  • TZTimezone for the application

    Timezone for the application

  • USE_DATA_CACHINGEnable table/request caching (READ, WRITE, or both)

    Enable table/request caching (READ, WRITE, or both)

    values: READ, WRITE

More in API Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…