Replies: 116 comments 541 replies
-
|
hi , |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
|
This is amazing @flll , I am trying to achieve the same since a month. But I am not using docker. Can you KINDLY make a script like the one for nextcloud with nginx as server, caddy as reverse proxy, tailscale and cloudflare as DNS. regards |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
|
Thank you for your work @flll . But no matter how many times I try the procedure, the hostname I give in the compose environment doesn't get created in the tailscale and rather a random ephemeral hostname is created after manually authenticating using the url in the log. My Internet and Network connection is fine. But I cannot log into the nextcloud instance even with the the randomly generated hostname in my tailnet. |
Beta Was this translation helpful? Give feedback.
-
|
Did anyone get this error? docker compose up tailscale-1 | boot: 2024/10/24 22:18:21 Running 'tailscale up' |
Beta Was this translation helpful? Give feedback.
-
|
Nice guide! Thanks so much. or Note: same goes for the |
Beta Was this translation helpful? Give feedback.
-
|
Okay, one question: Should I "sudo dnf install tailscale" on my host, then follow all this docker compose things? because how would I declare ACL dst 'nextcloud.your-tailnet.ts.net'? Or do I add my device manually in tailscale admin? I might be very less informed about ACL and tags, but I am trying to learn and doing all this to use nextcloud-aio is tiring, but I am trying my best. Thanks! PS: I was using this |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the guide, it's great but I cannot make it work for myself. My compose.yaml: My ACL: Caddy seems to recognize the domain name correctly, i.e. it resolves $NC_DOMAIN correctly. Tailscale logs: Tried opening 443 (TCP and UDP), 80, 8080 (out of desperation) in firewall and even disabling the firewall completely, none of it helped Seems that no matter what I do, in the nextcloud container I see: Pinging the domain name within tailscale works without problems |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Finally access the domain. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, So I have tried a lot of things, now my experience is like this:
Apache logs: Nextcloud logs: Redis: Database: Notify Push: Nextcloud Mastercontainer Logs: My ACL of Tailscale: |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone tried to deploy using the portainer stack? Caddy log: I have double-checked my NC_DOMAIN variable. compose.yml: services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer # This line cannot be changed.
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- nextcloud-aio
ports:
- 0.0.0.0:8080:8080
environment:
APACHE_PORT: 11000
APACHE_IP_BINDING: 127.0.0.1
SKIP_DOMAIN_VALIDATION: true
caddy:
image: caddy:alpine
restart: unless-stopped
container_name: caddy
environment:
NC_DOMAIN: nextcloud.[redacted].ts.net # Change this to your domain ending with .ts.net in the format {$TS_HOSTNAME}.{tailnetdomain}
volumes:
- type: bind
source: /home/surya/Caddyfile
target: /etc/caddy/Caddyfile
- type: volume
source: caddy_certs
target: /certs
- type: volume
source: caddy_data
target: /data
- type: volume
source: caddy_config
target: /config
- type: volume
source: tailscale_sock
target: /var/run/tailscale/ # Mount the volume for /var/run/tailscale/tailscale.sock
read_only: true
network_mode: service:tailscale
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
environment:
TS_HOSTNAME: nextcloud # Enter the hostname for your tailnet
TS_AUTH_KEY: tskey-client-kYthXvJbHD21CNTRL-[redacted] # OAuth client key recommended
TS_EXTRA_ARGS: --advertise-tags=tag:nextcloud # Tags are required when using OAuth client
init: true
restart: unless-stopped
volumes:
- /dev/net/tun:/dev/net/tun
- type: volume
source: tailscale
target: /var/lib/tailscale
- type: volume
source: tailscale_sock
target: /tmp # Mounting the entire /tmp folder to access tailscale.sock
cap_add:
- NET_ADMIN
- NET_RAW
networks:
- nextcloud-aio
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line cannot be changed.
caddy_certs:
name: caddy_certs
caddy_data:
name: caddy_data
caddy_config:
name: caddy_config
tailscale:
name: tailscale
tailscale_sock:
name: tailscale_sock
networks:
nextcloud-aio:
name: nextcloud-aio
driver: bridge
enable_ipv6: false
driver_opts:
com.docker.network.driver.mtu: "9001" # Jumbo Frame
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1" # Harden aioTailscale ACL: "groups": {
"group:admin": ["js-surya@github"],
"group:users": ["user@example.com", "otheruser@example.com"],
},
"tagOwners": {
"tag:nextcloud": ["group:admin"],
},
"acls": [
// Allow general unrestricted access (you can comment this out if needed).
{"action": "accept", "src": ["*"], "dst": ["*:*"]},
// Allow users in "group:users" to access any devices tagged with "nextcloud".
{"action": "accept", "src": ["group:users"], "dst": ["tag:nextcloud:*"]},I'm not an IT expert, and I'm relatively new to this. My IP is behind CGNAT, and I want to access my Nextcloud server outside my local network using Tailscale. I'm eager to learn, so any suggestions or help would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
Apache is always unhealthy docker exec -it nextcloud-aio-apache bash -x /healthcheck.sh
|
Beta Was this translation helpful? Give feedback.
-
|
@flll Wanted to mention that I was able to get this working without needing caddy at all. I think it simplifies things a bit. Tailscale can natively proxy Note this employs tailscale serve (as opposed to tailscale funnel) so will only expose the service to your tailnet, not publicly. You could set a funnel flag to true in the json config below to expose it publicly, though some security and performance caveats would apply if you did.
|
Beta Was this translation helpful? Give feedback.
-
|
Hey, there. I am having issues with the syncing of the nextcloud-desktop app. I figured out that it has to be the issue with the WebDAV. I get download speeds of <20 kb/s... Does someone run into the same issue? I have tried all kinds of things and can'T seem to find a solution. The web browser version of nextcloud works beautifully fine with this configuration. I am a bit of a noob, so please tell me which logs you need to help me with the problem. Cheers |
Beta Was this translation helpful? Give feedback.
-
|
Is it only possible to use tailscale with the all-in-one:beta version? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hello! I can attest that this guide & process, as written, got me up and running. Thanks @flll! Can endorse many of the tips given in this thread:
I still have the reported issue of 'breaking after cold host reboot', due to Caddy starting BEFORE Apache & having to 'manually' restart the caddy contain to fix. Any elegant tips appreciated :) I had fun learning even more about Nextcloud (10+ year user!) & look forward to trying some of the other configs suggested by @A4alli & @patrick-theprogrammer Cheers to one of the best communities in the open-source world! |
Beta Was this translation helpful? Give feedback.
-
|
Hello i used the above instruction to run nextcloud in docker using tailscale and i am having an issue where either nextcloud_aio_apache works or the domaincheck works has anybody faced such a issue and is there anyway to solve this |
Beta Was this translation helpful? Give feedback.
-
|
Sorry if this is too much of a newbie question, but how would I set the data directory to store everything on a mounted connected drive, say "/mnt/mydrive"? |
Beta Was this translation helpful? Give feedback.
-
|
This is an excellent guide, but I've followed it exactly and I can't get Collabora to work. The only way I can get the Office config to go green is by using the collabora container's name (http://nextcloud-aio-collabora:9980) once I save that it goes green and shows both the browser URL and nextcloud url used by collabora are my tailnet url. Then I browse to files>Documents and click on the "Welcome to Nextcloud Hub.docx" and I get:
Looking at the collabora logs I see "ERR Failed to lookup host [nextcloud.]: No address associated with hostname "
Any help would be greatly appreciated. Thank you, |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I had some great advice earlier. With it, I now have everything working except collabora. To be honest, I don't even really know how I am supposed to be able to use collabora, but although the container is running it is throwing this to the log file: 2025-09-02T17:10:23.643514415Z wsd-00007-00011 2025-09-02 17:10:23.643412 +0000 [ asyncdns ] ERR Failed to lookup host [nextcloud.polydactyl-vibes.ts.net]: No address associated with hostname (EAGAIN: Resource temporarily unavailable)| net/NetUtil.cpp:108 This "nextcloud.polydactyl-vibes.ts.net" is of course my tailnet. I also followed the steps here: #1358 sudo docker exec -it nextcloud-aio-nextcloud bash I'm grateful for any hints on where to start. Thanks, Leon |
Beta Was this translation helpful? Give feedback.
-
|
OK, done. Do I just now try to restart or should I check something?
Leon
…--
Leon Balents
***@***.***
On Tue, Sep 2, 2025, at 3:43 PM, Elias Severiano Amaral wrote:
You need your host to also be on the Tailscale network. If you are using Ubuntu, go to https://login.tailscale.com/admin/machines/new-linux and follow the step-by-step instructions.
—
Reply to this email directly, view it on GitHub <#5439 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADHFI43UILUJPTAJQLT72L33QYMQDAVCNFSM6AAAAABQGBXP2KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMRZGAZDAOI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Within the container? If yes, then the result did not change.
…--
Leon Balents
***@***.***
On Tue, Sep 2, 2025, at 3:54 PM, Elias Severiano Amaral wrote:
repeat the commands in the terminal
—
Reply to this email directly, view it on GitHub <#5439 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADHFI44BY2G6CS43PCD4P7D3QYNZPAVCNFSM6AAAAABQGBXP2KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMRZGAZDMNA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
I am running collabora in nextcloud aio following this guide and with help from this forum.H appily it works but the performance is very slow and laggy. I wonder if there is a fix? I loaded a .docx file and copied the collabora log that resulted below. There is a line about performance:
|
Beta Was this translation helpful? Give feedback.
-
|
I got two questions. Question #1, would it be better to update the docker compose config above to explicitly define the ephemeral and preauthorized parameters? I have Tailscale Lock enabled and every time the container restarts, since it tis ephemeral I have to go sign it to allow traffic to it. I think preauthorized=true solves that issue.
Question #2, I'm trying to share the nextcloud node with another tailnet (not inviting the user to my tailnet, but instead just sharing the node with them). The issue is that since the container/node is ephemeral, every time the container restarts and deletes the node and creates a new one. This causes the need to create a new node invitation link and go through the whole process again. If the docker compose is set with the ephemeral key set to true, it still doesn't solve the issue as when the container reboots it still create a new node. Any suggestions on how this can be solved? |
Beta Was this translation helpful? Give feedback.
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
-
|
So the guide worked! However my nextcloud-domaincheck container is refusing to start because its saying port 1100 is already bound to another container. (Ive only used that port for nextcloud but i used it in other attempts to get this working.) Here is the error message:
I dont know if i should remove all the containers for nextcloud look into my docker network ID's and remove the appropriate ones or should i remove all the docker containers and change the port number to like 1101 and redo the docker container? Im so close now but nextcloud has been a constant pain in my ass for awhile now. This guide is the only thing thats got me past the initial setup EDIT: I took down all the containers changed the port of the apache line to 11001 and every container is now running. However i still cant seem to access my nextcloud. When i hit the AIO pages "Open your nextcloud" the page doesnt load. When i use the docker bridge ip it brings me to the AIO page but says something about automatic login. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, thanks for the awesome guide, I've been using it for half a year now and everything works quite smoothly. One question on tailscale though: If I want to update the tailscale inside the docker container how can I do this safely? I tried it once but then I ended up on the nextcloud configuration screen again and wasnt able to reach my instance anymore, although the data was still there, but the setup was not reachable. Any help appreciated! |
Beta Was this translation helpful? Give feedback.








Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🌐 Nextcloud All-in-One with Tailscale Integration Guide
📋 Overview
This comprehensive guide walks you through integrating Nextcloud All-in-One (AIO) with Tailscale, using Caddy as a reverse proxy. Since Tailscale currently only allows communication with localhost (127.0.0.1), we use a sidecar container with Caddy to communicate with AIO.
✨ Key Benefits
serve.jsonconfiguration🚀 Step 1: Tailscale Configuration
Before setting up Docker containers, you need to properly configure Tailscale:
🏷️ 1.1 Copy Your Tailnet Domain Name
{tailnetdomain}.ts.net)🔒 1.2 Enable HTTPS Certificates
🏷️ 1.3 Create Nextcloud Tag in ACL
nextcloudtag in thetagOwnerssection🔑 1.4 Generate OAuth Client
nextcloudtagOAuth Scopes Configuration:
TS_AUTH_KEYenvironment variable)⚙️ Step 2: Environment Variables Setup
Configure the following environment variables for your setup:
Note
Important Configuration Notes:
.envfile, but instead write directly into thecompose.ymlfile.envfile, compose will automatically read itNC_DOMAINfollows the correct format:{TS_HOSTNAME}.{tailnetdomain}.ts.netTS_EXTRA_ARGSand define them in ACL📖 For more detailed information: Docker Tailscale Guide
🐳 Step 3: Docker Compose Configuration
Create a
compose.ymlfile with the following content. Replace environment variables with your actual values.compose.yml
Important
🔧 Before Setup: Make sure to replace
NC_DOMAIN,TS_HOSTNAME,TS_AUTH_KEY, andTS_EXTRA_ARGSwith your actual values!📝 Step 4: Caddy Configuration Files
Create the necessary Caddy configuration files in your current directory:
4. Create Caddyfile and Caddy.Dockerfile
Create a Caddyfile in the current directory with the following content:
Caddyfile
{ layer4 { 127.0.0.1:3478 { route { proxy { upstream nextcloud-aio-talk:3478 } } } 127.0.0.1:3479 { route { proxy { upstream nextcloud-aio-talk:3479 } } } } } https://{$NC_DOMAIN} { reverse_proxy nextcloud-aio-apache:11000 { header_up X-Forwarded-Proto "https" header_up Host {host} } } http://{$NC_DOMAIN} { reverse_proxy nextcloud-aio-apache:11000 { header_up X-Forwarded-Proto "http" header_up Host {host} } }Note
🚨 Do NOT manually replace the
{$NC_DOMAIN}variable. It will be automatically populated with the value from your environment variables.🐳 Caddy.Dockerfile
Create a
Caddy.Dockerfilewith the following content:🎯 Step 5: Deploy Nextcloud AIO
Follow these steps to set up and access your Nextcloud instance:
🚀 Deployment Steps
Start the containers:
Monitor the logs:
Access the AIO interface:
https://ip.address.of.server:8080/https://192.168.0.2:8080/Configure your domain:
$NC_DOMAINProvision Nextcloud:
Access your Nextcloud:
https://$NC_DOMAIN/https://nextcloud.your-tailnet.ts.net/🎉 Setup Complete!
🔧 Troubleshooting
❗ If It Doesn't Work
Try the following solutions:
🔄 Docker Reset Commands
If nothing else works, use these commands to completely reset your setup:
Caution
Only use this as a last resort.
🔴 CLICK TO REVEAL RESET COMMANDS
🔍 Post-Reset Verification
After force stopping, verify that the Nextcloud entry is no longer visible in the Tailscale Admin Console:
Important Steps:
🙏 Acknowledgments
Special thanks to frazar for valuable advice and contributions.
📅 Latest Updates
beta, updated command todocker compose up --pull alwaysservice:tailscaleBeta Was this translation helpful? Give feedback.
All reactions