@@ -26,6 +26,7 @@ Enhanced Docker image for <a href="http://radicale.org">Radicale</a>, the CalDAV
26
26
- [ Option 1: ** Basic** instruction] ( #option-1-basic-instruction )
27
27
- [ Option 2: ** Recommended, Production-grade** instruction (secured, safe...) :rocket : ] ( #option-2-recommended-production-grade-instruction-secured-safe-rocket )
28
28
- [ Custom configuration] ( #custom-configuration )
29
+ - [ Authentication configuration] ( #authentication-configuration )
29
30
- [ Volumes versus Bind-Mounts] ( #volumes-versus-bind-mounts )
30
31
- [ Running with Docker compose] ( #running-with-docker-compose )
31
32
- [ Multi-architecture] ( #multi-architecture )
@@ -117,6 +118,45 @@ Then:
117
118
3 . mount your custom config volume when running the container: ` -v /my_custom_config_directory:/config:ro ` .
118
119
The ` :ro ` at the end make the volume read-only, and is more secured.
119
120
121
+ ## Authentication configuration
122
+
123
+ This section shows a basic example of configuring authentication for Radicale using htpasswd with bcrypt algorithm.
124
+ To learn more, refer to [ the offical Radicale document] ( https://radicale.org/v3.html#auth ) .
125
+
126
+ First, we need to configure Radicale to use htpasswd authentication and specify htpasswd file's location.
127
+ Create a ` config ` file inside ` config ` directory. It will be located at ` ./config/config ` .
128
+
129
+ ```
130
+ [server]
131
+ hosts = 0.0.0.0:5232
132
+
133
+ [auth]
134
+ type = htpasswd
135
+ htpasswd_filename = /config/users
136
+ htpasswd_encryption = bcrypt
137
+
138
+ [storage]
139
+ filesystem_folder = /data/collections
140
+ ```
141
+
142
+ Next, create a ` user ` file inside ` config ` directory. It will be located at ` ./config/users ` ).
143
+ Each line contains the username and bcrypt-hashed password, separated by a colon (` : ` ).
144
+
145
+ ```
146
+ john:$2a$10$l1Se4qIaRlfOnaC1pGt32uNe/Dr61r4JrZQCNnY.kTx2KgJ70GPSm
147
+ sarah:$2a$10$lKEHYHjrZ.QHpWQeB/feWe/0m4ZtckLI.cYkVOITW8/0xoLCp1/Wy
148
+ ```
149
+
150
+ Finally, create and run the container using the appropriate volume mount.
151
+ In this example, both files are stored in the same directory (` ./config ` ).
152
+
153
+ ``` bash
154
+ docker run -d --name radicale tomsquest/docker-radicale \
155
+ -p 5232:5232 \
156
+ -v ./data:/data \
157
+ -v ./config:/config \
158
+ ```
159
+
120
160
## Volumes versus Bind-Mounts
121
161
122
162
This section is related to the error message ` chown: /data: Permission denied ` .
0 commit comments