| id | actor-configuration |
|---|---|
| title | Actor configuration |
| description | Customize Actor behavior through the Configuration class or environment variables. |
import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock';
import ConfigExample from '!!raw-loader!roa-loader!./code/10_config.py'; import ApiLink from '@site/src/components/ApiLink';
The Actor class is configured through the Configuration class, which reads its settings from environment variables. When running on the Apify platform or through the Apify CLI, configuration is automatic — manual setup is only needed for custom requirements.
If you need some special configuration, you can adjust it either through the Configuration class directly, or by setting environment variables when running the Actor locally.
To see the full list of configuration options, check the Configuration class or the list of environment variables that the Actor understands.
This will cause the Actor to persist its state every 10 seconds:
{ConfigExample}All the configuration options can be set via environment variables. The environment variables are prefixed with APIFY_, and the configuration options are in uppercase, with underscores as separators. See the Configuration API reference for the full list of configuration options.
This Actor run will not persist its local storages to the filesystem:
APIFY_PERSIST_STORAGE=0 apify runFor the full list of configuration options, see the Configuration API reference.