Skip to content

Settings file

The configuration file is a python file named settings.py. This file is loaded every time you start your instance and contains basic information needed to start working.

Generating a config file from a yaml file

Variables

What you need to have in your settings file:

(This are all python variables. Next to the name you find the type)

  • NODENAME (str): The name of your instance
  • SUMMARY (str): A description of your instance
  • SCHEME (str): Whether you use http or https
  • DOMAIN (str): your domain, for example anfora.app
  • BASE_URL (str) : The full url for your instance including scheme. For example https://anfora.social
  • ID (str): ID used in federation. By default the same as BASE_URL
  • MEDIA_FOLDER (str): The full path to the folder where you want to store files uploaded by your users
  • thumb_folder (str): Name of the folder used for thumbnails
  • pic_folder (str): Name of the folder used for max_resolution files
  • icons (str): Folder used to store user's avatars
  • salt_code (str): Salt used to secure user passwords. Keep this safe
  • ROOT_PATH (str) : Folder where the source code of anfora is located
  • DB_USER (str): User of the db
  • DB_PORT (str): Port used to access the db
  • DB_HOST (str): Host of the db
  • DB_NAME (str): db name
  • SECRET (str): Secret used to store user's password Keep this strong and safe
  • DEBUG (bool): Wheter the server is in debug mode or not.
  • SMTP_SERVER (str): SMTP server to send email notfications
  • SMTP_PASSWORD (str): SMTP password to send email notfications
  • SMTP_PORT (int): SMTP port to send email notfications
  • SMTP_LOGIN (str): SMTP login to send email notfications
  • SMTP_FROM_ADDRESS (str): SMTP email used to send email notfications
  • REG_OPEN (bool): Whether registration on the server is open or not