Configuration

You can configure eventyay using config files or environment variables. You can combine those two options, and their precedence is in this order:

  1. Environment variables

  2. Configuration files

    • The config file in the environment variable EVENTYAY_CONFIG_FILE if present, or

    • The following three configuration files in this order:

      • The config file eventyay.cfg in the src directory, next to the eventyay.example.cfg file.

      • The config file ~/.Eventyay.cfg in the home of the executing user.

      • The config file /etc/eventyay/eventyay.cfg

  3. Sensible defaults

This page explains the options grouped by configuration file sections. You’ll find the environment variable next to their corresponding settings. A config file looks like this:

[eventyay]
instance_name=eventyay
#url=https://app.eventyay.com/tickets
url=https://next.eventyay.com
currency=USD
; DO NOT change the following value, it has to be set to the location of the
; directory *inside* the docker container
trust_x_forwarded_for=on
trust_x_forwarded_proto=on
registration=on
talk_hostname=https://next.eventyay.com
video_server_hostname=https://next.eventyay.com:8443

[urls]
static=/static/
media=/media/

[locale]
default=en
# The following doesn't really work:
#timezone=America/Denver
# because (??) the machines run on UTC time and with this setting
# celery communication has a time difference, giving:
#    eventyay-tickets  | [2024-06-08 22:21:15,313: WARNING/MainProcess] Substantial drift from celery@5f47a4113906 may mean clocks are out of sync.  Current drift is 21600 seconds.  [orig: 2024-06-08 22:21:15.313012 recv: 2024-06-09 04:21:15.310646]
# which is 6h difference which seems to be the diff between Denver and UTC
timezone=UTC

[mail]
from = info@eventyay.com
host = mail.your-server.de
port = 587
user = info@eventyay.com
password = CHANGEME
tls = True
ssl = False

# redis stream:
[redis]
location=redis://eventyay-next-redis/0
; Remove the following line if you are unsure about your redis' security
; to reduce impact if redis gets compromised.
sessions=true

[celery]
backend=redis://eventyay-next-redis/1
broker=redis://eventyay-next-redis/2

[django]
secret=CHANGEME

The configuration format is the INI file format as understood by Python. It’s worth mentioning that you can use any of yes/no, on/off, true/false and 1/0 to set boolean settings. You can add add comments by starting a line with ; or #. Also strings don’t need to be quoted as every value is already a string.

The filesystem section

data

  • The data option describes the path that is the base for all other directories. eventyay will also save its log files there. Unless you have a compelling reason to keep other files apart, setting the data option is the easiest way to configure file storage.

  • Environment variable: EVENTYAY_DATA_DIR

  • Default: A directory called data next to eventyay’s manage.py.

media

  • The media option sets the media directory that contains user generated files. It needs to be writable by the eventyay process.

  • Environment variable: EVENTYAY_FILESYSTEM_MEDIA

  • Default: A directory called media in the data directory (see above).

logs

  • The logs option sets the log directory that contains logged data. It needs to be writable by the eventyay process.

  • Environment variable: EVENTYAY_FILESYSTEM_LOGS

  • Default: A directory called logs in the data directory (see above).

static

  • The statics option sets the directory that contains static files. It needs to be writable by the eventyay process. eventyay will put files there during the rebuild and collectstatic commands.

  • Environment variable: EVENTYAY_FILESYSTEM_STATIC

  • Default: A directory called static.dist next to eventyay’s manage.py.

The site section

debug

  • Decides if eventyay runs in debug mode. Please use this mode for development and debugging, not for live usage. eventyay behaves differently when debug is on, so you should run all your production commands, like e.g. rebuild with debug turned off.

  • Environment variable: EVENTYAY_DEBUG

  • Default: True if you’re executing runserver, False otherwise. Never run a production server in debug mode.

url

  • eventyay uses this value when it has to render full URLs, for example in emails or feeds. It is also used to determined the allowed incoming hosts.

  • Environment variable: EVENTYAY_SITE_URL

  • Default: http://localhost

secret

  • Every Django application has a secret that Django uses for cryptographic signing. You do not need to set this variable – eventyay will generate a secret key and save it in a local file if you do not set it.

  • Default: None

media

  • The URL under which the media files (all files uploaded by users or generated by eventyay) should be. If you change this value, remember to change your web server configuration, too!

  • Environment variable: EVENTYAY_SITE_MEDIA

  • Default: /media/

static

  • The URL under which the static files should be. This includes all JavaScript and CSS files that are packaged with eventyay. If you change this value, remember to change your web server configuration, too!

  • Environment variable: EVENTYAY_SITE_STATIC

  • Default: /static/

csp, csp_script, csp_style, csp_img, csp_form

  • Use any of these settings to update the matching CSP security headers. Your configuration values will be added to the default headers, they won’t replace them completely! If you need to include special values like self, remember to use single tick quotation marks: csp=https://example.com,'self'

  • Environment variables: EVENTYAY_SITE_CSP, EVENTYAY_SITE_CSP_SCRIPT etc.

  • Default: ''

The database section

backend

  • eventyay supports most SQL databases. You’ll need to install the appropriate Python library for each of them, as described in the table below.

  • Environment variable: EVENTYAY_DB_TYPE

  • Default: sqlite3

Database

Configuration string

pip package

PostgresQL

postgresql

eventyay[postgres]

SQLite

sqlite3

eventyay

name

  • The database’s name.

  • Environment variable: EVENTYAY_DB_NAME

  • Default: ''

user

  • The database user, if applicable.

  • Environment variable: EVENTYAY_DB_USER

  • Default: ''

password

  • The database password, if applicable.

  • Environment variable: EVENTYAY_DB_PASS

  • Default: ''

host

  • The database host, or the socket location, as needed. For local PostgreSQL authentication, you can leave this variable empty.

  • Environment variable: EVENTYAY_DB_HOST

  • Default: ''

port

  • The database port, if applicable.

  • Environment variable: EVENTYAY_DB_PORT

  • Default: ''

The mail section

This section serves to configure the email server eventyay will use to send emails by default. Events can override these settings in the web interface. However, even with event-specific settings, eventyay will use these global settings for non-event-specific emails like password resets (even when triggered from an event context) and team invitations.

from

  • The fall-back sender address, e.g. for when eventyay sends event independent emails.

  • Environment variable: EVENTYAY_MAIL_FROM

  • Default: admin@localhost

host

  • The email server host address.

  • Environment variable: EVENTYAY_MAIL_HOST

  • Default: localhost

port

  • The email server port.

  • Environment variable: EVENTYAY_MAIL_PORT

  • Default: 25

user

  • The user account for mail server authentication, if needed.

  • Environment variable: EVENTYAY_MAIL_USER

  • Default: ''

password

  • The password for mail server authentication, if needed.

  • Environment variable: EVENTYAY_MAIL_PASSWORD

  • Default: ''

tls

  • Should eventyay use TLS when sending mail? Please choose either TLS or SSL.

  • Environment variable: EVENTYAY_MAIL_TLS

  • Default: False

ssl

  • Should eventyay use SSL when sending mail? Please choose either TLS or SSL.

  • Environment variable: EVENTYAY_MAIL_SSL

  • Default: False

The celery section

Celery is not a requirement for eventyay. Celery runs as a separate process, and allows you to execute long-running tasks away from the usual request-response cycle.

Warning

If this config section is present, eventyay will assume that Celery workers exist and collect talks. If you include this section without providing Celery workers, no asynchronous tasks (like email sending) will be processed. If you do not use Celery, omit this section in your configuration.

backend

  • The celery backend. If you use a standard redis-based setup, redis://127.0.0.1/1 would be a sensible value.

  • Environment variable: EVENTYAY_CELERY_BACKEND

  • Default: ''

broker

  • The celery broker. If you use a standard redis-based setup, redis://127.0.0.1/2 would be a sensible value.

  • Environment variable: EVENTYAY_CELERY_BROKER

  • Default: ''

The redis section

If you configure a redis server, eventyay can use it for locking, caching and session storage to speed up operations. You will need to install django_redis.

location

  • The location of redis, if you want to use it as a cache. redis://[:password]@127.0.0.1:6379/1 would be a sensible value, or unix://[:password]@/path/to/socket.sock?db=0 if you prefer to use sockets.

  • Environment variable: EVENTYAY_REDIS

  • Default: ''

session

  • If you want to use redis as your session storage, set this to True.

  • Environment variable: EVENTYAY_REDIS_SESSIONS

  • Default: False

The logging section

email

  • The email address (or addresses, comma separated) to send system logs to.

  • Environment variable: EVENTYAY_LOGGING_EMAIL

  • Default: ''

email_level

  • The log level to start sending emails at. Any of [DEBUG, INFO, WARNING, ERROR, CRITICAL].

  • Environment variable: EVENTYAY_LOGGING_EMAIL_LEVEL

  • Default: ERROR

The locale section

language_code

  • The system’s default locale.

  • Environment variable: PRETALX_LANGUAGE_CODE

  • Default: en

time_zone

  • The system’s default time zone as a pytz name.

  • Environment variable: PRETALX_TIME_ZONE

  • Default: UTC

The files section

upload_limit

  • The maximum file size for uploads in MB.

  • Environment variable: PRETALX_FILE_UPLOAD_LIMIT

  • Default: 10