✨ Announcing our seed funding led by Lux Capital! Read more about it on our blog

Search documentation...




[ Learn ]

[ Concepts ]

[ Reference ]


Reflex apps can be configured using a configuration file, environment variables, and command line arguments.

Configuration File

Running reflex init will create an rxconfig.py file in your root directory. You can pass keyword arguments to the Config class to configure your app.
For example:
# rxconfig.py
import reflex as rx

config = rx.Config(
    # Connect to your own database.
    # Change the frontend port.

See the config reference for all the parameters available.

Environment Variables

You can override the configuration file by setting environment variables. For example, to override the frontend_port setting, you can set the FRONTEND_PORT environment variable.
$ FRONTEND_PORT=3001 reflex run

Command Line Arguments

Finally, you can override the configuration file and environment variables by passing command line arguments to reflex run.
$ reflex run --frontend-port 3001
See the CLI reference for all the arguments available.
← Project StructureIntro →

Copyright © 2023 Pynecone, Inc.