Skip to content

Commit 8371bad

Browse files
committed
doc updates associated with SensorsIot#742 and SensorsIot#743
Signed-off-by: Phill Kelley <[email protected]>
1 parent 02480fb commit 8371bad

File tree

2 files changed

+22
-69
lines changed

2 files changed

+22
-69
lines changed

docs/Containers/NextCloud.md

Lines changed: 22 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ nextcloud:
1010
image: nextcloud
1111
restart: unless-stopped
1212
environment:
13+
- TZ=${TZ:-Etc/UTC}
1314
- MYSQL_HOST=nextcloud_db
14-
- MYSQL_PASSWORD=«user_password»
15+
- MYSQL_PASSWORD=%randomMySqlPassword%
1516
- MYSQL_DATABASE=nextcloud
1617
- MYSQL_USER=nextcloud
1718
ports:
1819
- "9321:80"
20+
- "9343:443"
1921
volumes:
2022
- ./volumes/nextcloud/html:/var/www/html
2123
depends_on:
@@ -29,11 +31,11 @@ nextcloud_db:
2931
build: ./.templates/mariadb/.
3032
restart: unless-stopped
3133
environment:
32-
- TZ=Etc/UTC
34+
- TZ=${TZ:-Etc/UTC}
3335
- PUID=1000
3436
- PGID=1000
35-
- MYSQL_ROOT_PASSWORD=«root_password»
36-
- MYSQL_PASSWORD=«user_password»
37+
- MYSQL_ROOT_PASSWORD=%randomPassword%
38+
- MYSQL_PASSWORD=%randomMySqlPassword%
3739
- MYSQL_DATABASE=nextcloud
3840
- MYSQL_USER=nextcloud
3941
volumes:
@@ -106,86 +108,33 @@ The passwords need to be set before you bring up the Nextcloud service for the f
106108
$ docker logs nextcloud
107109
```
108110

109-
6. If you want to be sure Nextcloud gets set up correctly, it is best to perform the remaining steps from a **different** computer.
111+
6. On a computer that is **not** the device running Nextcloud, launch a browser and point to the device running Nextcloud using your chosen connection method. Examples:
110112

111-
That means you need to decide how that **other** computer will refer to your Raspberry Pi running Nextcloud. Your choices are:
112-
113-
* the IP address of your Raspberry Pi – eg `192.168.203.200`
114-
* your Raspberry Pi's fully-qualified domain name – eg `myrpi.mydomain.com`
115-
* your Raspberry Pi's host name – eg `myrpi`
116-
117-
Key points:
118-
119-
* You **can't** use a multicast domain name (eg `myrpi.local`). An mDNS name will not work until Nextcloud has been initialised!
120-
* Once you have picked a connection method, **STICK TO IT**.
121-
* You are only stuck with this restriction until Nextcloud has been initialised. You **can** (and should) fix it later by completing the steps in ["Access through untrusted domain"](#untrustedDomain).
122-
123-
7. On a computer that is **not** the Raspberry Pi running Nextcloud, launch a browser and point to the Raspberry Pi running Nextcloud using your chosen connection method. Examples:
124-
125-
- If you are using an IP address:
126-
127-
```
128-
http://192.168.203.200:9321
129-
```
130-
131-
- If you are using a domain name:
132-
133-
```
134-
http://myrpi.mydomain.com:9321
135-
```
136-
137-
- If you are using a host name in `/etc/hosts`:
138-
139-
```
140-
http://myrpi:9321
141-
```
113+
```
114+
http://192.168.203.200:9321
115+
http://myrpi.mydomain.com:9321
116+
http://myrpi.local:9321
117+
http://myrpi:9321
118+
```
142119

143120
The expected result is:
144121

145122
![Create Administrator Account](./images/nextcloud-createadminaccount.png)
146123

147-
8. Create an administrator account and then click "Install".
148-
149-
9. There is a long delay. In most cases, the "Recommended apps" screen appears and you can ignore the instructions in this step. However, if your browser returns a "Not Found" error like the following:
150-
151-
![Mal-formed URL](./images/nextcloud-malformedurl.png)
152-
153-
then you should:
154-
155-
* Examine the contents of your browser's URL bar. If you see this pattern:
156-
157-
```
158-
http://localhost/index.php/core/apps/recommended
159-
```
160-
161-
* Edit the URL to replace `localhost` with what it *should* be, which will be **one** of the following patterns, depending on which method you chose to access Nextcloud:
162-
163-
* `http://192.168.203.200:9321/index.php/core/apps/recommended`
164-
* `http://myrpi.mydomain.com:9321/index.php/core/apps/recommended`
165-
* `http://myrpi:9321/index.php/core/apps/recommended`
166-
167-
Note:
168-
169-
* This seems to be the only time Nextcloud misbehaves and forces `localhost` into a URL.
124+
7. Create an administrator account and then click "Install" and wait for the loading to complete.
170125

171-
10. The "Recommended apps" screen appears. Click "Install recommended apps". A spinner moves down the list of apps as they are loaded:
172-
173-
![Recommended Apps](./images/nextcloud-recommendedapps.png)
174-
175-
Wait for the loading to complete.
176-
177-
11. Eventually, the dashboard will appear. Then the dashboard will be obscured by the "Nextcloud Hub" floating window:
126+
8. Eventually, the dashboard will appear. Then the dashboard will be obscured by the "Nextcloud Hub" floating window which you can dismiss:
178127

179128
![Post-initialisation](./images/nextcloud-postinitialisation.png)
180129

181-
Keep clicking on the right-arrow button until you reach the last screen, then click "Start using Nextcloud".
182-
183-
12. Congratulations. Your IOTstack implementation of Nextcloud is ready to roll:
130+
9. Congratulations. Your IOTstack implementation of Nextcloud is ready to roll:
184131

185132
![Dashboard](./images/nextcloud-dashboard.png)
186133

187134
## "Access through untrusted domain" { #untrustedDomain }
188135

136+
> The information in this section *may* be out of date. Recent tests suggest it is no longer necessary to edit the `trusted_domains` list in `config.php`. This section is being left here so you will know what to do if you encounter the problem.
137+
189138
During Nextcloud initialisation you had to choose between an IP address, a domain name or a host name. Now that Nextcloud is running, you have the opportunity to expand your connection options.
190139

191140
> If you are reading this because you are staring at an "access through untrusted domain" message then you have come to the right place.
@@ -255,6 +204,8 @@ See also:
255204

256205
### Using a DNS alias for your Nextcloud service { #dnsAlias }
257206

207+
> The information in this section *may* be out of date. Recent tests suggest it is no longer necessary to add a `hostname` clause to your `docker-compose.yml` to silence warnings when using DNS aliases to reach your NextCloud service. This section is being left here so you will know what to do if you encounter the problem.
208+
258209
The examples above include using a DNS alias (a CNAME record) for your Nextcloud service. If you decide to do that, you may see this warning in the log:
259210

260211
```
@@ -271,6 +222,8 @@ You can silence the warning by editing the Nextcloud service definition in `dock
271222
272223
Nextcloud traffic is not encrypted. Do **not** expose it to the web by opening a port on your home router. Instead, use a VPN like Wireguard to provide secure access to your home network, and let your remote clients access Nextcloud over the VPN tunnel.
273224
225+
The IOTstack service definition for NextCloud reserves port 9343 for HTTPS access but leaves it as an exercise for the reader to figure out how to make it work. You may get some guidance [here](https://youtu.be/qlcVx-k-02E?si=qtVNFAvSB8w202Jh).
226+
274227
## Container health check { #healthCheck }
275228
276229
A script , or "agent", to assess the health of the MariaDB container has been added to the *local image* via the *Dockerfile*. In other words, the script is specific to IOTstack.
-46.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)