Skip to main content

Environment variables

DEBUG#

Default: undefined

Required: no

Type: string

Description:

Enable debug logs. We use the debug Npm package with scope meli*. To enable logs, use DEBUG=meli*.

MELI_PORT#

Default: 3001

Required: yes

Type: number

Description:

The port on which Meli is listening.

MELI_URL#

Default: undefined

Required: yes

Type: string

Description:

Public URL where Meli is served.

MELI_URL_INTERNAL#

Default: MELI_URL

Required: no

Type: string

Description:

Setting this variable only makes sense when Caddy is deployed as a standalone container. It sets the URL where the Meli API can be accessed internally. In local development, you would set this to http://host.docker.internal:3001. In a production docker-compose.yml, you would set it to something like http://api if your API container is named api.

MELI_UI_URL#

Default: MELI_URL

Required: no

Type: string

Description:

Public URL where the UI is served. Setting this variable makes sense when you are deploying the UI elsewhere than on MELI_URL.

MELI_UI_URL_INTERNAL#

Default: MELI_URL

Required: no

Type: string

Description:

Setting this variable only makes sense when Caddy is deployed as a standalone container. It sets the URL where the Meli UI can be accessed internally. In local development, you would set this to http://host.docker.internal:3000. In a production docker-compose.yml, you would set it to something like http://ui if your UI container is named ui.

MELI_SITES_URL#

Default: MELI_URL

Required: no

Type: string

Description:

This is where your sites are served. Setting this variables allows you to serve your sites with a different domain than that used to access Meli.

MELI_STANDALONE#

Default: false

Required: no

Type: boolean

Description:

When enabled, Meli will not configure the UI and API in Caddy. This variables only makes sense when you are deploying all containers separately.

MELI_UI_DIR#

Default: undefined

Required: no

Type: string

Description:

When set, the UI will be served from this path. Otherwise, it is reverse-proxied to MELI_UI_URL_INTERNAL.

MELI_JWT_SECRET#

Default: undefined

Required: yes

Type: string

Description:

Secret used to sign and verify JWT tokens. Can be generated with openssl rand -hex 32.

MELI_JWT_TOKEN_EXPIRATION#

Default: 2592000000 (30 days)

Required: yes

Type: number

Description:

Expiration time (in ms) for JWT tokens.

MELI_GITLAB_URL#

Default: https://gitlab.com

Required: yes

Type: string

Description:

Your Gitlab URL.

MELI_GITLAB_CLIENT_ID#

Default: undefined

Required: yes

Type: string

Description:

Your Gitlab app Client ID.

MELI_GITLAB_CLIENT_SECRET#

Default: undefined

Required: yes

Type: string

Description:

Your Gitlab app Client Secret.

MELI_GITEA_URL#

Default: https://gitea.com

Required: yes

Type: string

Description:

Your Gitea URL.

MELI_GITLAB_GROUPS#

Default: undefined

Required: no

Type: array

Description:

Comma-separated list of Gitlab groups. Allows you to restrict login to only members of the given groups.

MELI_GITEA_CLIENT_ID#

Default: undefined

Required: yes

Type: string

Description:

Your Gitea app Client ID.

MELI_GITEA_CLIENT_SECRET#

Default: undefined

Required: yes

Type: string

Description:

Your Gitea app Client Secret.

MELI_GITEA_ORGS#

Default: undefined

Required: no

Type: array

Description:

Comma-separated list of Gitea organizations. Allows you to restrict login to only members of the given organizations.

MELI_GITHUB_URL#

Default: https://github.com

Required: yes

Type: string

Description:

Your Github URL.

MELI_GITHUB_CLIENT_ID#

Default: undefined

Required: yes

Type: string

Description:

Your Github app Client ID.

MELI_GITHUB_CLIENT_SECRET#

Default: undefined

Required: yes

Type: string

Description:

Your Github app Client Secret.

MELI_GITHUB_ORGS#

Default: undefined

Required: no

Type: array

Description:

Comma-separated list of Github organizations. Allows you to restrict login to only members of the given organizations.

MELI_GOOGLE_CLIENT_ID#

Default: undefined

Required: no

Type: string

Description:

Your Google app Client ID.

MELI_GOOGLE_CLIENT_SECRET#

Default: undefined

Required: no

Type: string

Description:

Your Google app Client Secret.

MELI_MONGO_URI#

Default: undefined

Required: yes

Type: string

Description:

URI of Mongo instance where Meli should store its data.

MELI_MIGRATE_ROLLBACK#

Default: false

Required: yes

Type: boolean

Description:

Forces the server to rollback the last migration, then exit. Use this when you're trying to downgrade.

MELI_COOKIE_SAMESITE#

Default: null

Required: yes

Type: string

Description:

Allows you to set the SameSite property for cookies defined by the server. Useful when your Meli server has a different host or URL than your UI.

MELI_COOKIE_SECURE#

Default: false

Required: yes

Type: boolean

Description:

Allows you to set the Secure property for cookies defined by the server. Some browsers, like Chrome, require it to be true to use cookies for cross site requests (which implies you need a secure backend).

MELI_RATE_LIMIT_WINDOW#

Default: 60000

Required: yes

Type: number

Description:

Window size for rate limiting, in ms.

MELI_RATE_LIMIT_MAX_PER_WINDOW#

Default: 100

Required: yes

Type: number

Description:

Max number of requests allows in the rate limiting window.

MELI_PROMETHEUS_HOST#

Default: localhost

Required: no

Type: string

Description:

Host where the Prometheus server should listen.

MELI_PROMETHEUS_PORT#

Default: 3002

Required: yes

Type: number

Description:

Port where the Prometheus server should listen.

MELI_PROMETHEUS_REFRESH_RATE#

Default: 10000

Required: yes

Type: number

Description:

How often to refresh Prometheus metrics.

MELI_PROMETHEUS_METRICS_PREFIX#

Default: meliserver

Required: yes

Type: string

Description:

Prefix used for Prometheus metrics.

MELI_REDIS_URL#

Default: undefined

Required: no

Type: string

Description:

Redis URL for proxying websockets connections. This allows you to run multiple instance of the Meli API in parallel.

MELI_HOOK_TIMEOUT#

Default: 5000

Required: yes

Type: number

Description:

How much time hook requets should wait before failing.

MELI_MAIL_HOST#

Default: undefined

Required: no

Type: string

Description:

Mail host.

MELI_MAIL_PORT#

Default: undefined

Required: no

Type: number

Description:

Mail port.

MELI_MAIL_USERNAME#

Default: undefined

Required: no

Type: string

Description:

Mail username.

MELI_MAIL_PASSWORD#

Default: undefined

Required: no

Type: string

Description:

Mail password.

MELI_MAIL_FROM#

Default: undefined

Required: no

Type: string

Description:

Mail form. Some mail providers (like OVH) force this email to equal the mail username.

MELI_MAIL_SUBJECT_PREFIX#

Default: Meli |

Required: no

Type: string

Description:

Mail subject prefix.

MELI_MAIL_TEMPLATE_DIR#

Default: ./emails/templates

Required: no

Type: string

Description:

Directory where mail templates can be found.

MELI_SENTRY_ENABLED#

Default: true

Required: yes

Type: boolean

Description:

Whether to enabled Sentry.

MELI_RESTRICTED_IPS#

Default: none

Required: no

Type: array

Description:

Hook URLs are resolved and checked against these restriected IPs.

info

Partially implemented, not yet working.

MELI_RESTRICTED_DOMAINS#

Default: none

Required: no

Type: array

Description:

info

Partially implemented, not yet working.

MELI_CADDY_DIR#

Default: /sites

Required: no

Type: string

Description:

Directory where Caddy looks for sites.

MELI_SITES_DIR#

Default: /sites

Required: no

Type: string

Description:

Directory where Meli stores sites.

MELI_CADDY_ADMIN_API_URL#

Default: http://localhost:2019

Required: yes

Type: string

Description:

Admin API of Caddy. If Caddy runs in a standalone container, make sure to expose the admin API as it listens to localhost by default.

MELI_TMP_DIRECTORY#

Default: /var/folders/ff/v59bv_992tz5yq0sg7gptp300000gn/T

Required: no

Type: string

Description:

Where uploaded files are stored before being processed.

MELI_STATIC_DIR#

Default: ./public

Required: no

Type: string

Description:

Where the Meli API serves static content. This is used to server generic pages such as a 404.html page.

MELI_INVITE_EXPIRATION_TIME#

Default: 86400000

Required: no

Type: number

Description:

Amount of time (in ms) before an invitation expires.

MELI_ACME_SERVER#

Default: undefined

Required: no

Type: string

Description:

The ACME server to use for obtaining SSL certificates. When this variable is not set, we use LetsEncrypt production environment. We recommend setting this variable to the LetsEncrypt staging environment when testing Meli. See here.

MELI_ACME_CA_PATH#

Default: undefined

Required: no

Type: string

Description:

Allows you to tell Meli to generate self-signed certificates. This is the path to the CA certificate to use.

MELI_AXIOS_TIMEOUT#

Default: 10000

Required: no

Type: number

Description:

Timeout for HTTP calls made with Axios.

MELI_USER#

Default: undefined

Required: no

Type: string

Description:

Username for in-memory authentication.

MELI_PASSWORD#

Default: undefined

Required: no

Type: string

Description:

Password for in-memory authentication.

MELI_MAX_ORGS#

Default: 1

Required: no

Type: number

Description:

Maximum number of organizations that can be created on this Meli instance. Setting this value to 0 will disable the limit.

MELI_MULTER_LIMITS#

Default: {}

Required: no

Type: JSON object

Description:

A stringified JSON object with Multer limits. For example:

MELI_MULTER_LIMITS={"fileSize":150000000}

MELI_HTTPS_AUTO#

Default: true

Required: no

Type: boolean

Description:

Controls whether Meli should handle SSL on its own. Disable this when deploying Meli behind a reverse proxy.

MELI_GOOGLE_RECAPTCHA_SITE_KEY#

Default: undefined

Required: no

Type: string

Description:

Google Recaptcha V3 site key. This key can be obtained after creating a new app here.

MELI_GOOGLE_RECAPTCHA_SECRET_KEY#

Default: undefined

Required: no

Type: string

Description:

Google Recaptcha V3 secret key. This key can be obtained after creating a new app here.

MELI_POSTHOG_ENABLED#

Default: true

Required: no

Type: boolean

Description:

Whether PostHog should be enabled.