]> Untitled Git - lemmy.git/blob - config/defaults.hjson
allow specifying db uri in config file (#2956)
[lemmy.git] / config / defaults.hjson
1 {
2   # settings related to the postgresql database
3   database: {
4
5       # Configure the database by specifying a URI
6       # 
7       # This is the preferred method to specify database connection details since
8       # it is the most flexible.
9       # Connection URI pointing to a postgres instance
10       # 
11       # This example uses peer authentication to obviate the need for creating,
12       # configuring, and managing passwords.
13       # 
14       # For an explanation of how to use connection URIs, see [here][0] in
15       # PostgreSQL's documentation.
16       # 
17       # [0]: https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
18       uri: "postgresql:///lemmy?user=lemmy&host=/var/run/postgresql"
19       // or
20       # Configure the database by specifying parts of a URI
21       # 
22       # Note that specifying the `uri` field should be preferred since it provides
23       # greater control over how the connection is made. This merely exists for
24       # backwards-compatibility.
25       {
26         # Username to connect to postgres
27         user: "string"
28         # Password to connect to postgres
29         password: "string"
30         # Host where postgres is running
31         host: "string"
32         # Port where postgres can be accessed
33         port: 123
34         # Name of the postgres database for lemmy
35         database: "string"
36       }
37     # Maximum number of active sql connections
38     pool_size: 5
39   }
40   # Settings related to activitypub federation
41   # Pictrs image server configuration.
42   pictrs: {
43     # Address where pictrs is available (for image hosting)
44     url: "http://localhost:8080/"
45     # Set a custom pictrs API key. ( Required for deleting images )
46     api_key: "string"
47   }
48   # Email sending configuration. All options except login/password are mandatory
49   email: {
50     # Hostname and port of the smtp server
51     smtp_server: "localhost:25"
52     # Login name for smtp server
53     smtp_login: "string"
54     # Password to login to the smtp server
55     smtp_password: "string"
56     # Address to send emails from, eg "noreply@your-instance.com"
57     smtp_from_address: "noreply@example.com"
58     # Whether or not smtp connections should use tls. Can be none, tls, or starttls
59     tls_type: "none"
60   }
61   # Parameters for automatic configuration of new instance (only used at first start)
62   setup: {
63     # Username for the admin user
64     admin_username: "admin"
65     # Password for the admin user. It must be at least 10 characters.
66     admin_password: "tf6HHDS4RolWfFhk4Rq9"
67     # Name of the site (can be changed later)
68     site_name: "My Lemmy Instance"
69     # Email for the admin user (optional, can be omitted and set later through the website)
70     admin_email: "user@example.com"
71   }
72   # the domain name of your instance (mandatory)
73   hostname: "unset"
74   # Address where lemmy should listen for incoming requests
75   bind: "0.0.0.0"
76   # Port where lemmy should listen for incoming requests
77   port: 8536
78   # Whether the site is available over TLS. Needs to be true for federation to work.
79   tls_enabled: true
80 }