Docs / How-to guides

Run Two Instances on One Machine

Each instance gets its own identity and its own daemon.

When you need this

Each KeibiDrop instance is one identity and connects to one peer. A second instance gives you a second identity: to test against yourself, to demo on a single laptop, to run CI, or to hold sessions toward two different peers from one server.

Give each instance its own state

KEIBIDROP_CONFIG_DIR moves the whole state directory: config file, identity, contacts. Set a different value per instance and the two never touch each other's keys:

KEIBIDROP_CONFIG_DIR=~/.config/kd-alice ...
KEIBIDROP_CONFIG_DIR=~/.config/kd-bob   ...

Give each instance its own sockets and ports

Complete example

# Instance 1
KEIBIDROP_CONFIG_DIR=/tmp/kd-alice \
KD_SOCKET=/tmp/kd-alice.sock \
KD_INBOUND_PORT=26001 KD_OUTBOUND_PORT=26002 \
KD_SAVE_PATH=/tmp/kd-alice-files KD_NO_FUSE=1 \
kd start

# Instance 2
KEIBIDROP_CONFIG_DIR=/tmp/kd-bob \
KD_SOCKET=/tmp/kd-bob.sock \
KD_INBOUND_PORT=26003 KD_OUTBOUND_PORT=26004 \
KD_SAVE_PATH=/tmp/kd-bob-files KD_NO_FUSE=1 \
kd start

# Address a specific daemon
KD_SOCKET=/tmp/kd-alice.sock kd status

The same variables work for keibidrop-cli and the desktop app (minus KD_SOCKET, which only kd uses). The full walkthrough that uses this setup is the kd tutorial; the variable list is in the configuration reference.