Replies: 97 comments 476 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 aio Tailscale ACL: "groups": {
"group:admin": ["js-surya@github"],
"group:users": ["[email protected]", "[email protected]"],
},
"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.
-
Up and running on ubuntu 24.02 server Compose.yml
Caddy.Dockerfile
Caddyfile
ACL Settings in Tailnet
|
Beta Was this translation helpful? Give feedback.
-
I have tried this several times from scratch on a windows machine with docker. I have used everything as recommended except I use a brand new auth key instead of oauth (I haven't figured out acl for tailscale). My containers are healthy. There're no problems I see in my logs. But if I try to access LocalHost:8080, or 27.0.0.1:8080, I receive the following error.
If instead I try nextcloud.[mytailscale].ts.net I get: ERR CONNECTION TIME OUT. Anyone have an idea of what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
-
Just a suggestion… maybe try https:// instead of http://…? Just a thought
I know how frustrating it can be to get a setup going.
…On Mon, Jun 9, 2025 at 9:01 AM Byte-sized1 ***@***.***> wrote:
I have tried this several times from scratch on a windows machine with
docker. I have used everything as recommended except I use a brand new auth
key instead of oauth (I haven't figured out acl for tailscale). My
containers are healthy. There're no problems I see in my logs. But if I try
to access LocalHost:8080, or 27.0.0.1:8080, I receive the following error.
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
Apache/2.4.62 (Unix) Server at localhost Port 8080
If instead I try nextcloud.[mytailscale].ts.net I get: ERR CONNECTION
TIME OUT.
Anyone have an idea of what I'm doing wrong?
—
Reply to this email directly, view it on GitHub
<#5439 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZZHXVKNNKZ3IRTVXX7F7HD3CWVWHAVCNFSM6AAAAABQGBXP2KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNBRGE3DONY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
hi i got DNS_PROBE_POSSIBLE error when i tried this method, how do i fix it? |
Beta Was this translation helpful? Give feedback.
-
I am having difficulty getting Talk to work with this setup. Looking through the logs, curl can't resolve the tailnet domain. Has anyone else had this issue? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
How to modify this docker file to add other drives on system. Note: I dont want to use 'external storage' menu. I need the drive to show up in system under 'Disks' . It should show up under here. |
Beta Was this translation helpful? Give feedback.
-
Awesome, thanks for the update!
…On Sun, Jun 29, 2025 at 9:22 AM Mitch ***@***.***> wrote:
Figured this out. Due to a bug in tailscale's docker right now (
tailscale/tailscale#14467
<tailscale/tailscale#14467>), the NC_DOMAIN
does not resolve for the server itself unless the container's host machine
is also connected to tailscale. This means when the backend for talk tries
to connect to the standalone-signaling endpoint, it fails with a DNS error
since it uses the domain name
—
Reply to this email directly, view it on GitHub
<#5439 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZZHXVJPXGAGYGOUJN4NTCT3GAHDZAVCNFSM6AAAAABQGBXP2KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNRRGAZTOMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Has anyone tried setting this up in Unraid? A brief guide or instructions on how to do so would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
I've had this set-up working really well for over a month but I can suddenly no longer access my AIO interface. If I go to nextcloud administration settings I receive this error: Error: Cannot connect to server. If I click on 'open nextcloud aio interface', after loading I get: ERR_CONNECTION_TIMED_OUT. |
Beta Was this translation helpful? Give feedback.
-
Hi the guide worked well for me! Maybe mention that magic DNS and HTTPS need to be enabled in the guide? That and also mentioning that all that's needed to be added to the ACL (Access Control tab in tailscale) is:
This may be obvious to more seasoned users but took me a bit to figure out. (I know the documentation explains this but it took a while for me to put two and two together). Also there is a new tailscale version out! Perhaps update it to |
Beta Was this translation helpful? Give feedback.
-
I believe there is an indentation error in the networks and volumes sections in the bottom of the compose file. I had to undent them to the top level to make docker compose happy. |
Beta Was this translation helpful? Give feedback.
-
Can anyone recommend changes (if possible at all) to access nextcloud through talescale (thats working) AND locally through the local IP? - ideally with a short explanation to actually learn stuff :) |
Beta Was this translation helpful? Give feedback.
-
I'm kind of bringing the need for a reverse proxy into question for this... At least, when I set up my Vaultwarden,, I didn't need to use a reverse proxy for it if using Tailscale. I only needed to serve the port the port Vaultwarden was running under |
Beta Was this translation helpful? Give feedback.
-
hello i got basically everything running but for some reason some of the applications in nextcloud are not working , for example the Whiteboard. these are the things that i can see in the security and setup warning section :
-Your webserver is not set up to serve Unable to run check for JavaScript support. Please remedy or confirm manually if your webserver serves Could not check if your web server properly resolves the OCM and OCS provider URLs. To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its |
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.json
configuration🚀 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
nextcloud
tag in thetagOwners
section🔑 1.4 Generate OAuth Client
nextcloud
tagOAuth Scopes Configuration:
TS_AUTH_KEY
environment variable)⚙️ Step 2: Environment Variables Setup
Configure the following environment variables for your setup:
Note
Important Configuration Notes:
.env
file, but instead write directly into thecompose.yml
file.env
file, compose will automatically read itNC_DOMAIN
follows the correct format:{TS_HOSTNAME}.{tailnetdomain}.ts.net
TS_EXTRA_ARGS
and define them in ACL📖 For more detailed information: Docker Tailscale Guide
🐳 Step 3: Docker Compose Configuration
Create a
compose.yml
file 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_ARGS
with 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
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.Dockerfile
with 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_DOMAIN
Provision 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 always
service:tailscale
Beta Was this translation helpful? Give feedback.
All reactions