Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Treafik 2 to reverse proxy documentation #564

Merged
merged 1 commit into from
May 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions reverse-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Basically, you need to specify the port that the apache container shall use and

All examples below will use port `11000` as example apache port. Also it is supposed that the reverse proxy runs on the same server like AIO, hence `localhost` is used and not an internal ip-address to point to the AIO instance. Modify both to your needings.

**Info:** The instructions below assume that your reverse proxy is installed directly on the host, not inside a separate docker container. If you want to run the reverse proxy inside a docker container, you can do so by using the `--network host` option when starting the reverse proxy container.
**Info:** The instructions below assume that your reverse proxy is installed directly on the host, not inside a separate docker container. If you want to run the reverse proxy inside a docker container, you can do so by using the `--network host` option when starting the reverse proxy container. Or if you don't want to use the networks host option, substituting `localhost` by the internal ip-address of the Host might work.

### Reverse proxy config examples

Expand All @@ -13,7 +13,7 @@ All examples below will use port `11000` as example apache port. Also it is supp
<details>

<summary>click here to expand</summary>
<br>

Add this to your Caddyfile:

```
Expand All @@ -32,7 +32,6 @@ Of course you need to modify `<your-nc-domain>` to the domain on which you want
<details>

<summary>click here to expand</summary>
<br>

**Disclaimer:** the config below is not working 100% correctly, yet. See e.g. https://github.com/nextcloud/all-in-one/issues/450, https://github.com/nextcloud/all-in-one/issues/447 and https://github.com/nextcloud/all-in-one/issues/491. Improvements to it are very welcome!

Expand All @@ -56,6 +55,38 @@ Of course SSL needs to be set up as well e.g. by using certbot and your domain m

</details>

#### Traefik 2

<details>

<summary>click here to expand</summary>

**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!

Add a `nc.toml` to the treafik rules folder with the following content:

```toml
[http.routers]
[http.routers.nc-rtr]
entryPoints = ["https"]
rule = "Host(<your-nc-domain>)"
service = "nc-svc"
middlewares = ["chain-no-auth"]
[http.routers.nc-rtr.tls]
certresolver = "le"

[http.services]
[http.services.nc-svc]
[http.services.nc-svc.loadBalancer]
passHostHeader = true
[[http.services.nc-svc.loadBalancer.servers]]
url = "http://localhost:11000"
```

Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud.

</details>

### Startup command

After adjusting your reverse proxy config, use the following command to start AIO:
Expand Down