1# TigerBeetle {#module-services-tigerbeetle}
2
3*Source:* {file}`modules/services/databases/tigerbeetle.nix`
4
5*Upstream documentation:* <https://docs.tigerbeetle.com/>
6
7TigerBeetle is a distributed financial accounting database designed for mission critical safety and performance.
8
9To enable TigerBeetle, add the following to your {file}`configuration.nix`:
10```nix
11{
12 services.tigerbeetle.enable = true;
13}
14```
15
16When first started, the TigerBeetle service will create its data file at {file}`/var/lib/tigerbeetle` unless the file already exists, in which case it will just use the existing file.
17If you make changes to the configuration of TigerBeetle after its data file was already created (for example increasing the replica count), you may need to remove the existing file to avoid conflicts.
18
19## Configuring {#module-services-tigerbeetle-configuring}
20
21By default, TigerBeetle will only listen on a local interface.
22To configure it to listen on a different interface (and to configure it to connect to other replicas, if you're creating more than one), you'll have to set the `addresses` option.
23Note that the TigerBeetle module won't open any firewall ports automatically, so if you configure it to listen on an external interface, you'll need to ensure that connections can reach it:
24
25```nix
26{
27 services.tigerbeetle = {
28 enable = true;
29 addresses = [ "0.0.0.0:3001" ];
30 };
31
32 networking.firewall.allowedTCPPorts = [ 3001 ];
33}
34```
35
36A complete list of options for TigerBeetle can be found [here](#opt-services.tigerbeetle.enable).
37
38## Upgrading {#module-services-tigerbeetle-upgrading}
39
40Usually, TigerBeetle's [upgrade process](https://docs.tigerbeetle.com/operating/upgrading) only requires replacing the binary used for the servers.
41This is not directly possible with NixOS since the new binary will be located at a different place in the Nix store.
42
43However, since TigerBeetle is managed through systemd on NixOS, the only action you need to take when upgrading is to make sure the version of TigerBeetle you're upgrading to supports upgrades from the version you're currently running.
44This information will be on the [release notes](https://github.com/tigerbeetle/tigerbeetle/releases) for the version you're upgrading to.