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.

136 lines
3.9 KiB

7 months ago
7 months ago
7 months ago
  1. # Owncloud
  2. ## Setup Server
  3. ### Docker
  4. The official container and documentation was made by [owncloud](https://hub.docker.com/_/owncloud).
  5. This docker-rebuild is made up by a `docker-compose.yml` file.
  6. The services in this files are explained seperately.
  7. #### Owncloud
  8. ##### Volumes
  9. Set the following volumes in the `volumes:` section of the docker-compose file.
  10. | Volume-Name | Container mount | Description |
  11. | ---------------- | ---------------------- | ---------------------------- |
  12. | owncloud | /var/www/html | storage for owncloud plugins |
  13. | config | /var/www/html/config | storage for owncloud config |
  14. ##### Ports
  15. Set the following ports in the `ports:` section.
  16. | Container Port | Recommended outside port | Protocol | Description |
  17. | -------------- | ------------------------ | -------- | ----------- |
  18. | 80 | 80 | TCP | WebUI |
  19. #### Maria DB
  20. ##### Environment-variables
  21. Set the following environment-variables in the `environment:` section of the docker-compose file.
  22. | Name | Usage | Default |
  23. | ------------------- | ---------------------------- | ------- |
  24. | MYSQL\_ROOT\_PASSWORD | set the mysql admin password | |
  25. ##### Volumes
  26. Set the following volumes in the `volumes:` section of the docker-compose file.
  27. | Volume-Name | Container mount | Description |
  28. | ---------------- | ---------------------- | ---------------------------- |
  29. | mariadb | /var/lib/mysql | storage for owncloud data |
  30. #### Rebuild
  31. ```
  32. #!/bin/sh
  33. docker-compose down
  34. docker pull owncloud
  35. docker pull mariadb
  36. docker-compose up -d
  37. ```
  38. #### Docker-Compose.yml
  39. ```
  40. version: '3.1'
  41. services:
  42. owncloud:
  43. image: owncloud
  44. restart: unless-stopped
  45. ports:
  46. - 80:80
  47. volumes:
  48. - owncloud:/var/www/html
  49. - config:/var/www/html/config
  50. mariadb:
  51. image: mariadb
  52. restart: unless-stopped
  53. environment:
  54. MYSQL_ROOT_PASSWORD: pass
  55. volumes:
  56. - mariadb:/var/lib/mysql
  57. volumes:
  58. owncloud:
  59. driver: local
  60. mariadb:
  61. driver: local
  62. config:
  63. driver: local
  64. ```
  65. ## Setup Client
  66. ### Docker
  67. The original container and documentation are made by [tiynger](https://hub.docker.com/r/tiynger/owncloudclient)
  68. #### Environment-variables
  69. Set the following variables with the -e tag.
  70. | Name | Usage | Default |
  71. | ----------- | --------------------------------------------------- | --------- |
  72. | USER | username of OwnCloud server | admin |
  73. | PASSWORD | password of OwnCloud server | admin |
  74. | URL | url of OwnCloud server (dont forget the http(s)://) | localhost |
  75. #### Volumes
  76. Set the following volumes with the -v tag.
  77. | Volume-Name | Container mount | Description |
  78. | ----------- | --------------- | ----------------------------------- |
  79. | data | /data | directory for the owncloud contents |
  80. #### Rebuild
  81. ```
  82. #!/bin/sh
  83. docker stop owncloudcli
  84. docker rm owncloudcli
  85. docker pull tiynger/owncloudclient
  86. docker run --name owncloudcli \
  87. --restart unless-stopped \
  88. -v owncloudcli:/data \
  89. -e USER='user' \
  90. -e PASSWORD='password' \
  91. -e URL='https://subdomain.domain.tld' \
  92. -d tiynger/owncloudclient
  93. ```
  94. ## Error handling
  95. ### Problems with a locked file
  96. It is possible that you can't remove or move a locked file.
  97. If this problem doesn't resolve after a restart you can try to disable locking in the owncloud config.
  98. This is done by adding the line `'filelocking.enabled' => false,` into the file `config/config.php`.
  99. Then try to resolve the error.
  100. Afterwards enable locking again by removing the added line.
  101. The reason I choose this process over editing the database file, is ease of use.
  102. The editing of the database is much more time consuming especially if run with docker.