@@ -3,25 +3,21 @@ title: Environment variables
33description : How to configure Hollo using environment variables.
44---
55
6- import { Aside , Badge } from ' @astrojs/starlight/components' ;
6+ import { Aside , Badge } from " @astrojs/starlight/components" ;
77
8- Hollo is configured using environment variables. You can set them in an * .env *
8+ Hollo is configured using environment variables. You can set them in an _ .env _
99file in the root directory of the project, or you can set them using Docker's
1010` -e ` /` --env ` option or Railway's environment variables.
1111
12-
13- Basic settings
14- --------------
12+ ## Basic settings
1513
1614### ` PORT ` <Badge text = " Optional" /> <Badge text = " Unused in Railway" variant = " tip" />
1715
18- The port number to listen on. 3000 by default.
19-
20- ### ` HOST ` <Badge text = " Optional" /> <Badge text = " Unused in Railway" variant = " tip" />
16+ The port number to listen on. 3000 by default.
2117
22- The host address to listen on. Must be a valid IP address or ` localhost ` .
18+ ### ` BIND ` < Badge text = " Optional " /> < Badge text = " Unused in Railway " variant = " tip " />
2319
24- ` localhost ` by default .
20+ The address to listen on. Must be a valid IP address or ` localhost ` .
2521
2622### ` DATABASE_URL ` <Badge text = " Unused in Railway" variant = " tip" />
2723
@@ -30,30 +26,30 @@ The URL of the PostgreSQL database, e.g.,
3026
3127### ` SECRET_KEY ` <Badge text = " Unused in Railway" variant = " tip" />
3228
33- The secret key for securing the session. You can generate a random secret key
29+ The secret key for securing the session. You can generate a random secret key
3430using the following command:
3531
36- ~~~~ sh frame="none"
32+ ``` sh frame="none"
3733openssl rand -hex 32
38- ~~~~
34+ ```
3935
4036### ` TZ ` <Badge text = " Optional" />
4137
42- The time zone of the application. It has to be a valid time zone identifier,
38+ The time zone of the application. It has to be a valid time zone identifier,
4339e.g., ` UTC ` , ` America/New_York ` , ` Asia/Tokyo ` .
4440
4541` UTC ` by default.
4642
4743### ` BEHIND_PROXY ` <Badge text = " Optional" /> <Badge text = " Unused in Railway" variant = " tip" />
4844
49- Set this to ` true ` if Hollo is behind a reverse proxy. If you place the Hollo
45+ Set this to ` true ` if Hollo is behind a reverse proxy. If you place the Hollo
5046behind an L7 load balancer (you usually should do this), turn this on.
5147
5248Turned off by default.
5349
5450<Aside >
5551 With this option, Hollo will trust the ` X-Forwarded-For ` , ` X-Forwarded-Proto ` ,
56- and ` X-Forwarded-Host ` headers from the reverse proxy. This is important for
52+ and ` X-Forwarded-Host ` headers from the reverse proxy. This is important for
5753 security reasons.
5854</Aside >
5955
@@ -66,17 +62,15 @@ Turn on to test in local network.
6662Turned off by default.
6763
6864<Aside >
69- Turning on this option is dangerous security-wise. Only use this option in
70- a trusted environment and never in production.
65+ Turning on this option is dangerous security-wise. Only use this option in a
66+ trusted environment and never in production.
7167</Aside >
7268
69+ ## Additional features
7370
74- Additional features
75- -------------------
71+ ### ` HOME_URL ` <Badge text = " Optional" />
7672
77- ### ` HOME_URL ` <Badge text = " Optional" />
78-
79- If present, the home page will redirect to this URL. If not set, the home page
73+ If present, the home page will redirect to this URL. If not set, the home page
8074will show the list of accounts on the instance.
8175
8276### ` REMOTE_ACTOR_FETCH_POSTS ` <Badge text = " Optional" />
@@ -90,7 +84,7 @@ encountered first time.
9084
9185Setting this to ` true ` lets your timelines work like inboxes: all posts visible
9286to your timeline are physically stored in the database, rather than being
93- filtered in real-time as they are displayed. This is useful for relatively
87+ filtered in real-time as they are displayed. This is useful for relatively
9488larger instances with many incoming posts.
9589
9690As of Hollo 0.4.0, it is experimental and may have several bugs, but it is
@@ -101,19 +95,17 @@ Turned off by default.
10195### ` ALLOW_HTML ` <Badge text = " Optional" />
10296
10397Setting this to ` true ` allows raw HTML inside Markdown, which is used for
104- formatting posts, bio, etc. This is useful for allowing users to use broader
98+ formatting posts, bio, etc. This is useful for allowing users to use broader
10599formatting options outside of Markdown, but to avoid XSS attacks, it is still
106100limited to a subset of HTML tags and attributes.
107101
108102Turned off by default.
109103
110-
111- Logging and debugging
112- ---------------------
104+ ## Logging and debugging
113105
114106### ` LOG_LEVEL ` <Badge text = " Optional" />
115107
116- The log level for the application. ` debug ` , ` info ` , ` warning ` , ` error ` , and
108+ The log level for the application. ` debug ` , ` info ` , ` warning ` , ` error ` , and
117109` fatal ` are available.
118110
119111` info ` by default.
@@ -126,16 +118,14 @@ Turned off by default.
126118
127119### ` LOG_FILE ` <Badge text = " Optional" />
128120
129- The path to the log file. Unlike console output, the log file is written in
121+ The path to the log file. Unlike console output, the log file is written in
130122JSON Lines format which is suitable for structured logging.
131123
132124### ` SENTRY_DSN ` <Badge text = " Optional" />
133125
134126The DSN of the Sentry project to send error reports and traces to.
135127
136-
137- Asset storage
138- -------------
128+ ## Asset storage
139129
140130### ` DRIVE_DISK `
141131
@@ -154,9 +144,10 @@ See the [FlyDrive docs] for details about the drivers.
154144 production, existing files are not moved; only new files are stored according
155145 to the new settings.
156146
157- Also, keep in mind that existing files will still be served according to the
158- old settings, so if you change ` S3_BUCKET ` , for example, they will still be
159- served from the old bucket and should not be deleted.
147+ Also, keep in mind that existing files will still be served according to the
148+ old settings, so if you change ` S3_BUCKET ` , for example, they will still be
149+ served from the old bucket and should not be deleted.
150+
160151</Aside >
161152
162153[ FlyDrive docs ] : https://flydrive.dev/docs/drive_manager
@@ -169,39 +160,38 @@ The path in the local filesystem where blob assets are stored, e.g.,
169160` /var/lib/hollo ` .
170161
171162<Aside >
172- - Directory must exist and be writable by the Hollo process.
173- - Recommended permissions: 755 for directories, 644 for files.
174- - Ensure sufficient storage capacity for your use case.
175- - Regular backups are strongly recommended.
176- - When using Docker, ensure the path is properly mounted.
163+ - Directory must exist and be writable by the Hollo process. - Recommended
164+ permissions: 755 for directories, 644 for files. - Ensure sufficient storage
165+ capacity for your use case. - Regular backups are strongly recommended. - When
166+ using Docker, ensure the path is properly mounted.
177167</Aside >
178168
179169### S3-compatible object storage settings
180170
181171<Aside >
182172 These settings are only required when ` DRIVE_DISK=s3 ` .
183173
184- Ensure your AWS IAM policy grants the following permissions:
174+ Ensure your AWS IAM policy grants the following permissions:
185175
186- - ` s3:PutObject `
187- - ` s3:GetObject `
188- - ` s3:DeleteObject `
189- - ` s3:ListBucket `
190- </Aside >
176+ - ` s3:PutObject `
177+ - ` s3:GetObject `
178+ - ` s3:DeleteObject `
179+ - ` s3:ListBucket `
180+ </Aside >
191181
192182#### ` ASSET_URL_BASE ` <Badge text = " Required with S3 driver" variant = " caution" />
193183
194184The public URL base of the asset storage, e.g.,
195185` https://hollo.s3.us-east-1.amazonaws.com ` .
196186
197187<Aside type = " caution" >
198- - HTTPS is required in production environments.
199- - Must be publicly accessible for federation to work correctly.
188+ - HTTPS is required in production environments. - Must be publicly accessible
189+ for federation to work correctly.
200190</Aside >
201191
202192#### ` S3_REGION ` <Badge text = " Required with S3 driver" variant = " caution" />
203193
204- The region of the S3-compatible object storage, e.g., ` us-east-1 ` . On some
194+ The region of the S3-compatible object storage, e.g., ` us-east-1 ` . On some
205195non-S3 services, this can be omitted.
206196
207197#### ` S3_BUCKET ` <Badge text = " Required with S3 driver" variant = " caution" />
@@ -215,8 +205,8 @@ The endpoint URL for S3-compatible object storage, e.g.,
215205
216206#### ` S3_FORCE_PATH_STYLE ` <Badge text = " Optional" />
217207
218- Whether to force path-style URLs for S3-compatible object storage. ` true ` to
219- turn on, ` false ` to turn off. Useful for non-AWS S3-compatible services.
208+ Whether to force path-style URLs for S3-compatible object storage. ` true ` to
209+ turn on, ` false ` to turn off. Useful for non-AWS S3-compatible services.
220210Turned off by default.
221211
222212#### ` AWS_ACCESS_KEY_ID ` <Badge text = " Required with S3 driver" variant = " caution" />
0 commit comments