# \#consul

**URL:** https://community.fly.io/tag/consul/29.md

[Latest](https://community.fly.io/latest.md) · [Categories](https://community.fly.io/categories.md) · [Tags](https://community.fly.io/tags.md)

---

## [Adding a sidecar to an app ruins Consul connectivity](https://community.fly.io/t/adding-a-sidecar-to-an-app-ruins-consul-connectivity/28914)

<div class="topic-metadata">

**Author:** [@c43721](https://community.fly.io/u/c43721)\
**Replies:** 1\
**Last updated:** [October 25, 2026, 2:19am UTC](https://community.fly.io/t/adding-a-sidecar-to-an-app-ruins-consul-connectivity/28914 "2026-10-25T02:19:08Z")

</div>

I have an app that used to just run one machine with no added sidecars. It used Consul for LiteFS. When I tried to add a sidecar, I noticed that the machine would not start due to the following log: ord \[info\]level=INFO…

---

## [Unmanaged Postgres recovery from snapshot - Consul error](https://community.fly.io/t/unmanaged-postgres-recovery-from-snapshot-consul-error/28869)

<div class="topic-metadata">

**Author:** [@limaantonio](https://community.fly.io/u/limaantonio)\
**Replies:** 2\
**Last updated:** [October 20, 2026, 5:42am UTC](https://community.fly.io/t/unmanaged-postgres-recovery-from-snapshot-consul-error/28869 "2026-10-20T05:42:37Z")

</div>

Hi Fly Team, My app upg-tranquil-coral-757 was hosted in GRU and suffered from the recent hardware failure. I managed to create a new volume in IAD from a recent snapshot (vol\_4912z9037n0k00or). However, when I try to r…

---

## [LiteFS + Consul lease stuck with "No cluster leader" after a machine vm-size change](https://community.fly.io/t/litefs-consul-lease-stuck-with-no-cluster-leader-after-a-machine-vm-size-change/28395)

<div class="topic-metadata">

**Author:** [@veeshi](https://community.fly.io/u/veeshi)\
**Replies:** 3\
**Last updated:** [August 1, 2026, 1:48pm UTC](https://community.fly.io/t/litefs-consul-lease-stuck-with-no-cluster-leader-after-a-machine-vm-size-change/28395 "2026-08-01T13:48:38Z")

</div>

We have a multi-machine Fly app (4 machines across two regions) using LiteFS with a Consul-based lease (\`lease.type: consul\` in litefs.yml, stock \`flyio/litefs:0.5\`). Since a \`fly machine update --vm-size \` on one of ou…

---

## [How do I create a single instance app with at-most-once guarantee?](https://community.fly.io/t/how-do-i-create-a-single-instance-app-with-at-most-once-guarantee/26754)

<div class="topic-metadata">

**Author:** [@tomaso](https://community.fly.io/u/tomaso)\
**Replies:** 4\
**Last updated:** [January 9, 2026, 1:51pm UTC](https://community.fly.io/t/how-do-i-create-a-single-instance-app-with-at-most-once-guarantee/26754 "2026-01-09T13:51:00Z")

</div>

Sorry for resurrecting How do I create a single instance app without using "fly scale count"? , but that topic is closed. Reading the Corrosion Blog Post, it seems that there is no global locking and a “bidding model”, …

---

## [LiteFS sync fail](https://community.fly.io/t/litefs-sync-fail/26262)

<div class="topic-metadata">

**Author:** [@mostafatouny](https://community.fly.io/u/mostafatouny)\
**Replies:** 5\
**Last updated:** [October 21, 2025, 9:29pm UTC](https://community.fly.io/t/litefs-sync-fail/26262 "2025-10-21T21:29:15Z")

</div>

Hello, I deployed my app using LiteFS, and the following scenario fails the syncronization: machine 1 machine 2 are stopped. user requests the app. machine 1 starts for serving. machine 1 receives post request machien…

---

## [Cannot init consul - server misbehaving](https://community.fly.io/t/cannot-init-consul-server-misbehaving/25875)

<div class="topic-metadata">

**Author:** [@timothym](https://community.fly.io/u/timothym)\
**Replies:** 7\
**Last updated:** [September 9, 2025, 5:24pm UTC](https://community.fly.io/t/cannot-init-consul-server-misbehaving/25875 "2025-09-09T17:24:35Z")

</div>

Deployments and health checks have started to consistently fail for one of my apps (starting just today) ERROR: cannot init consul: cannot connect to consul: register node "\*\*\*\*\*\*\*\*\*\*\*-z4k69dz36x0qp5mx/litefs": Put "htt…

---

## [Adding flycast to a legacy stolon-based postgres, no IP?](https://community.fly.io/t/adding-flycast-to-a-legacy-stolon-based-postgres-no-ip/24445)

<div class="topic-metadata">

**Author:** [@scottohara](https://community.fly.io/u/scottohara)\
**Replies:** 4\
**Last updated:** [April 4, 2025, 12:10am UTC](https://community.fly.io/t/adding-flycast-to-a-legacy-stolon-based-postgres-no-ip/24445 "2025-04-04T00:10:00Z")

</div>

I have a stolon-based postgres app that has recently started having some connection issues (PQConsumeInput() server closed the connection unexpectedly) from my Rails app (also deployed in Fly.io). I’m not sure yet why t…

---

## [Infrastructure Log for Jan 12–18 - blue-green failures, health checks, 6PN address stability, decentralization](https://community.fly.io/t/infrastructure-log-for-jan-12-18-blue-green-failures-health-checks-6pn-address-stability-decentralization/23631)

<div class="topic-metadata">

**Author:** [@mayailurus](https://community.fly.io/u/mayailurus)\
**Replies:** 0\
**Last updated:** [January 23, 2025, 11:28pm UTC](https://community.fly.io/t/infrastructure-log-for-jan-12-18-blue-green-failures-health-checks-6pn-address-stability-decentralization/23631 "2025-01-23T23:28:10Z")

</div>

The Infrastructure Log tends to fly under people’s radars, which is unfortunate, since it’s a good way to learn more about the details and root causes of past incidents—as well as to hear about many upcoming changes in a…

---

## [Consul either redirects into a 404 or gives me "Moved Permanently" when connecting via curl](https://community.fly.io/t/consul-either-redirects-into-a-404-or-gives-me-moved-permanently-when-connecting-via-curl/23307)

<div class="topic-metadata">

**Author:** [@Waffleophagus](https://community.fly.io/u/Waffleophagus)\
**Replies:** 0\
**Last updated:** [January 5, 2025, 2:55am UTC](https://community.fly.io/t/consul-either-redirects-into-a-404-or-gives-me-moved-permanently-when-connecting-via-curl/23307 "2025-01-05T02:55:29Z")

</div>

I’ll try and keep it short but sweet, I’m attempting to check and some key/value stores via a small script on server start and am running off a pretty stock container right now so consul is not installed. If you believe …

---

## [Consul Sessions not working?](https://community.fly.io/t/consul-sessions-not-working/21989)

<div class="topic-metadata">

**Author:** [@AstraLuma](https://community.fly.io/u/AstraLuma)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 3:11pm UTC](https://community.fly.io/t/consul-sessions-not-working/21989 "2024-09-23T15:11:29Z")

</div>

Ok, I’m experimenting with fly consul, and I need sessions and locks. When I try to create an (appropriate prefixed) session, I just get 403 errors. In both Go (official client) and Python (py-consul). KV works. The ses…

---

## [Global consul vs global etcd](https://community.fly.io/t/global-consul-vs-global-etcd/21910)

<div class="topic-metadata">

**Author:** [@AstraLuma](https://community.fly.io/u/AstraLuma)\
**Replies:** 0\
**Last updated:** [September 17, 2024, 2:53pm UTC](https://community.fly.io/t/global-consul-vs-global-etcd/21910 "2024-09-17T14:53:33Z")

</div>

There’s now two experimental options for adding managed consul and managed etcd. There’s some forum and blog posts about consul, which kinda imply that consul is kinda slow? (changes take seconds to commit). There’s no…

---

## [Updating litefs.yml lease consul key resets my data](https://community.fly.io/t/updating-litefs-yml-lease-consul-key-resets-my-data/21053)

<div class="topic-metadata">

**Author:** [@dalpal07](https://community.fly.io/u/dalpal07)\
**Replies:** 6\
**Last updated:** [August 1, 2024, 8:22pm UTC](https://community.fly.io/t/updating-litefs-yml-lease-consul-key-resets-my-data/21053 "2024-08-01T20:22:21Z")

</div>

I ran into an issue where a prisma schema update caused deployments to fail on my live database. Whenever I deployed, I would get an infinite repeat of the following logs: level=INFO msg="cannot find primary, retrying: …

---

## [Is there an issue with Consul](https://community.fly.io/t/is-there-an-issue-with-consul/20466)

<div class="topic-metadata">

**Author:** [@deano-fury](https://community.fly.io/u/deano-fury)\
**Replies:** 2\
**Last updated:** [June 21, 2024, 11:42pm UTC](https://community.fly.io/t/is-there-an-issue-with-consul/20466 "2024-06-21T23:42:18Z")

</div>

I have been getting strange errors in my logs for one of my apps for the past 12 hours http: POST /stream: error: lease expired cannot remove lease: Unexpected response code: 500 (No cluster leader) primary lease lost…

---

## [enable\_consul does not result in FLY\_CONSUL\_URL env var present](https://community.fly.io/t/enable-consul-does-not-result-in-fly-consul-url-env-var-present/19086)

<div class="topic-metadata">

**Author:** [@justinb](https://community.fly.io/u/justinb)\
**Replies:** 1\
**Last updated:** [April 2, 2024, 10:27pm UTC](https://community.fly.io/t/enable-consul-does-not-result-in-fly-consul-url-env-var-present/19086 "2024-04-02T22:27:40Z")

</div>

I added experimental.enable\_consul to my fly.toml but I do not see the FLY\_CONSUL\_URL on my machine when I ssh into it and do a printenv. I found this out because I got the error described in these docs even on a fresh m…

---

## [Database no longer synced by litefs after issue deploying](https://community.fly.io/t/database-no-longer-synced-by-litefs-after-issue-deploying/18761)

<div class="topic-metadata">

**Author:** [@tacomanator](https://community.fly.io/u/tacomanator)\
**Replies:** 1\
**Last updated:** [March 17, 2024, 1:58am UTC](https://community.fly.io/t/database-no-longer-synced-by-litefs-after-issue-deploying/18761 "2024-03-17T01:58:03Z")

</div>

I’ve managed to break a production app database syncing. Database writes seem to be happening locally and are not synced to litefs. litefs export returns database pre-data-changes. I’m looking for advice on steps to tro…

---

## [Consul Key/Id Question](https://community.fly.io/t/consul-key-id-question/18582)

<div class="topic-metadata">

**Author:** [@brady-vb](https://community.fly.io/u/brady-vb)\
**Replies:** 0\
**Last updated:** [March 6, 2024, 5:59pm UTC](https://community.fly.io/t/consul-key-id-question/18582 "2024-03-06T17:59:05Z")

</div>

Long story short I Ran a custom sql query against my litefs managed db Its transaction hash of some sort got out of sync, killed my app After trying 100 things i deleted all machines/volumes, still couldnt deploy I cha…

---

## [panic: FLY\_CONSUL\_URL or CONSUL\_URL are required with postgres-ha deploy](https://community.fly.io/t/panic-fly-consul-url-or-consul-url-are-required-with-postgres-ha-deploy/17991)

<div class="topic-metadata">

**Author:** [@juliancarrivick](https://community.fly.io/u/juliancarrivick)\
**Replies:** 1\
**Last updated:** [February 6, 2024, 7:27am UTC](https://community.fly.io/t/panic-fly-consul-url-or-consul-url-are-required-with-postgres-ha-deploy/17991 "2024-02-06T07:27:19Z")

</div>

Hi there, I recently realised that my postgres-ha app hasn’t had any volumes attached since I transitioned from Nomad to the Machines architecture and I am trying to remedy that. I’ve verified I have the appropriate mo…

---

## [Issues connecting to Consul with LiteFS](https://community.fly.io/t/issues-connecting-to-consul-with-litefs/17167)

<div class="topic-metadata">

**Author:** [@davew](https://community.fly.io/u/davew)\
**Replies:** 6\
**Last updated:** [December 7, 2023, 5:55pm UTC](https://community.fly.io/t/issues-connecting-to-consul-with-litefs/17167 "2023-12-07T17:55:53Z")

</div>

Hi, We did a new deploy this morning on one of our applications that uses LiteFS with a consul lease setup. On startup, the app halts with: 2023-12-07T14:14:29.445 app\[4d891155f62728\] yyz \[info\] config file read from /…

---

## [Postgres having issues: \`cannot create kv store\`](https://community.fly.io/t/postgres-having-issues-cannot-create-kv-store/17161)

<div class="topic-metadata">

**Author:** [@hypeed](https://community.fly.io/u/hypeed)\
**Replies:** 4\
**Last updated:** [December 7, 2023, 5:53pm UTC](https://community.fly.io/t/postgres-having-issues-cannot-create-kv-store/17161 "2023-12-07T17:53:27Z")

</div>

We are seeing very severe errors in our Postgres cluster right now. I’ve researched past posts and it seems like it’s typically due to errors on the Fly.io side. Can someone please assist? Our entire service is failing a…

---

## [Newly added machines take over as cluster primary?](https://community.fly.io/t/newly-added-machines-take-over-as-cluster-primary/15544)

<div class="topic-metadata">

**Author:** [@tacomanator](https://community.fly.io/u/tacomanator)\
**Replies:** 1\
**Last updated:** [September 22, 2023, 11:21am UTC](https://community.fly.io/t/newly-added-machines-take-over-as-cluster-primary/15544 "2023-09-22T11:21:55Z")

</div>

I’m trying to setup an app with SQLite and LiteFS/fuse on Fly.io. The app works with a single machine but I’m having trouble with the consul/LiteFS setup when adding a second machine. Looking at the logout when adding a…

---

## [Sharing consul service between apps](https://community.fly.io/t/sharing-consul-service-between-apps/15378)

<div class="topic-metadata">

**Author:** [@matty-f](https://community.fly.io/u/matty-f)\
**Replies:** 4\
**Last updated:** [September 14, 2023, 12:29pm UTC](https://community.fly.io/t/sharing-consul-service-between-apps/15378 "2023-09-14T12:29:47Z")

</div>

Hi there, is it possible to share a consul instance between two apps? I’ve tried attaching consul to one app, and then trying to connect to that consul instance from another app but the connection is reset

---

## [Consul: Context Deadline Exceeded](https://community.fly.io/t/consul-context-deadline-exceeded/15120)

<div class="topic-metadata">

**Author:** [@liamkinne](https://community.fly.io/u/liamkinne)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 6:48am UTC](https://community.fly.io/t/consul-context-deadline-exceeded/15120 "2023-08-31T06:48:24Z")

</div>

I am getting the following error intermittently with one of the instances of my Grafana Mimir deployment. It will get this error a few times in a row causing that replica to drop out of the ring and restart. "Get \\"htt…

---

## [Failed to migrate postgres to appsv2 due to FRA region restriction, postgres read-only and does not perform a failover](https://community.fly.io/t/failed-to-migrate-postgres-to-appsv2-due-to-fra-region-restriction-postgres-read-only-and-does-not-perform-a-failover/13955)

<div class="topic-metadata">

**Author:** [@tofran](https://community.fly.io/u/tofran)\
**Replies:** 2\
**Last updated:** [July 27, 2023, 11:19pm UTC](https://community.fly.io/t/failed-to-migrate-postgres-to-appsv2-due-to-fra-region-restriction-postgres-read-only-and-does-not-perform-a-failover/13955 "2023-07-27T23:19:16Z")

</div>

I have been trying to migrate a Postgres cluster to the new apps v2, but the manual migrate-to-v2 did not work because I have volumes in the fra region and I’m not subscribed to any plan. I could have paid the support f…

---

## [Small consul cluster + litefs failover](https://community.fly.io/t/small-consul-cluster-litefs-failover/11734)

<div class="topic-metadata">

**Author:** [@tj1](https://community.fly.io/u/tj1)\
**Replies:** 3\
**Last updated:** [March 28, 2023, 10:23pm UTC](https://community.fly.io/t/small-consul-cluster-litefs-failover/11734 "2023-03-28T22:23:31Z")

</div>

Hoping to get some input on setting up a small consul cluster for litefs on v2 apps since the FLY\_CONSUL\_URL is gone even with the experimental flag there. Litefs seems to work fine on a static lease, but I don’t want to…

---

## [Long Postgres outage (consul i/o timeout)](https://community.fly.io/t/long-postgres-outage-consul-i-o-timeout/10692)

<div class="topic-metadata">

**Author:** [@nouzlin](https://community.fly.io/u/nouzlin)\
**Replies:** 3\
**Last updated:** [February 11, 2023, 7:46am UTC](https://community.fly.io/t/long-postgres-outage-consul-i-o-timeout/10692 "2023-02-11T07:46:05Z")

</div>

Hi! Yesterday my application faced two prolonged outages, due to the postgres cluster being down/unavailable (2 nodes, “standard fly.io stolon” setup). The cluster is running in the “ams” region. The issue started 2023…

---

## [Consul returning error 509](https://community.fly.io/t/consul-returning-error-509/8767)

<div class="topic-metadata">

**Author:** [@snorrwe](https://community.fly.io/u/snorrwe)\
**Replies:** 3\
**Last updated:** [November 18, 2022, 9:34pm UTC](https://community.fly.io/t/consul-returning-error-509/8767 "2022-11-18T21:34:21Z")

</div>

I followed the getting started with LiteFS guide, I have an app in Frankfurt. Unfortunately on deploy I see this error: fra \[info\]Using Consul to determine primary fra \[info\]cannot init consul: cannot connect to consul…

---

## [litefs on fly with consul](https://community.fly.io/t/litefs-on-fly-with-consul/6496)

<div class="topic-metadata">

**Author:** [@tj1](https://community.fly.io/u/tj1)\
**Replies:** 2\
**Last updated:** [August 22, 2022, 1:47pm UTC](https://community.fly.io/t/litefs-on-fly-with-consul/6496 "2022-08-22T13:47:23Z")

</div>

Was experimenting on getting elixir running with litefs. I noticed that fly has consul available as an experimental service: Sneak peak: global lock service However, I cannot seem to get litefs (or anything to connect …
