|
| 1 | +Configuration |
| 2 | +============= |
| 3 | + |
| 4 | +CTFd provides a number of configuration options which are used to configure server behavior. CTFd makes a distinction between configuration values which can be configured only with server-level access and values which can be configured by those with administrative priveleges on CTFd. |
| 5 | + |
| 6 | +Server Level Configuration |
| 7 | +-------------------------- |
| 8 | +Server level configuration can be modified from the ``config.py`` file in CTFd. |
| 9 | + |
| 10 | +SECRET_KEY |
| 11 | +~~~~~~~~~~ |
| 12 | +The secret value used to creation sessions and sign strings. This should be set to a random string. In the |
| 13 | +interest of ease, CTFd will automatically create a secret key file for you. If you wish to add this secret key |
| 14 | +to your instance you should hard code this value to a random static value. |
| 15 | + |
| 16 | +You can also remove .ctfd_secret_key from the .gitignore file and commit this file into whatever repository |
| 17 | +you are using. |
| 18 | + |
| 19 | +http://flask.pocoo.org/docs/latest/quickstart/#sessions |
| 20 | + |
| 21 | + |
| 22 | +DATABASE_URL |
| 23 | +~~~~~~~~~~~~ |
| 24 | +The URI that specifies the username, password, hostname, port, and database of the server |
| 25 | +used to hold the CTFd database. |
| 26 | + |
| 27 | +e.g. ``mysql+pymysql://root:<YOUR_PASSWORD_HERE>@localhost/ctfd`` |
| 28 | + |
| 29 | +REDIS_URL |
| 30 | +~~~~~~~~~ |
| 31 | +The URI to connect to a Redis server. |
| 32 | + |
| 33 | +e.g. ``redis://user:password@localhost:6379`` |
| 34 | + |
| 35 | +http://pythonhosted.org/Flask-Caching/#configuring-flask-caching |
| 36 | + |
| 37 | + |
| 38 | +MAILFROM_ADDR |
| 39 | +~~~~~~~~~~~~~ |
| 40 | +The email address that emails are sent from if not overridden in the configuration panel. |
| 41 | + |
| 42 | +MAIL_SERVER |
| 43 | +~~~~~~~~~~~ |
| 44 | +The mail server that emails are sent from if not overriden in the configuration panel. |
| 45 | + |
| 46 | +MAIL_PORT |
| 47 | +~~~~~~~~~ |
| 48 | +The mail port that emails are sent from if not overriden in the configuration panel. |
| 49 | + |
| 50 | +MAIL_USEAUTH |
| 51 | +~~~~~~~~~~~~ |
| 52 | +Whether or not to use username and password to authenticate to the SMTP server |
| 53 | + |
| 54 | +MAIL_USERNAME |
| 55 | +~~~~~~~~~~~~~ |
| 56 | +The username used to authenticate to the SMTP server if MAIL_USEAUTH is defined |
| 57 | + |
| 58 | +MAIL_PASSWORD |
| 59 | +~~~~~~~~~~~~~ |
| 60 | +The password used to authenticate to the SMTP server if MAIL_USEAUTH is defined |
| 61 | + |
| 62 | +MAIL_TLS |
| 63 | +~~~~~~~~ |
| 64 | +Whether to connect to the SMTP server over TLS |
| 65 | + |
| 66 | +MAIL_SSL |
| 67 | +~~~~~~~~ |
| 68 | +Whether to connect to the SMTP server over SSL |
| 69 | + |
| 70 | +MAILGUN_API_KEY |
| 71 | +~~~~~~~~~~~~~~~ |
| 72 | +Mailgun API key to send email over Mailgun |
| 73 | + |
| 74 | +MAILGUN_BASE_URL |
| 75 | +~~~~~~~~~~~~~~~~ |
| 76 | +Mailgun base url to send email over Mailgun |
| 77 | + |
| 78 | +LOG_FOLDER |
| 79 | +~~~~~~~~~~ |
| 80 | +The location where logs are written. These are the logs for CTFd key submissions, registrations, and logins. |
| 81 | +The default location is the CTFd/logs folder. |
| 82 | + |
| 83 | +UPLOAD_PROVIDER |
| 84 | +~~~~~~~~~~~~~~~ |
| 85 | +Specifies the service that CTFd should use to store files. |
| 86 | + |
| 87 | +UPLOAD_FOLDER |
| 88 | +~~~~~~~~~~~~~ |
| 89 | +The location where files are uploaded. The default destination is the CTFd/uploads folder. |
| 90 | + |
| 91 | +AWS_ACCESS_KEY_ID |
| 92 | +~~~~~~~~~~~~~~~~~ |
| 93 | +AWS access token used to authenticate to the S3 bucket. |
| 94 | + |
| 95 | +AWS_SECRET_ACCESS_KEY |
| 96 | +~~~~~~~~~~~~~~~~~~~~~ |
| 97 | +AWS secret token used to authenticate to the S3 bucket. |
| 98 | + |
| 99 | +AWS_S3_BUCKET |
| 100 | +~~~~~~~~~~~~~ |
| 101 | +The unique identifier for your S3 bucket. |
| 102 | + |
| 103 | +AWS_S3_ENDPOINT_URL |
| 104 | +~~~~~~~~~~~~~~~~~~~ |
| 105 | +A URL pointing to a custom S3 implementation. |
| 106 | + |
| 107 | + |
| 108 | +REVERSE_PROXY |
| 109 | +~~~~~~~~~~~~~ |
| 110 | +Specifies whether CTFd is behind a reverse proxy or not. Set to ``True`` if using a reverse proxy like nginx. |
| 111 | + |
| 112 | +See `Flask documentation <https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#werkzeug.middleware.proxy_fix.ProxyFix.>`_ for full details. |
| 113 | + |
| 114 | +.. Tip:: |
| 115 | + You can also specify a comma seperated set of numbers specifying the reverse proxy configuration settings. For example to configure `x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1` specify `1,1,1,1,1`. By setting the value to ``True``, CTFd will default to the above behavior with all proxy settings set to 1. |
| 116 | + |
| 117 | +TEMPLATES_AUTO_RELOAD |
| 118 | +~~~~~~~~~~~~~~~~~~~~~ |
| 119 | +Specifies whether Flask should check for modifications to templates and reload them automatically. |
| 120 | + |
| 121 | +SQLALCHEMY_TRACK_MODIFICATIONS |
| 122 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 123 | +Automatically disabled to suppress warnings and save memory. You should only enable this if you need it. |
| 124 | + |
| 125 | +SWAGGER_UI |
| 126 | +~~~~~~~~~~ |
| 127 | +Enable the Swagger UI endpoint at ``/api/v1/`` |
| 128 | + |
| 129 | +UPDATE_CHECK |
| 130 | +~~~~~~~~~~~~ |
| 131 | +Specifies whether or not CTFd will check whether or not there is a new version of CTFd |
| 132 | + |
| 133 | +APPLICATION_ROOT |
| 134 | +~~~~~~~~~~~~~~~~ |
| 135 | +Specifies what path CTFd is mounted under. It can be used to run CTFd in a subdirectory. |
| 136 | +Example: /ctfd |
| 137 | + |
| 138 | +OAUTH_CLIENT_ID |
| 139 | +~~~~~~~~~~~~~~~ |
| 140 | + |
| 141 | + |
| 142 | +OAUTH_CLIENT_SECRET |
| 143 | +~~~~~~~~~~~~~~~~~~~ |
| 144 | + |
| 145 | + |
| 146 | +Application Level Configuration |
| 147 | +------------------------------- |
0 commit comments