These are some guides for various use.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
5.3 KiB

7 months ago
7 months ago
  1. # Radicale
  2. ## Setup Server
  3. ### Docker
  4. The official container and documentation was made by [tomsquest](https://hub.docker.com/r/tomsquest/docker-radicale).
  5. The `latest` tag at the moment of writing this readme was corrupted.
  6. The last usable tag was used therefore to guarantee best performance for all users.
  7. #### Volumes
  8. Set the following volumes with the -v tag.
  9. | Volume-Name | Container mount | Description |
  10. | ---------------- | --------------- | --------------------------- |
  11. | radicale\_data | /data | storage for caldav |
  12. | radicale\_config | /config | storage for radicale config |
  13. #### Ports
  14. Set the following ports with the -p tag.
  15. | Container Port | Recommended outside port | Protocol | Description |
  16. | -------------- | ------------------------ | -------- | ------------- |
  17. | 5232 | 5232 | TCP | WebUI, caldav |
  18. #### Additional
  19. There are some special variables to set.
  20. | Flag | Usage |
  21. | ----------- | ---------------------------------------------------------------------- |
  22. | --read-only | make radicale read-only, caldav can still be changed and used normally |
  23. #### Rebuild
  24. ```
  25. #/bin/sh
  26. docker stop radicale
  27. docker rm radicale
  28. docker pull tomsquest/docker-radicale:2.1.11.4
  29. docker run --name radicale \
  30. --restart unless-stopped \
  31. --read-only \
  32. -p 5232:5232 \
  33. -v radicale_data:/data \
  34. -v radicale_config:/config \
  35. -d tomsquest/docker-radicale:2.1.11.4
  36. ```
  37. #### Configuration
  38. After installation there are a few crucial steps to take to secure your calendars with a login.
  39. It is important to change the config file which can be found in the docker volume with name `radicale_config` to match the `config`-file.
  40. ```
  41. # -*- mode: conf -*-
  42. # vim:ft=cfg
  43. # Config file for Radicale - A simple calendar server
  44. #
  45. # Place it into /etc/radicale/config (global)
  46. # or ~/.config/radicale/config (user)
  47. #
  48. # The current values are the default ones
  49. [server]
  50. # CalDAV server hostnames separated by a comma
  51. # IPv4 syntax: address:port
  52. # IPv6 syntax: [address]:port
  53. # For example: 0.0.0.0:9999, [::]:9999
  54. #hosts = 127.0.0.1:5232
  55. hosts = 0.0.0.0:5232
  56. # Max parallel connections
  57. #max_connections = 8
  58. # Max size of request body (bytes)
  59. #max_content_length = 100000000
  60. # Socket timeout (seconds)
  61. #timeout = 30
  62. # SSL flag, enable HTTPS protocol
  63. #ssl = False
  64. # SSL certificate path
  65. #certificate = /etc/ssl/radicale.cert.pem
  66. # SSL private key
  67. #key = /etc/ssl/radicale.key.pem
  68. # CA certificate for validating clients. This can be used to secure
  69. # TCP traffic between Radicale and a reverse proxy
  70. #certificate_authority =
  71. # SSL Protocol used. See python's ssl module for available values
  72. #protocol = PROTOCOL_TLSv1_2
  73. # Available ciphers. See python's ssl module for available ciphers
  74. #ciphers =
  75. # Reverse DNS to resolve client address in logs
  76. #dns_lookup = True
  77. [encoding]
  78. # Encoding for responding requests
  79. #request = utf-8
  80. # Encoding for storing local collections
  81. #stock = utf-8
  82. [auth]
  83. # Authentication method
  84. # Value: none | htpasswd | remote_user | http_x_remote_user
  85. type = htpasswd
  86. # Htpasswd filename
  87. htpasswd_filename = /data/users
  88. # Htpasswd encryption method
  89. # Value: plain | sha1 | ssha | crypt | bcrypt | md5
  90. # Only bcrypt can be considered secure.
  91. # bcrypt and md5 require the passlib library to be installed.
  92. htpasswd_encryption = bcrypt
  93. # Incorrect authentication delay (seconds)
  94. #delay = 1
  95. # Message displayed in the client when a password is needed
  96. #realm = Radicale - Password Required
  97. [rights]
  98. # Rights backend
  99. # Value: none | authenticated | owner_only | owner_write | from_file
  100. #type = owner_only
  101. # File for rights management from_file
  102. #file = /etc/radicale/rights
  103. [storage]
  104. # Storage backend
  105. # Value: multifilesystem
  106. #type = multifilesystem
  107. # Folder for storing local collections, created if not present
  108. #filesystem_folder = /var/lib/radicale/collections
  109. filesystem_folder = /data/collections
  110. # Delete sync token that are older (seconds)
  111. #max_sync_token_age = 2592000
  112. # Command that is run after changes to storage
  113. # Example: ([ -d .git ] || git init) && git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s)
  114. #hook =
  115. [web]
  116. # Web interface backend
  117. # Value: none | internal | radicale_infcloud
  118. # (See also https://github.com/Unrud/RadicaleInfCloud)
  119. type = internal
  120. [logging]
  121. # Threshold for the logger
  122. # Value: debug | info | warning | error | critical
  123. #level = warning
  124. # Don't include passwords in logs
  125. #mask_passwords = True
  126. [headers]
  127. # Additional HTTP headers
  128. #Access-Control-Allow-Origin = *
  129. ```
  130. Following this you need to make sure there is a password file in the docker volume `radicale_data` called `users`.
  131. The password will be encrypted using `bcrypt`.
  132. Steps to create a file with a user and password:
  133. - You will have to install the package which includes `htpasswd`; for debian based distributions this is `apt install apache2-utils`
  134. - `cd /var/lib/docker/volumes/radicale\_data/\_data` - go to the volume
  135. - `touch ./users` - create a file called users
  136. - `htpasswd -B ./users username` - add user with name and password to the file (change `username` to your desired username)
  137. Now you can go to the exposed port and login with your chosen username and password.
  138. If you only added one user you shouldn't be able to login with any other data than your username and password.