Coder Docker Compose with Tailscale HTTPS

I'm running into some difficulty. I'm able to access coder via https and can get to the deployment dashboard, which displays an unhealthy state with the errors below. Am I missing something or otherwise doing anything else wrong, or is there something else going on? Access URL:
EACS03: get healthz endpoint: Get "https://astro.monkey-byzantine.ts.net:8443/healthz": context deadline exceeded
DERP Coder Embedded Relay:
connect to derp: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: dial of astro.monkey-byzantine.ts.net: dial tcp 100.96.202.84:8443: i/o timeout connect to derp: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: context deadline exceeded: dial of astro.monkey-byzantine.ts.net: dial tcp 100.96.202.84:8443: i/o timeout connect to derp: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: context deadline exceeded: dial of astro.monkey-byzantine.ts.net: dial tcp 100.96.202.84:8443: i/o timeout connect to derp: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: context deadline exceeded: dial of astro.monkey-byzantine.ts.net: dial tcp: lookup astro.monkey-byzantine.ts.net: i/o timeout connect to derp: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: context deadline exceeded: dial of astro.monkey-byzantine.ts.net: dial tcp: lookup astro.monkey-byzantine.ts.net: i/o timeout couldn't connect after 5 tries, last error: couldn't connect after 5 tries, last error: derphttp.Client.Connect connect to https://astro.monkey-byzantine.ts.net:8443/derp: context deadline exceeded: dial of astro.monkey-byzantine.ts.net: dial tcp: lookup astro.monkey-byzantine.ts.net: i/o timeout
Websocket:
EWS01: websocket dial: failed to WebSocket dial: failed to send handshake request: Get "https://astro.monkey-byzantine.ts.net:8443/api/v2/debug/ws": context deadline exceeded
43 Replies
Codercord
Codercord3mo ago
Codercord
Codercord3mo ago
What are you creating this issue for?
Konstantine
KonstantineOP3mo ago
Docker Compose: (couldn't send it all at once)
services:
coder:
image: ghcr.io/coder/coder:latest
ports:
- "8443:8443"
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@database/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_REDIRECT_TO_ACCESS_URL: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
services:
coder:
image: ghcr.io/coder/coder:latest
ports:
- "8443:8443"
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@database/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_REDIRECT_TO_ACCESS_URL: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
Looks like this ends up working with the following config instead:
services:
coder:
image: ghcr.io/coder/coder:latest
network_mode: host
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@localhost/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_REDIRECT_TO_ACCESS_URL: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: host
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
services:
coder:
image: ghcr.io/coder/coder:latest
network_mode: host
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@localhost/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_REDIRECT_TO_ACCESS_URL: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: host
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
Maybe there's a way to sidecar Tailscale into the mix but this is probably the most efficient solution
Phorcys
Phorcys3mo ago
this works, but a better option would be to switch the DNS or set network_mode to service:tailscale-<name> like https://tailscale.com/kb/1282/docker#code-examples
Tailscale
Using Tailscale with Docker · Tailscale Docs
Connect your container to Tailscale using Tailscale's official Docker image.
Phorcys
Phorcys3mo ago
or try to change the DNS via https://docs.docker.com/reference/compose-file/services/#dns, the network_mode: host is not ideal in terms of security :-)
Docker Documentation
Services top-level elements
Explore all the attributes the services top-level element can have.
Konstantine
KonstantineOP3mo ago
For what it’s worth, I later found that even with my nuclear option of network_mode host, while the health check would pass in the dashboard, I still couldn’t spin up workspaces properly. Still not sure what’s happening there
Phorcys
Phorcys3mo ago
that's probably a different issue to be honest oh wait so you have your ts.net domain as your access URL?
Konstantine
KonstantineOP3mo ago
Yeah astro being the hostname
Phorcys
Phorcys3mo ago
ah yeah so you'll need the tailscale sidecar or set a public domain in the access URL
Konstantine
KonstantineOP3mo ago
🤔
coder-1 | error: connect to postgres: connect to postgres: unable to connect after 11 tries; last error: dial tcp 127.0.0.1:5432: connect: connection refused
services:
tailscale-coder:
image: tailscale/tailscale:latest
hostname: tailscale-coder
environment:
TS_AUTH_KEY: "${TS_AUTHKEY}"
TS_EXTRA_ARGS: "--advertise-tags=tag:container"
TS_STATE_DIR: "/var/lib/tailscale"
TS_USERSPACE: "false"
volumes:
- tailscale_data:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
restart: unless-stopped

coder:
image: "ghcr.io/coder/coder:v2.18.1"
network_mode: service:tailscale-coder
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@127.0.0.1/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_DISABLE_PASSWORD_AUTH: "true"
CODER_REDIRECT_TO_ACCESS_URL: "true"
CODER_TELEMETRY_ENABLE: "false"
group_add:
- "988"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
restart: unless-stopped
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: service:tailscale-coder
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
tailscale_data:
services:
tailscale-coder:
image: tailscale/tailscale:latest
hostname: tailscale-coder
environment:
TS_AUTH_KEY: "${TS_AUTHKEY}"
TS_EXTRA_ARGS: "--advertise-tags=tag:container"
TS_STATE_DIR: "/var/lib/tailscale"
TS_USERSPACE: "false"
volumes:
- tailscale_data:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
restart: unless-stopped

coder:
image: "ghcr.io/coder/coder:v2.18.1"
network_mode: service:tailscale-coder
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@127.0.0.1/coder?sslmode=disable"
CODER_ACCESS_URL: "https://astro.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_DISABLE_PASSWORD_AUTH: "true"
CODER_REDIRECT_TO_ACCESS_URL: "true"
CODER_TELEMETRY_ENABLE: "false"
group_add:
- "988"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
restart: unless-stopped
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: service:tailscale-coder
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
tailscale_data:
ÙwÚ
ÙwÚ3mo ago
try change 127.0.0.1 to databse? postgresql://coder:${POSTGRES_PASSWORD}@database/coder?sslmode=disable
Konstantine
KonstantineOP3mo ago
yeah unfortunately no luck there wither.. [warn] ping postgres: retrying error="dial tcp: lookup database on 127.0.0.11:53: server misbehaving"
ÙwÚ
ÙwÚ3mo ago
Is this happens after you restart container? How did you run this docker-compose? I usually do it with
docker compose up -d --force-recreate
docker compose up -d --force-recreate
Konstantine
KonstantineOP3mo ago
docker compose down -v && docker compose up -d
ÙwÚ
ÙwÚ3mo ago
since you running it behind tailscale, you gotta check the with tailscale containr at what's your database hostname not really familiar with tailscale in container, I did use tailscale on host once, it does assign host name for machines in the network
ÙwÚ
ÙwÚ3mo ago
if you run tailscale in container I guess you can use the cli to check network list https://tailscale.com/kb/1080/cli#status
Tailscale
Tailscale CLI · Tailscale Docs
Manage and troubleshoot your tailnet with the Tailscale command-line interface (Tailscale CLI).
Konstantine
KonstantineOP3mo ago
I don't think the database itself is given a hostname from Tailscale In the sense that, if I pop a shell into my tailscale container and run tailscale status, I'm going to see that tailscale container (tailscale-coder) and the rest of my tailnet, but not the coder or database containers.
ÙwÚ
ÙwÚ3mo ago
oh yeah my bad, nvm that, looks like database is the correct hostname tho, since you got srver misbehaving this time I'd say double check your port, im running postgres 16 and it default to 5432 if that didnt work, idk man, out of idea, network suck
Konstantine
KonstantineOP3mo ago
Yeah.. I also noticed the :53 in that error message and I'm not sure where it's getting that... yup, tailscale usually hides a lot of it, but god networking really does suck 😂
ÙwÚ
ÙwÚ3mo ago
can you check the postgres logs to see what the port it running on? then maybe added :xyz after database:
postgresql://coder:${POSTGRES_PASSWORD}@database:5432/coder?sslmode=disable
postgresql://coder:${POSTGRES_PASSWORD}@database:5432/coder?sslmode=disable
something like that
Konstantine
KonstantineOP3mo ago
It's definitely running on 5432, and doesn't look like explicitly specifying the port there does anything at least with regards to this error message
ÙwÚ
ÙwÚ3mo ago
so instead of 127.0.0.11:53 ,it misbehaving on 127.0.0.11:5432 ?
Konstantine
KonstantineOP3mo ago
no it still says 127.0.0.11:53
ÙwÚ
ÙwÚ3mo ago
wait so:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@database:5432/coder?sslmode=disable"
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@database:5432/coder?sslmode=disable"
and with
docker compose down -v && docker compose up -d
docker compose down -v && docker compose up -d
it still look up at 127.0.0.11:53 ? I was able to force change my port to 53:
coder-db |
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: starting PostgreSQL 16.8 (Debian 16.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 53
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: listening on IPv6 address "::", port 53
coder-db | 2025-07-03 23:46:07.045 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.53"
coder-db | 2025-07-03 23:46:07.052 UTC [29] LOG: database system was shut down at 2025-07-03 23:44:27 UTC
coder-db | 2025-07-03 23:46:07.062 UTC [1] LOG: database system is ready to accept connections
coder-db |
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: starting PostgreSQL 16.8 (Debian 16.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 53
coder-db | 2025-07-03 23:46:07.033 UTC [1] LOG: listening on IPv6 address "::", port 53
coder-db | 2025-07-03 23:46:07.045 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.53"
coder-db | 2025-07-03 23:46:07.052 UTC [29] LOG: database system was shut down at 2025-07-03 23:44:27 UTC
coder-db | 2025-07-03 23:46:07.062 UTC [1] LOG: database system is ready to accept connections
Konstantine
KonstantineOP3mo ago
yes (which is weird) but: if i swap out database to be 127.0.0.1 again... i get further, but then when i go to the url (tailscale-coder.monkey-byzantine.ts.net:8443), i get an https error on my browser, i proceed, and then i think i get redirected back to my host (astro.monkey-byzantine.ts.net:8443), which i think is from the access url so then i changed the access url to be tailscale-coder.monkey-byzantine.ts.net:8443, but that doesn't respond whatsoever for some reason?
ÙwÚ
ÙwÚ3mo ago
connection string with port should works, if coder still trying on port 53 you can try to add env PGPORT=53, and run with docker compose up -d --force-recreate to see what happens
Konstantine
KonstantineOP3mo ago
services:
tailscale-coder:
image: tailscale/tailscale:latest
hostname: tailscale-coder
environment:
TS_AUTH_KEY: "${TS_AUTHKEY}"
TS_EXTRA_ARGS: "--advertise-tags=tag:container"
TS_STATE_DIR: "/var/lib/tailscale"
TS_USERSPACE: "false"
volumes:
- tailscale_data:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
restart: unless-stopped

coder:
image: "ghcr.io/coder/coder:v2.18.1"
network_mode: service:tailscale-coder
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@127.0.0.1:5432/coder?sslmode=disable"
CODER_ACCESS_URL: "https://tailscale-coder.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_DISABLE_PASSWORD_AUTH: "true"
CODER_REDIRECT_TO_ACCESS_URL: "true"
CODER_TELEMETRY_ENABLE: "false"
group_add:
- "988"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
restart: unless-stopped
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: service:tailscale-coder
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
tailscale_data:
services:
tailscale-coder:
image: tailscale/tailscale:latest
hostname: tailscale-coder
environment:
TS_AUTH_KEY: "${TS_AUTHKEY}"
TS_EXTRA_ARGS: "--advertise-tags=tag:container"
TS_STATE_DIR: "/var/lib/tailscale"
TS_USERSPACE: "false"
volumes:
- tailscale_data:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
restart: unless-stopped

coder:
image: "ghcr.io/coder/coder:v2.18.1"
network_mode: service:tailscale-coder
environment:
CODER_PG_CONNECTION_URL: "postgresql://coder:${POSTGRES_PASSWORD}@127.0.0.1:5432/coder?sslmode=disable"
CODER_ACCESS_URL: "https://tailscale-coder.monkey-byzantine.ts.net:8443"
CODER_TLS_ENABLE: "true"
CODER_TLS_ADDRESS: "0.0.0.0:8443"
CODER_TLS_CERT_FILE: "/certs/astro.monkey-byzantine.ts.net.crt"
CODER_TLS_KEY_FILE: "/certs/astro.monkey-byzantine.ts.net.key"
CODER_DISABLE_PASSWORD_AUTH: "true"
CODER_REDIRECT_TO_ACCESS_URL: "true"
CODER_TELEMETRY_ENABLE: "false"
group_add:
- "988"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/klp/coder/certs:/certs:ro
restart: unless-stopped
depends_on:
database:
condition: service_healthy

database:
image: "postgres:17"
network_mode: service:tailscale-coder
environment:
POSTGRES_USER: "coder"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "coder"
volumes:
- coder_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U coder -d coder",
]
interval: 5s
timeout: 5s
retries: 5

volumes:
coder_data:
tailscale_data:
when CODER_ACCESS_URL was still https://astro.monkey-byzantine.ts.net:8443, it would at least redirect me as a response (and then die) but now as https://tailscale-coder.monkey-byzantine.ts.net:8443 it wont reply whatsoever but coder can at least talk to postgres now with the connection url but tbh this whole tailscale sidecar solution seems just atrocious this nonsense with the oauth, and i wouldn't even know where to begin with how to create https certs for this with a tailscale sidecar, the certs that it is referencing are for the host, not the container. tailscale would generate certs for tailscale-coder.monkey-byzantine.ts.net
ÙwÚ
ÙwÚ3mo ago
Why not try using tailscale as proxy, instead of having it on the same network as coder, changing access url and it works with db sound impossible, it shouldn't be related Unless there was some health chech issue.. check logs man
Konstantine
KonstantineOP3mo ago
I could be missing something but it's not clear to me how I would be using Tailscale as a proxy
ÙwÚ
ÙwÚ3mo ago
what the purpose of you using tailscale is for? isnt it to connect to other machine that connected to your tailscale instance ? so instead of network_mode: , you create a network for tailscale, and attach it to coder (so e.g networks: -tailscale), so this way you won't mess with docker dns then you can setup tailscale subnet seperately in tailscale container
Konstantine
KonstantineOP3mo ago
i use tailscale for pretty much everything in this case all im really trying to accomplish is hosting coder with docker and being able to access it from tailscale with https technically the docker compose doesn't have to know anything about tailscale and i can hit it but it'll just redirect me to one of coder's proxies which isn't ideal and i can't just throw the tailscale stuff in the access url because that blows up
ÙwÚ
ÙwÚ3mo ago
ye, so you may have to look at tailscale subnet in this case because access url with port is a bit unsettling lol back when I was using hamachi to connect things, putting my virt net ip:port into access url mess stuff up lol
Konstantine
KonstantineOP3mo ago
haha i also remember the hamachi days
ÙwÚ
ÙwÚ3mo ago
at some point trying to fix it, I just give it up and using "http://virt-ip:port" many extension dont like that tho but ye try to use networks: to attach to tailscale and setup tailscale subnet, if you dont want to put tailscale stuff to access url
Konstantine
KonstantineOP3mo ago
idk how tailscale subnets would work in this case i used to use those as like a catch-all way for me to reach things on my lan that didn't have tailscale installed i don't know how you would do something like that with Docker.. like are you talking about doing it from the host or within a container
ÙwÚ
ÙwÚ3mo ago
my reverse proxy, traefik:
docker-compose.yaml
version: "3.3"
services:
traefik:
image: "traefik:v3.3"
container_name: "traefik"
#STUFF HERE
networks:
- rproxy-traefik
restart: always

networks:
rproxy-traefik:
name: rproxy-traefik
driver: bridge
docker-compose.yaml
version: "3.3"
services:
traefik:
image: "traefik:v3.3"
container_name: "traefik"
#STUFF HERE
networks:
- rproxy-traefik
restart: always

networks:
rproxy-traefik:
name: rproxy-traefik
driver: bridge
my coder compose:
docker-compose.yaml
services:
coder:
container_name: coder
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
#STUFF HERE
restart: unless-stopped
depends_on:
database:
condition: service_healthy
networks:
- default
- rproxy-traefik

database:
container_name: coder-db
image: "postgres:16"
#STUFF HERE
restart: unless-stopped
networks:
- default
networks:
default:
rproxy-traefik:
external: true
docker-compose.yaml
services:
coder:
container_name: coder
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
#STUFF HERE
restart: unless-stopped
depends_on:
database:
condition: service_healthy
networks:
- default
- rproxy-traefik

database:
container_name: coder-db
image: "postgres:16"
#STUFF HERE
restart: unless-stopped
networks:
- default
networks:
default:
rproxy-traefik:
external: true
No description
ÙwÚ
ÙwÚ3mo ago
thats my setup well something like that, but instead of traefik you switch to tailscale container? and then just do subnet as how you usually does it, since coder container doesnt have tailscale install so you have a dedicated tailscale container to run subnet
Phorcys
Phorcys3mo ago
hey @Konstantine trying to catch up -- is your issue fixed?
Konstantine
KonstantineOP3mo ago
just unsure at this point as to whether or not there’s any way to be accessing coder via my tailnet without a sidecar otherwise that’s it
Phorcys
Phorcys3mo ago
in your setup i don't think so no since you depend on the tailscale DNS name
Konstantine
KonstantineOP3mo ago
got it—thanks
Phorcys
Phorcys2mo ago
@Konstantine closing this since i think it should be good but don't hesitate to follow up!
Codercord
Codercord2mo ago
@Phorcys closed the thread.

Did you find this page helpful?