Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
content:serverbasics:docker-nextcloud_aio [2024/05/18 19:57] – [Firewall] Daniel | content:serverbasics:docker-nextcloud_aio [2025/04/14 11:54] (aktuell) – [Dockers Yaml] Daniel | ||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
As you do have Docker running as described before, you can easyly install a running Instance of Nextcloud to you PC. Heres the original doc: [[https:// | As you do have Docker running as described before, you can easyly install a running Instance of Nextcloud to you PC. Heres the original doc: [[https:// | ||
+ | |||
+ | ===== Docker Network ===== | ||
+ | |||
+ | To have IPV6 support, Docker needs a local IPV6 Networkrange to use. | ||
+ | |||
+ | So you need to edit the Dockers ~/ | ||
+ | |||
+ | Hint: If that file is missing, just create it. | ||
+ | < | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
===== Network preparations ===== | ===== Network preparations ===== | ||
Zeile 11: | Zeile 33: | ||
Per default, only ipv4 networking will be set up by nextcloud-aio. So the setup will check the adress and will fail. | Per default, only ipv4 networking will be set up by nextcloud-aio. So the setup will check the adress and will fail. | ||
- | Further | + | So you need to setup a network |
- | Set up the network in Docker | + | To Set up the network in Docker, here for example |
< | < | ||
#!/bin/bash | #!/bin/bash | ||
- | #nextcloud must have that network-name! | + | #recreate |
- | docker network create --subnet=" | + | docker network remove nextcloud-aio |
+ | #Use the fixed-cidr-v6 from dockers daemon.json for the subnet and | ||
+ | #Adress :1 for the gateway | ||
+ | docker network create --subnet=" | ||
</ | </ | ||
- | The subnet and gateway are free to choose, but make sure it does not interfere with some existing network. If you are not sure, use the given ones. | + | The subnet and gateway |
===== Firewall ===== | ===== Firewall ===== | ||
Zeile 35: | Zeile 60: | ||
</ | </ | ||
+ | |||
+ | ===== Docker Network driver ===== | ||
+ | |||
+ | There may be other problems with networking, so use another driver for networking like described here: [[https:// | ||
+ | |||
+ | In general, the default slirp4netns- driver is: a. slow b. not able to uses ipv6 c. not able to do port forwarding, which maybe essential | ||
+ | |||
+ | ==== Pasta driver ==== | ||
+ | |||
+ | A quite new and high performance networking driver with good functionality is pasta. | ||
+ | |||
+ | Pasta needs to be installed locally on the host '' | ||
+ | |||
+ | After that, you need to change the systemd config für docker: | ||
+ | < | ||
+ | |||
+ | docker@pcserver2023: | ||
+ | |||
+ | </ | ||
+ | |||
+ | and edit the file like this: | ||
+ | |||
+ | < | ||
+ | [Service] | ||
+ | Environment=" | ||
+ | Environment=" | ||
+ | Environment=" | ||
+ | |||
+ | </ | ||
+ | |||
+ | now do | ||
+ | |||
+ | < | ||
+ | docker@pcserver2023: | ||
+ | |||
+ | docker@pcserver2023: | ||
+ | |||
+ | docker@pcserver2023: | ||
+ | |||
+ | </ | ||
+ | |||
+ | You shold now have a fast network driver with port forwarding. | ||
+ | |||
+ | ===== Dockers Yaml ===== | ||
+ | |||
+ | In your Docker- Compose- Drirectory, create a new Directory called '' | ||
+ | |||
+ | Adjustements: | ||
+ | |||
+ | * For long Fileuploads, | ||
+ | * Also maybe NEXTCLOUD_UPLOAD_LIMIT=12G and | ||
+ | * maybe NEXTCLOUD_MEMORY_LIMIT=2048M | ||
+ | |||
+ | |||
+ | ===== AIO Webinterface ===== | ||
+ | |||
+ | It is important to understand, that the Docker- Service itself is NOT a working Nextcloud- Instance! | ||
+ | |||
+ | The Service of this YML - called '' | ||
+ | |||
+ | So what you gain first, is a new Webserver on a seperate Port (default: 8080), wich will be the Administration Endpoint for you. | ||
+ | |||
+ | **To access that Server from another PC, i STRONGLY DO NOT ADVISE to open the Firewall- Port of your Host and to make that service available to the internet!** | ||
+ | |||
+ | Instead, you should use SSH Port Forwarding to administrate the Service. To have that, you maybe use ssh like this: | ||
+ | < | ||
+ | |||
+ | ssh -L 8080: | ||
+ | |||
+ | </ | ||
+ | |||
+ | After that, you can access the AIO- Mastercontainer WEB- GUI on [[https:// | ||
+ | |||
+ | ===== Caddy Service ===== | ||
+ | |||
+ | Now you need to add the Nextcloud- Service to you Caddyfile ( [[https:// | ||
+ | |||
+ | Add those lines First: | ||
+ | < | ||
+ | |||
+ | https:// | ||
+ | | ||
+ | #Large fileuploads | ||
+ | | ||
+ | | ||
+ | } | ||
+ | # | ||
+ | #For install Domaincheck needed: | ||
+ | | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Mind, that when starting Nextcloud-AIO, | ||
+ | |||
+ | So we need this small quirk to work around it. | ||
+ | |||
+ | After you have setup the Configuration in Nextcloud, when installing and starting the Services, comment out that line and uncomment the apache- line. Than restart Caddy - you won't need that line again. | ||
+ | |||
+ | ===== Final Nextcloud- Setup ===== | ||
+ | |||
+ | Now, ssh on your Host and go to [[https:// | ||
+ | |||
+ | and finish everything on that WEB- GUI. Mind, that installing the Services will take a long time. Don't panik if nothing seems to happen. Just let it do one hour or more. | ||
+ | |||
+ | Enjoy your fully flagged Nextcloud. | ||
+ | |||
+ | The next step would now be to integrate Nextcloud with your IPA- Domain. | ||
+ | |||
+ | ===== Enable SSO to Logon with FreeIPA/ | ||
+ | |||
+ | Before proceeding, you should have integrated you Client to the domain as written in [[.: | ||
+ | |||
+ | Than, check, that Authentik- Kerberos is working as described at [[.: | ||
+ | |||
+ | If this is working, check this docs to integrate Nextcloud with Authentik/ | ||
+ | |||
+ | **Attention**: | ||
+ | |||
+ | * In Authentik / Provider Nextcloud: under Advance Protocol Settings: Subject mode = Based on user's username | ||
+ | * And in ODIC- Settings of Nextcloud, use " | ||
+ | * Turn off "Use unique Userids" | ||
+ | |||
+ | All other Settungs either made Admins not beeing Admins in NC or had hashed- userids in Nexctcloud, which make it complicated to get acces to NC with your PCs UserID. | ||
+ | |||
+ | ==== Disable User Logon-Screen ==== | ||
+ | |||
+ | After you can logon with authentik, disable the user-input screen by opening container shell of '' | ||
+ | < | ||
+ | |||
+ | containerid:/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | Remember, that you now need to go to | ||
+ | |||
+ | '' | ||
+ | |||
+ | to logon to nextcloud with the local admin. | ||