Two-User Model
There are two users involved in running Firedancer:1. Startup User
The user that launchesfdctl - typically root.
Required for:
- Starting the validator (
fdctl run) - System configuration (
fdctl configure) - Setting up kernel bypass networking
- Configuring huge pages and kernel parameters
- Most commands require root privileges
- Some commands can run with specific capabilities (not recommended)
- The
checkmode never requires privileges
2. Runtime User
The user Firedancer switches to after privileged initialization - specified in yourconfig.toml.
Example configuration:
- Should be a minimally privileged user
- Must never be root or another superuser
- Should not be in the sudoers file
- Should have no special privileges or capabilities
- Only needs read access to configuration files and keypairs
- Needs write access to ledger and snapshots directories
Only
fdctl run and fdctl monitor switch to the non-privileged user. Other commands run as the startup user until completion.Creating the Runtime User
Create a dedicated, unprivileged user for running Firedancer:- No login shell (
/bin/false) - Home directory at
/home/firedancer - No special privileges
File Permissions
Configuration Files
Your configuration file should be readable by the runtime user:Keypair Files
Validator and vote keypairs must be readable by the runtime user:Ledger Directory
The runtime user needs write access to the ledger directory:/home/<user>/.firedancer/fd1/ledger. You can customize this in your configuration.
Snapshots Directory
The runtime user needs write access for downloading and storing snapshots:Linux Capabilities
While root is recommended, advanced operators can use capabilities instead. Required capabilities vary by command. To see required capabilities for a command, run it unprivileged:Common Capability Requirements
| Operation | Required Capabilities |
|---|---|
| AF_XDP networking | CAP_SYS_ADMIN, CAP_NET_RAW |
| Kernel parameters (sysctl) | CAP_SYS_ADMIN |
| Huge page allocation | Root only (capabilities insufficient) |
| Network device configuration | Root only (capabilities insufficient) |
Security Isolation
Firedancer implements multiple layers of security isolation:Process Isolation
Every tile (component) runs in a separate process:Seccomp Filters
Tiles run with seccomp filters that restrict available system calls to only those required for operation.User Namespaces
Tiles use user namespaces for additional isolation from the host system.Dropped Capabilities
After initialization, tiles drop all unnecessary capabilities to minimize privilege.Memory Protections
Network packet memory (UMEM regions) is mapped read-only to application tiles, preventing:- Corruption of network traffic
- Tampering with packets from other tiles
Privilege Timeline
Here’s how privileges are used throughout the Firedancer lifecycle:Privileged initialization
Firedancer (as root) performs:
- Validates configuration
- Allocates huge pages
- Sets up AF_XDP networking
- Installs XDP programs
- Opens network sockets
Spawn tile processes
Each tile spawns as the runtime user with:
- Seccomp filters enabled
- User namespaces active
- Capabilities dropped
- Memory protections applied
Checking Current Privileges
Verify the startup user:Common Permission Issues
”Permission denied” when starting validator
Solution: Ensure you’re running as root:Runtime user cannot read keypairs
Solution: Fix keypair file permissions:Cannot write to ledger directory
Solution: Ensure runtime user owns the ledger directory:Configure command requires privileges
Solution: Run with sudo:check mode never requires privileges:
Best Practices
Use a dedicated user
Create a dedicated, unprivileged user for Firedancer runtime. Never use root or a user with sudo access.
Minimize file permissions
Set the most restrictive permissions possible:
- Keypairs:
600(owner read/write only) - Config:
640(owner read/write, group read) - Directories:
700(owner access only)
Launch as root directly
Use
sudo or root directly. Don’t use capabilities or setcap for the fdctl binary.Store keypairs securely
Consider using:
- Encrypted filesystems for keypair storage
- Hardware security modules (HSMs) for vote signing
- Separate disk partitions with restricted mount options
Systemd Service
When running Firedancer as a systemd service, configure privileges correctly:firedancer.service
The service starts as root (
User=root), but Firedancer will switch to the user specified in config.toml after initialization.