Zum Inhalt

Übersetzungshinweis

Leider war es uns noch nicht möglich, diese Seite für Sie auf Deutsch zu übersetzen. Wir zeigen daher stattdessen die englischsprachige Version der Seite und bitten um Verständnis.

Configuration file#

i-ticket reads its configuration from a configuration file. It tries to find this file at the following locations. It will try to read the file from the specified paths in the following order. The file that is found last will override the settings from the files found before.

  1. environment variable
  2. in the current working directory

The file is expected to be in the INI format as specified in the Python documentation.

The config file may contain the following sections (all settings are optional and have default values). We suggest that you start from the examples given in one of the installation tutorials.

Hinweis

The configuration file is the recommended way to configure i-ticket. However, you can also set them through environment variables. In this case, the syntax is . For example, to configure the setting from the section, set in your environment.

i-ticket settings#

Example:

Display name of this installation in the control interface. Upstream default is ; for white-label use e.g. .

The installation's full URL, without a trailing slash.

The default currency as a three-letter code. Defaults to .

The local path to a directory where temporary files will be stored. Defaults to the directory below the .

The local path to a data directory that will be used for storing user uploads and similar data. Defaults to the value of the environment variable or .

The local path to a directory where log files will be stored. Defaults to the directory below the .

A comma-separated list of plugins that are enabled by default for all new events. Defaults to .

A comma-separated list of plugins that are enabled by default for all new organizers. Defaults to none.

A comma-separated list of plugins that are not available even though they are installed. Defaults to an empty string.

Whether to show authors and versions of plugins, defaults to .

A comma-separated list of available auth backends. Defaults to .

Enables or disables the registration of new admin users. Defaults to .

Enables or disables password reset. Defaults to .

Enables or disables the "keep me logged in" button. Defaults to .

By default, pretix periodically downloads currency rates from the European Central Bank as well as other authorities that are used to print tax amounts in the customer currency on invoices for some currencies. Set to to disable this feature. Defaults to .

Enables or disables nagging staff users for leaving comments on their sessions for auditability. Defaults to .

Enables or disables obligatory usage of two-factor authentication for users of the i-ticket backend. Can be to make two-factor authentication obligatory for all users or to make it only obligatory to users with admin permissions. Defaults to .

Specifies whether the header can be trusted. Only set to if you have a reverse proxy that actively removes and re-adds the header to make sure the correct client IP is the first value. Defaults to .

Specifies whether the header can be trusted. Only set to if you have a reverse proxy that actively removes and re-adds the header to make sure the correct value is set. Defaults to .

Specifies whether the header can be trusted. Only set to if you have a reverse proxy that actively removes and re-adds the header to make sure the correct value is set. Defaults to .

Log violations of the Content Security Policy (CSP). Defaults to .

Specifies a CSP header that will be merged with i-ticket's default header. For example, if you set this to , pretix will add as an additional allowed source to all CSP headers. Empty by default.

Set console and file log level (, , , or ). Defaults to .

Specifies the name of a header that should be used for logging request IDs. Off by default.

If this is off, pretix connections to private networks, for instance, IP addresses such as or for all outgoing HTTP connections, such as webhooks and payment gateways. If you are using a local / for outgoing requests, set this to . In that case, the proxy is responsible for filtering valid destinations.

Only set this to if you trust all your admin users, or if you have absolutely no unprotected services on your network. Defaults to .

Locale settings#

Example:

The system's default locale. Default:

The system's default timezone as a name. Default:

Database settings#

Example:

One of and . Default: .

The database's name. Default: .

, , ,

Connection details for the database connection. Empty by default.

On PostgreSQL, i-ticket uses the "advisory lock" feature. However, advisory locks use a server-wide name space and and are not scoped to a specific database. If you run multiple i-ticket applications with the same PostgreSQL server, you should set separate values for this setting (integers up to 256).

On PostgreSQL pretix might use server side cursors for certain operations. This is generally fine but will break in specific circumstances, for example when connecting to PostgreSQL through a PGBouncer configured with a transaction pool mode. Off by default (i.e. by default server side cursors will be used).

,

Connection TLS details for the PostgreSQL database connection. Possible values of are , , , , , and . should be the accessible path of the ca certificate. Both values are empty by default.

,

Connection mTLS details for the PostgreSQL database connection. It's also necessary to specify and parameters, please check the correct values from the TLS part. should be the accessible path of the client certificate. should be the accessible path of the client key. All values are empty by default.

Database replica settings#

If you use a replicated database setup, pretix expects that the default database connection always points to the primary database node. Routing read queries to a replica on database layer is strongly discouraged since this can lead to inaccurate such as more tickets being sold than are actually available.

However, pretix can still make use of a database replica to keep some expensive queries with that can tolerate some latency from your primary database, such as backend search queries. The configuration section can have the same settings as the section (except for the setting) and will default back to the settings for all values that are not given. This way, you just need to specify the settings that are different for the replica.

Example:

URLs#

Example:

The URL to be used to serve user-uploaded content. You should not need to modify this. Default:

The URL to be used to serve static files. You should not need to modify this. Default:

Email#

Example:

,

The SMTP Host to connect to. Defaults to and .

,

The SMTP user data to use for the connection. Empty by default.

,

Use STARTTLS or SSL for the SMTP connection. Off by default.

The email address to set as header in outgoing emails by the system. Default:

The email address to set as header in admin notification emails by the system. Defaults to the value of .

The email address to set as header in outgoing emails by the system sent on behalf of organizers. Defaults to the value of .

If this is on (the default), organizers need to verify email addresses they want to use as senders in their event.

If this is set to a valid SPF string, pretix will show a warning if organizers use a sender address from a domain that does not include this value.

If this is off (the default), custom SMTP servers cannot be private network addresses.

Comma-separated list of email addresses that should receive a report about every error code 500 thrown by pretix.

Django settings#

Example:

The secret to be used by Django for signing and verification purposes. If this setting is not provided, pretix will generate a random secret on the first start and will store it in the filesystem for later usage.

...

Prior versions of the secret to be used by Django for signing and verification purposes that will still be accepted but no longer be used for new signing.

Whether or not to run in debug mode. Default is .

Warning

Never set this to in production!

Use the algorithm for password hashing. Disable on systems with a small number of CPU cores (currently less than 8).

Enable code profiling for a random subset of requests. Disabled by default, see Performance Monitoring for details.

Metrics#

If you want to fetch internally collected prometheus-style metrics you need to configure the credentials for the metrics endpoint and enable it:

Currently, metrics-collection requires a redis server to be available.

Memcached#

You can use an existing memcached server as i-ticket's caching backend:

The location of memcached, either a host:port combination or a socket file.

If no memcached is configured, i-ticket will use redis for caching. If neither is configured, i-ticket will not use any caching.

Hinweis

If you use memcached and you deploy i-ticket across multiple servers, you should use one shared memcached instance, not multiple ones, because cache invalidations would not be propagated otherwise.

Redis#

If a redis server is configured, i-ticket can use it for locking, caching and session storage to speed up various operations:

The location of redis, as a URL of the form or

When this is set to , redis will be used as the session storage.

Configures redis sentinels to use. If you don't want to use redis sentinels, you should omit this option. If this is set, redis via sentinels will be used instead of plain redis. In this case the location should be of the form . The variable should be a json serialized list of sentinels, each being a list with the two elements hostname and port. You cannot provide a password within the location when using sentinels. Note that the configuration format requires you to either place the entire value on one line or make sure all values are indented by at least one space.

If your redis setup doesn't require a password or you already specified it in the location you can omit this option. If this is set it will be passed to redis as the connection option PASSWORD.

If this is set it will be passed to redis as the connection option . Possible values are , , and .

If your redis setup doesn't require TLS you can omit this option. If this is set it will be passed to redis as the connection option . Possible value is the ca path.

If your redis setup doesn't require mTLS you can omit this option. If this is set it will be passed to redis as the connection option . Possible value is the keyfile path.

If your redis setup doesn't require mTLS you can omit this option. If this is set it will be passed to redis as the connection option . Possible value is the certfile path.

If redis is not configured, pretix will store sessions and locks in the database. If memcached is configured, memcached will be used for caching instead of redis.

Translations#

pretix comes with a number of translations. All languages are enabled by default. If you want to limit the languages available in your installation, you can enable a set of languages like this:

Some of the languages them are marked as "incubating", which means they can usually only be selected in development mode. If you want to use them nevertheless, you can activate them like this:

You can also tell pretix about additional paths where it will search for translations:

For a given language (e.g. ), pretix will then look in the specific sub-folder, e.g. .

Celery task queue#

For processing long-running tasks asynchronously, i-ticket requires the celery task queue. For communication between the web server and the task workers in both direction, a messaging queue and a result backend is needed. You can use a redis database for both directions, or an AMQP server (e.g. RabbitMQ) as a broker and redis or your database as a result backend:

RabbitMQ might be the better choice if you have a complex, multi-server, high-performance setup, but as you already should have a redis instance ready for session and lock storage, we recommend redis for convenience. See the Celery documentation for more details.

The two entries can be omitted in most cases. If they are present they need to be a valid JSON dictionary. For possible entries in that dictionary see the Celery documentation.

It is possible the use Redis with TLS/mTLS for the broker or the backend. To do so, it is necessary to specify the TLS identifier , the ssl mode and optionally specify the CA (TLS) , cert and key (mTLS) path as encoded string. the following uri describes the format and possible parameters:

To use redis with sentinels set the broker or backend to and the respective transport_options to . If your redis instances behind the sentinel have a password use . If your redis sentinels themselves have a password set the transport_options to .

Sentry#

i-ticket has native support for sentry, a tool that you can use to track errors in the application. If you want to use sentry, you need to set a DSN in the configuration file:

You will be given this value by your sentry installation.

Sample rate for performance monitoring.

If this token is found in a query string, a trace will always be sampled.

Caching#

You can adjust some caching settings to control how much storage i-ticket uses:

Secret length#

If you are really paranoid, you can increase the length of random strings pretix uses in various places like order codes, secrets in the ticket QR codes, etc. Example:

External tools#

i-ticket can make use of some external tools if they are installed. Currently, they are all optional. Example:

Maximum upload file sizes#

You can configure the maximum file size for uploading various files:

GeoIP#

i-ticket can optionally make use of a GeoIP database for some features. It needs a file in format, for example GeoLite2 or GeoAcumen: