Replies: 90 comments 456 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.
-
hi guys, I seem success for most part, all container runs fine, without error or unheathy, I checked the node nextcloud also shows green on tailscale admin console. I can access the 8080 port and setup the install, but afterwards I cannot open the main page:
It seems DNS error but I don‘t know how to fix, I already enable the |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
I have gotten Nextcloud up and running on my test computer. Now I'm trying to get it running on another computer. My set up goes smoothly until I try to access localhost:8080 to provision Nextcloud. I get a message saying "Bad Request. 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" This worked fine on my other computer. Any ideas of what is causing this? I tried checking the firewall, but I don't see any problems there. |
Beta Was this translation helpful? Give feedback.
-
I succeded to install nextcloud on docker (on windows) using tailscale |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the write up! What I did:
In tailscale admin:
My issues:
The unhealthy container is quite annoying as it happened on my first Manjaro device, I grabbed another old laptop and which ran Ubuntu, I tried again and also got the unhealthy container. I completely reset the manjaro device and still get unhealthy containers. I also tried (as described above) to move from the v1.82.0 to the /latest and /stable branches in the dockerfile, but to no avail. Could someone tell me If I'm missing something? I really feel it shouldn't be this hard ':-| |
Beta Was this translation helpful? Give feedback.
-
Does it mean that in future I can't change setup and use Nextcloud AIO with public domain? |
Beta Was this translation helpful? Give feedback.
-
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.
-
This worked for me, but since the latest nextcloud update, there seems to some communication problem: when I try to connect to nextcloud from my tailnet, caddy shows this log entry:
Somehow caddy is unable to reach the apache container. Can someone point me into the right direction on this? |
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Disclaimer: It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
This setup integrates 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 with Caddy to communicate with AIO.
serve.json
configuration (This document does not provide an example ofserve.json
)1. Set Environment Variables
Set the following environment variables:
Note
We will not create a .env file, but instead write directly into the compose.yml file later.
If you do create a .env file, compose will automatically read it. In this case, set the key-value format in service[].environment[] of the compose.yml to keys only, allowing compose to pass variables to the service.
Ensure NC_DOMAIN is in the correct format.
When using OAuth client key, set tags in TS_EXTRA_ARGS and define them in ACL.
For more detailed information, please refer to:
https://tailscale.com/blog/docker-tailscale-guide
2. Configure Docker Compose File
Create a compose.yml file with the following content. Replace environment variables as appropriate.
compose.yml
Important
Make sure to replace
NC_DOMAIN
,TS_HOSTNAME
,TS_AUTH_KEY
, andTS_EXTRA_ARGS
with your actual values before running the docker compose file.3. 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 set in your environment variables.Create Caddy.Dockerfile
4. Set Up Nextcloud AIO
docker compose up --build --pull always --wait
anddocker compose logs --follow
https://$NC_DOMAIN/
(e.g., https://nextcloud.your-tailnet.ts.net/)If it doesn't work
Please try the following:
Docker Reset Commands
If things don't work, use the following commands to reset
Caution
Only use this if nothing else works.
CLICK!
After force stopping, check that the Nextcloud entry is no longer visible in the Tailscale admin console

Thank you for your advice, frazar
Latest Updates
beta
, so I also changed the command todocker compose up --pull always
.service:tailscale
Beta Was this translation helpful? Give feedback.
All reactions