AYON Docker Configuration Options

Last updated 3 months ago

Overview

AYON Docker supports different configuration options to control how your AYON server runs. These Configuration parameters can be set through environment variables.

Once you modify your docker-compose.yml file or add new environment variables to your .env file, you must rebuild your Docker containers as explained in How to Update Your AYON Server article.

Setting Docker Configuration Options

There are two methods for setting environment variables for your AYON instance:

  • Recommended: Create a .env file in the ayon-docker directory and add your variables there.

    Example
    AYON_STACK_SERVER_TAG=dev AYON_STACK_SERVER_PORT=5001 AYON_AUTH_PASS_MIN_LENGTH=12
  • Alternatively: Add an environment section under server in your docker-compose.yml file.

Available Docker Configurations Options

You can find the full list of available settings in the ayonconfig.py file within the backend repository here. To get the corresponding environment variable, simply uppercase the setting name and add the AYON_ prefix.

AYON Stack Settings

AYON Stack environment variables only work when added to the .env file.

Environment Variable

Default Value

Description

AYON_STACK_SERVER_TAG

latest

This specifies the AYON server version.

  • You can find a list of all released versions here.

  • Special version tags:

    • latest Always points to the most recent AYON version.

    • dev Points to the AYON version currently in active development.

You will need to rebuild your Docker container to sync with any pushed updates, as detailed in the How to Update Your AYON Server article.

AYON_STACK_SERVER_PORT

5000

The AYON server port.

HTTP Server Settings​

Environment Variable

Default Value

Description

AYON_HTTP_LISTEN_ADDRESS

0.0.0.0

The address the API server will listen on.

AYON_HTTP_LISTEN_PORT

5000

The port the API server will listen on.

Directory Paths​

Environment Variable

Default Value

Description

AYON_API_MODULES_DIR

api

Path to the directory containing the API modules.

AYON_ADDONS_DIR

/addons

Absolute path to the directory containing the addons.

AYON_FRONTEND_DIR

/frontend

Path to the directory containing the frontend files.

The frontend must be built; cloning the frontend will not work.

Authentication Settings​

Environment Variable

Default Value

Description

AYON_AUTH_PASS_PEPPER

supersecretpasswordpepper

A secret string used to salt the password hash.

AYON_AUTH_PASS_MIN_LENGTH

8

The minimum required password length.

AYON_AUTH_PASS_COMPLEX

True

Enforces the use of a complex password.

Database and Session Management​

Environment Variable

Default Value

Description

AYON_REDIS_URL

redis://redis/

The connection string for Redis.

AYON_REDIS_CHANNEL

pype:c

The Redis channel name for system messages.

AYON_POSTGRES_URL

postgres://ayon:ayon@postgres/ayon

The connection string for Postgres.

AYON_SESSION_TTL

86400 (24 hours)

The session lifetime in seconds.

Example database environment variables:

AYON_REDIS_URL=redis://user:password123@redis.example.com:6379
AYON_POSTGRES_URL=postgres://user:password123@postgres.example.com:5432/ayon

Security and Logging​

Environment Variable

Default Value

Description

AYON_LOG_LEVEL

Debug

It sets the log level for the server console output.
Supported levels: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL.

AYON_MAX_FAILED_LOGIN_ATTEMPTS

10

The maximum number of failed login attempts before an IP address is banned.

AYON_FAILED_LOGIN_BAN_TIME

600

The time in seconds to ban an IP address after too many failed login attempts.

AYON_MOTD

None

The "Message of the Day" that appears on the login page (e.g., Welcome to Ayon!).

AYON_MOTD_PATH

/storage/motd.md

The path to a file containing the "Message of the Day."

Message of the Day: The name, originating in the 1970s, refers to the message displayed to users on the login page. It's simply a more traditional name for the Login Page Message.

Setup SMTP in AYON Docker

The AYON server can be configured to send emails for things like password recovery.

If you have an active Ynput cloud subscription, emails are sent using Ynput servers, so no configuration is needed.

For self-hosted instances, you'll need a working SMTP server to enable sending emails. You can configure it using these environment variables in the server container:

Environment Variable

Description

Example Value

AYON_EMAIL_FROM

The sender's email address.

noreply@mystudio.com

AYON_EMAIL_SMTP_HOST

The SMTP server hostname.

smtp.mystudio.com

AYON_EMAIL_SMTP_PORT

The SMTP server port.

587

AYON_EMAIL_SMTP_TLS

Enables SSL for the SMTP connection.

true

AYON_EMAIL_SMTP_USER

The SMTP server username.

mailuser

AYON_EMAIL_SMTP_PASS

The SMTP server password.

supersecretpassword

Once the SMTP environment variables are properly set and the server is restarted, a "Reset password" link will appear on the login page. You can use this link to test that emails are being sent correctly. Don't worry, your password won't be reset unless you follow the link in the email to change it.

FAQ

Where can I look for the ayon-docker tags/releases?

You can find a list of all released Docker versions on our Docker Hub under AYON Docker Tags.