# Hosting Uptime Kuma on Fly.io

**URL:** <https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352>\
**Category:** Show & Tell\
**Created:** [July 23, 2023, 2:36pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352 "2023-07-23T14:36:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [July 23, 2023, 2:36pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/1 "2023-07-23T14:36:32Z")

</div>

> [Uptime Kuma](https://github.com/louislam/uptime-kuma) is an easy-to-use self-hosted monitoring tool.

I’ve been using Uptime Kuma for a few projects of mine so here’s how you can host it yourself on [Fly.io](http://Fly.io).

Speedrun:

```auto
$ git clone https://github.com/lubien/fly-uptime-kuma.git
$ cd fly-uptime-kuma
$ fly launch \
  --copy-config \
  --auto-confirm \
  --ha=false \
  --name pick-an-unique-name-for-you \
  --now

```

This will **create a 1GB volume** and only one machine. If you look at the source, I’ve disabled `auto_stop_machines` and made `min_machines_running = 1` so the monitor is always up.

## Hide your Uptime Kuma from the outside world

I’m not a fan of anyone snooping my self hosted things and since the major selling point of Uptime Kuma is alerting I’ve removed public IPs from mine using `fly ips release [IP]`. You could also change the `fly launch` command above to use `--no-public-ips` so they’re never allocated.

To access a hidden uptime kuma you can easily use `fly proxy -a KUMA_APP_NAME 3333:3001` and go to [http://localhost:3333](http://localhost:3333). If you use an [WireGuard app in you computer](https://fly.io/docs/reference/private-networking/#private-network-vpn) you could also directly go to http://app\_name.internal:3001, that takes some work before you can do it but makes easier for future use.

* * *

Let me know your feedback!

Related:

- [Safely expose Uptime Kuma Status page](https://community.fly.io/t/safely-expose-uptime-kuma-status-page/26383)
- [Using Uptime Kuma to monitor volume usage](https://community.fly.io/t/using-uptime-kuma-to-monitor-volume-usage/26428)

---

<div class="post-metadata">

**Author:** ![ben-io](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ben-io/32/35648_2.png) [@ben-io](https://community.fly.io/u/ben-io)\
**Post date:** [August 15, 2023, 8:04pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/2 "2023-08-15T20:04:05Z")

</div>

Thanks! I got it running in no time.

---

<div class="post-metadata">

**Author:** ![Yaeger](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/yaeger/32/44383_2.png) [@Yaeger](https://community.fly.io/u/Yaeger)\
**Post date:** [August 16, 2023, 9:04pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/3 "2023-08-16T21:04:54Z")

</div>

That was a _very_ smooth deploy process.

I like the idea of using OSS tools for something like this. I’ve often decided against it because it’s generally a pain to deploy and keep it online but if the deployment process is so simple then it’s worth considering.

---

<div class="post-metadata">

**Author:** ![Vynce](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/vynce/32/14820_2.png) [@Vynce](https://community.fly.io/u/Vynce)\
**Post date:** [September 9, 2023, 8:04pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/4 "2023-09-09T20:04:36Z")

</div>

Thanks for sharing this! It made it super easy to get up and running.

My app has run out of RAM once or twice (using a free 256MB VM), so I’ve allocated 256MB swap by adding `swap_size_mb = 256` at the top level of the `fly.toml` file. It hasn’t been needed again yet, but should help with occasional spikes.  
[https://fly.io/docs/reference/configuration/#swap\_size\_mb-option](https://fly.io/docs/reference/configuration/#swap_size_mb-option)

---

<div class="post-metadata">

**Author:** ![Vynce](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/vynce/32/14820_2.png) [@Vynce](https://community.fly.io/u/Vynce)\
**Post date:** [September 9, 2023, 8:07pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/5 "2023-09-09T20:07:42Z")

</div>

As another private/secure access method, Uptime Kuma has built-in support for cloudflared. I used that to set up a Cloudflare tunnel with access control provided by Google authentication. This provides easy, extra secure access to Uptime Kuma without a public IP.

I launched my app with the `--no-public-ips` arg and used your `fly proxy` tip to initially tunnel in to get cloudflared set up.

---

<div class="post-metadata">

**Author:** ![hophamlam](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/hophamlam/32/16403_2.png) [@hophamlam](https://community.fly.io/u/hophamlam)\
**Post date:** [November 22, 2023, 12:32pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/6 "2023-11-22T12:32:35Z")

</div>

Thanks for your effort, I have used your job to deploy a new uptime-kuma instance, works like a champ 🥰🥰

---

<div class="post-metadata">

**Author:** ![w8emv](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/w8emv/32/16982_2.png) [@w8emv](https://community.fly.io/u/w8emv)\
**Post date:** [February 1, 2024, 4:51am UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/7 "2024-02-01T04:51:09Z")

</div>

> [@lubien](#):
>
> ```auto
> $ fly launch \
> --copy-config \
> --auto-confirm \
> --ha=false \
> --now
> 
> ```

When I do this just as directed, I get this error message

> [@](#):
>
> Error: Validation failed: Name has already been taken

All the good names are already taken of course, so I relaunched with the `--name` flag and a unique name and all looks to be well so far.

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [February 1, 2024, 12:11pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/8 "2024-02-01T12:11:02Z")

</div>

Thanks for the heads up, I’ve updated the original post now 🙏

---

<div class="post-metadata">

**Author:** ![dolhescu](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/dolhescu/32/18092_2.png) [@dolhescu](https://community.fly.io/u/dolhescu)\
**Post date:** [February 15, 2024, 6:32am UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/9 "2024-02-15T06:32:58Z")

</div>

Simple and efficient!

Just curious, how your config creates automatically a volume for uptime kuma? By just mentioning the mounts with double square brackets? Any references to the documentation are much appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [February 15, 2024, 10:56am UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/10 "2024-02-15T10:56:58Z")

</div>

That’s correct. Nowadays flyctl can read your toml and prepare volumes beforehand.

> **[Fly Launch configuration (fly.toml)](https://fly.io/docs/reference/configuration/#initial_size)**
>
> Documentation and guides from the team at Fly.io.

---

<div class="post-metadata">

**Author:** ![neo](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@neo](https://community.fly.io/u/neo)\
**Post date:** [May 21, 2024, 5:48pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/11 "2024-05-21T17:48:00Z")

</div>

I already have my uptime kuma up and running on my [fly.io](http://fly.io)  
But how can I upgrade it to the latest version on [fly.io](http://fly.io)?

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [May 21, 2024, 5:50pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/12 "2024-05-21T17:50:33Z")

</div>

> <https://github.com/lubien/fly-uptime-kuma/blob/main/fly.toml#L1-L2>

Changing the `image` to `louislam/uptime-kuma:1.23.13-alpine` or [something else](https://hub.docker.com/r/louislam/uptime-kuma/tags) should do the trick!

Don’t forget to `fly deploy` after

---

<div class="post-metadata">

**Author:** ![127001](https://avatars.discourse-cdn.com/v4/letter/1/b19c9b/32.png) [@127001](https://community.fly.io/u/127001)\
**Post date:** [November 15, 2024, 7:53pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/14 "2024-11-15T19:53:13Z")

</div>

Is the `Dockerfile` for the image available?

(reposting because I accidentally clicked the delete button above)

---

<div class="post-metadata">

**Author:** ![lubien](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/lubien/32/41919_2.png) [@lubien](https://community.fly.io/u/lubien)\
**Post date:** [November 19, 2024, 11:59am UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/15 "2024-11-19T11:59:59Z")

</div>

Howdy. There is and its the official one `louislam/uptime-kuma:1`

> **[uptime-kuma/docker at master · louislam/uptime-kuma](https://github.com/louislam/uptime-kuma/tree/master/docker)**
>
> A fancy self-hosted monitoring tool. Contribute to louislam/uptime-kuma development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![127001](https://avatars.discourse-cdn.com/v4/letter/1/b19c9b/32.png) [@127001](https://community.fly.io/u/127001)\
**Post date:** [November 19, 2024, 9:34pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/16 "2024-11-19T21:34:18Z")

</div>

Thanks, I’ll check it out.

---

<div class="post-metadata">

**Author:** ![Danialsx](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@Danialsx](https://community.fly.io/u/Danialsx)\
**Post date:** [March 3, 2025, 3:59pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/17 "2025-03-03T15:59:32Z")

</div>

Hey guys, I’m also trying to run Uptime Kuma however getting the below after I run the docker compose file:

```auto
ERROR: for uptime-kuma Cannot start service uptime-kuma: OCI runtime create failed: 
container_linux.go:380: starting container process caused: exec: "curl": executable file not found in $PATH: unknown

```

The docker compose file I used is from the [Uptime Kuma website](https://uptimekuma.org/), would using wget fix this? Thank you.

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [March 3, 2025, 9:31pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/18 "2025-03-03T21:31:41Z")

</div>

Are you running `docker compose build` locally? Would you post your build output here?

(Fly does not directly support `docker-compose.yml` files, but per the posts in this thread, you can get the system running in Fly, using the TOML config file format).

---

<div class="post-metadata">

**Author:** ![Danialsx](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@Danialsx](https://community.fly.io/u/Danialsx)\
**Post date:** [March 4, 2025, 12:31am UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/19 "2025-03-04T00:31:02Z")

</div>

Do you mean the docker-compose file? (ignore my stupidity lol)

---

<div class="post-metadata">

**Author:** ![halfer](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@halfer](https://community.fly.io/u/halfer)\
**Post date:** [March 4, 2025, 7:24pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/20 "2025-03-04T19:24:42Z")

</div>

I don’t understand your question. Fly doesn’t use Docker Compose files.

Let me ask about your problem a different way. How did you run the Docker Compose file, and where did you do that thing? Did you run that on the console in your laptop/computer?

---

<div class="post-metadata">

**Author:** ![Danialsx](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@Danialsx](https://community.fly.io/u/Danialsx)\
**Post date:** [March 5, 2025, 12:46pm UTC](https://community.fly.io/t/hosting-uptime-kuma-on-fly-io/14352/21 "2025-03-05T12:46:02Z")

</div>

Hi, I just noticed where I was wrong 🥲 I ran the following file locally but I wanted to run it on Fly, lubiens response above had the answer in front of me 😃

````auto
version: "3.8"

services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: always
    ports:
      - "3001:3001" # This maps the container port "3001" to the host port "3001"
    volumes:
      - /path/to/data:/app/data # Configuring persistent storage
    environment:
      - TZ=UTC # Set the timezone (change to your preferred local timezone so monitoring times are the same)
      - UMASK=0022 # Set your file permissions manually
    networks:
      - kuma_network # add your own custom network config
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3001"]
      interval: 30s
      retries: 3
      start_period: 10s
      timeout: 5s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

networks:
  kuma_network:
    driver: bridge```

````

docker-compose up -d

```auto

```
