# Tailscale + Fly + SSL

**URL:** <https://community.fly.io/t/tailscale-fly-ssl/11650>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [March 22, 2023, 11:32am UTC](https://community.fly.io/t/tailscale-fly-ssl/11650 "2023-03-22T11:32:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![olic](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@olic](https://community.fly.io/u/olic)\
**Post date:** [March 22, 2023, 11:32am UTC](https://community.fly.io/t/tailscale-fly-ssl/11650/1 "2023-03-22T11:32:49Z")

</div>

I followed the [Tailscale + Fly docs](https://tailscale.com/kb/1132/flydotio/) - this worked great.

However, I would like to setup TLS - if I add a `tailscale cert` command into `start.sh` this should work.

However, if I name the tailscale client `fly-app` as per the docs and then restart containers, over time I will see names like `fly-app-1`, `fly-app-2` etc.

Then the `tailscale cert` command fails because it doesn’t match.

Any ideas how to unpick this? Do I need a different approach?

(Asked at [Tailscale forums](https://forum.tailscale.com/t/tailscale-fly-ssl/4731) too, but no response)

---

<div class="post-metadata">

**Author:** ![rugwiro](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rugwiro/32/49239_2.png) [@rugwiro](https://community.fly.io/u/rugwiro)\
**Post date:** [March 22, 2023, 12:04pm UTC](https://community.fly.io/t/tailscale-fly-ssl/11650/2 "2023-03-22T12:04:37Z")

</div>

You could perhaps force a static name by starting tailscale with:

```sh
--hostname string
    	hostname to use instead of the one provided by the OS

```

Basically `tailscale up --hostname fly-app`

---

<div class="post-metadata">

**Author:** ![olic](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@olic](https://community.fly.io/u/olic)\
**Post date:** [March 22, 2023, 5:46pm UTC](https://community.fly.io/t/tailscale-fly-ssl/11650/3 "2023-03-22T17:46:30Z")

</div>

That’s exactly what’s in the docs, and what I’m doing.  
But Fly, reasonably, suffixes it where there would be duplicates.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [March 29, 2023, 5:47pm UTC](https://community.fly.io/t/tailscale-fly-ssl/11650/4 "2023-03-29T17:47:25Z")

</div>

Closed on March 29, 2023, 5:47pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
