[Self-Hosted] Gateway NATS connection lost, reconnecting on new (and existing) instances

(#904) Bug Fixed self-hosting

Observed behaviour

After creating a new Fluxer instance, I am almost able to complete the setup. However, pressing the "Finish setup" button at the end of setup states "Service unavailable." After updating an existing Fluxer instance, I am able to login and occasionally view some information, such as messages, on the instance. However, I am unable to send any messages, for example, and I showcase this (at least partially) on the new instance. I expect the setup and interface to work as usual.

Reproduction steps

(1-8 is a bit more setup-specific and was performed on both the working instance (a while back) and the new VM I created today for this issue, so you may want to start at 9)
  1. Install Alpine Linux (on a VM in my case; 4 cores, 8GB memory, and 32GB disk, exactly the same as my working instance)
  2. Install Caddy from community repository (only used to get the caddy user account setup; this is just something I do for every service): apk add caddy
  3. Remove caddy: apk del caddy
  4. Install caddy-openrc: apk add caddy-openrc
  5. Install Caddy (with Cloudflare support in my case) and configure it
  6. Install Docker: apk add docker docker-cli-compose
  7. Set Caddy and Docker to run at system startup (probably not required): rc-update add caddy default; rc-update add docker default
  8. Start Caddy and Docker: rc-service caddy start; rc-service docker start
  9. Get the latest install.sh script (I am in /root): curl -fsSLO https://fluxer.dev/install.sh; curl -fsSLO https://fluxer.dev/install.sh.sha256; sha256sum -c install.sh.sha256
  10. Make install.sh executable: chmod +x install.sh
  11. Run sh install.sh --domain chat-test.example.com --email someaddress@example.com --tls proxy --allow-root (I will note that there was a slight hiccup where fluxer-api-1 reported as unhealthy on the first startup, but this seemed to be a one-off thing as down and up appeared fixed that, allowing me to see the setup page; I have attached a separate log file from only the first startup of api as it might be another bug)
  12. Complete the setup and press "Finish setup"
  13. Observe "Service unavailable."
  14. Observe (in logs) Gateway NATS pool slot connected, Gateway NATS pool slot connection lost, reconnecting, and Gateway NATS RPC connection error, reconnecting
  15. Observe that, if you refresh the page, you might be placed into the usual interface, but attempting to view messages or perform actions does not work, at least without a page refresh each time (which may not work either)
--- Adding on to 12-13, enabling single-community mode (as I have on my main Fluxer instance) is how I found that "Service unavailable" message. However, if you do not enable single-community mode, you will not see the message in that spot, and you are placed into the usual main interface (where you see friends). But, when you try to create a community, for example, you will see it there. Although the message shows up, it appears that a refresh of the page would fetch the new community with its default channels (although you cannot fetch messages, even if you send a message and refresh). In addition, when you create a personal note, you will receive an error message, but refreshing the page also appears to show the new note. My experience has been that you can perform some actions, but your client will not receive anything back from the Fluxer server (perhaps the gateway?) "live;" rather, you need to refresh the page (which, again, may not work).

Build information

Stable Web 2026.1003.184159, Linux (x86), Chrome 153.0.0.0, Locale en-US

Platform

Self-hosting

Details

Single Community Enabled

image This log file includes what occurred when trying to setup with single-community mode enabled: setup-with-single-community-mode-enabled.log

Community

During creation: image After refresh: image

Personal Notes

During creation: image After refresh: image This log file includes what occurred when setting up without enabling single-community mode and then attempting to create a community and personal note (I used a backup of the VM to return to before I first used the install.sh command, effectively starting back at step 11 above): no-single-community-create-community-and-personal-message.log

API service issue

This log file includes the fluxer-api-1 issue I noted when using install.sh for the first time (this only includes the api service logs): api-first-use.log
  • 664859547-f17d4835-8055-464f-8980-3bacc14278e9.png

    664859547-f17d4835-8055-464f-8980-3bacc14278e9.png

    584×728 | 82 kB

  • 664882730-1a09fedb-fd2c-400a-8ba1-03b4800dbac0.png

    664882730-1a09fedb-fd2c-400a-8ba1-03b4800dbac0.png

    584×728 | 36 kB

  • 664899617-792663d4-a10c-4e72-946b-6845ca289483.png

    664899617-792663d4-a10c-4e72-946b-6845ca289483.png

    1899×953 | 115 kB

  • 664882729-4f03fb81-862a-447f-ad25-665254c5d4aa.png

    664882729-4f03fb81-862a-447f-ad25-665254c5d4aa.png

    1124×690 | 29 kB

  • 664899616-724e48bd-115f-4449-bcc7-08285f8a301e.png

    664899616-724e48bd-115f-4449-bcc7-08285f8a301e.png

    1899×953 | 64 kB

5 comments

Sign in with Fluxer to comment and vote.
Comment by @MonkeyMatrix
RexSystem 1 vote originally by @MonkeyMatrix on GitHub OP
The main (working) Fluxer instance notes the following: Stable Web 2026.924.214010, Linux (x86), Chrome 153.0.0.0, Locale en-US
Comment by Hampus
HampusStaff 1 vote originally by @hampus-fluxer on GitHub
This should be fixed via #3189, there are pending builds for the new API and Gateway images running, feel free to see if you can still reproduce this when updating to those as soon as they have finished building!
Comment by @MonkeyMatrix
RexSystem 1 vote originally by @MonkeyMatrix on GitHub OP
Thanks! It looks like the installation works now. I will start trying to test the upgrade on the main instance now and see how it goes.
Comment by @MonkeyMatrix
RexSystem 1 vote originally by @MonkeyMatrix on GitHub OP
It looks like everything in this issue is taken care of on my main instance! Unfortunately, I only found this issue while trying to figure out what was wrong with push notifications as they were only working prior to a different update (something with DNS; I am not sure if the DNS override I tried applying as a fix is being accounted for or not, and I am simply trying to use Cloudflare's 1.1.1.1), but I will try to make an issue soon on that. Thanks again for the quick fix!