A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
---
# SPDX-License-Identifier: AGPL-3.0-or-later
title: Self-hosting
description: Install your own Fluxer instance on one machine with rexctl.
sidebar:
label: Install
---
rexctl installs Fluxer on one machine and keeps it running. To run Fluxer on a Kubernetes cluster, use the [Helm chart](/operator/kubernetes/).
## What you need
- A 64-bit Linux, macOS or Windows machine with at least 4 GB of memory. Before it installs, rexctl checks the free disk space and tells you how much this install needs. rexctl sizes Fluxer to the machine's memory and CPUs every time it starts, and a bigger machine needs no extra settings.
- On macOS and Windows, [Docker Desktop](https://docs.docker.com/desktop/). On Linux, rexctl installs Docker for you if it's missing.
- A domain or subdomain for your instance, such as `chat.example.com`.
- An `A` record for that domain pointing to the machine's public IP address. rexctl checks it before it asks for a certificate.
Open TCP ports 80, 443 and 7881 and UDP ports 443 and 7882 in any firewall outside the machine, such as your hosting provider's firewall. On a home network, forward the same ports from your router to the machine. rexctl can open them in the machine's own firewall for you.
## Install
On Linux or macOS:
```sh
curl -fsSL https://fluxer.dev/install.sh | sh
```
On Windows, run this in PowerShell:
```powershell
irm https://fluxer.dev/install.ps1 | iex
```
On Linux or macOS, start the install with this command to put your own reverse proxy, such as Caddy or nginx, in front of Fluxer.
```sh
curl -fsSL https://fluxer.dev/install.sh | sh -s -- install --behind-proxy --bind 127.0.0.1:8080
```
Fluxer then listens on `127.0.0.1:8080` for your proxy. The plain install command also asks whether you want this when another program already uses port 80 or 443 on the machine.
The script downloads rexctl and starts it. Answer its questions, and when it's done, rexctl prints your instance's address.
rexctl asks where you want to create your admin account. "Here in the terminal" creates it during the install. "In my browser" prints a setup token at the end, and your instance asks for that token the first time you open it. If you lose the token, run `rexctl setup token` to show it again.
Once you've created the admin account, people can open your instance's address in a browser or enter it in the desktop and mobile apps.
## Without a public IP address
Behind CGNAT, or anywhere you can't forward ports, serve Fluxer through a tunnel such as Cloudflare Tunnel. Start the install with the [`--behind-proxy` command](#install) and point the tunnel at `http://127.0.0.1:8080`. In this mode rexctl only checks that this machine can look up your domain, and it warns instead of stopping when it can't.
For a Tor, I2P or Lokinet address, or a name ending in `.alt`, also use `--behind-proxy` and point the tunnel at `http://127.0.0.1:8080`. rexctl doesn't check DNS for these names because public DNS can't look them up. Tor and I2P browsers open `.onion` and `.i2p` addresses over plain HTTP, and rexctl makes Fluxer use http links for them. For a Lokinet or `.alt` address that people open over plain HTTP, run `rexctl config set FLUXER_PUBLIC_SCHEME=http` after the install. Some features don't work without HTTPS, as [Without HTTPS](#without-https) explains.
Calls don't go through a tunnel, and they need a TURN server on a machine with a public address, as [Voice behind a tunnel](/operator/reverse-proxy/#voice-behind-a-tunnel) explains.
To run Fluxer only on your own network, use a name that isn't on the public internet, such as `chat.home.arpa` or `fluxer.internal`. rexctl skips the DNS check for names like these. It doesn't take an IP address or a name without a dot, such as `localhost`. Make the name resolve to the machine on every device, through your router's DNS or each device's hosts file. Only devices on your network can open the instance.
Fluxer gets certificates for names ending in `.home.arpa`, `.internal`, `.local` or `.localhost` from its own local certificate authority. Browsers and apps don't trust it until you install its root certificate on each device. This command copies the root certificate out of the instance.
```sh
docker cp "$(docker ps --format '{{.Names}}' | grep -m1 edge)":/data/caddy/pki/authorities/local/root.crt fluxer-root.crt
```
For any other private name, run `rexctl config set FLUXER_EDGE_TLS internal` to use the same local certificate authority.
## Without HTTPS
Browsers turn off some features on sites that don't use HTTPS, unless the site is on `localhost`. On an instance that people open over plain HTTP, such as a Tor or I2P address, the web app can't use these features.
- Passkeys
- Microphone, camera and screen sharing. People can still join voice channels and listen.
- End-to-end encrypted calls
- Notifications and push notifications
- Opening the web app while offline
- Installing the web app
Everything else works over plain HTTP, including signing up, signing in, messages, uploads and the admin panel.
## Where Fluxer keeps its files
Fluxer uses three places on the machine:
- The instance folder has your settings, the files rexctl makes for Docker and your backups. It's `/opt/fluxer` when you install as root and `~/fluxer` otherwise.
- Docker's data root has the images and all of Fluxer's data, such as the database, uploads and search index. It's `/var/lib/docker` on most Linux machines.
- The backup folder is `backups` in the instance folder unless you choose another one with `rexctl backup location <folder>`.
Before the install, rexctl checks free space on the disk with the instance folder and on the disk with Docker's data root, and says which one is short and by how much.
To put Fluxer on a second drive, set `data-root` in `/etc/docker/daemon.json` to a folder on that drive and restart Docker before you install. Docker then keeps the images and data on that drive. Start the install with `--dir` and a folder on the same drive.
```sh
curl -fsSL https://fluxer.dev/install.sh | sh -s -- install --dir /mnt/data/fluxer
```
## After you install
Once your instance is running, these pages help you look after it.
- [Run your instance](/operator/running/) to upgrade, back up and manage people.
- [Put Fluxer behind your own proxy](/operator/reverse-proxy/) if another web server on the machine already uses ports 80 and 443.
- The [rexctl reference](/operator/rexctl/) lists every command and flag.
If you get stuck, ask in [Fluxer Developers](https://fluxer.gg/fluxer-developers) or report a bug on [Fluxer Feedback](https://feedback.fluxer.com).