GhostFS
Guides

Setting Up a Server

Configure and run a GhostFS server

Setting Up a Server

Basic Server

Start a server exposing a directory:

ghostfs server --root /path/to/data --bind 0.0.0.0 --port 3444

Options:

  • --root — Directory to expose (required)
  • --bind — Address to bind (default: 127.0.0.1)
  • --port — Port to listen on (default: 3444)

Adding Users

Create user tokens for authentication:

# Add a user with a specific token
ghostfs auth add --user alice --token secrettoken123

# Add a user with auto-generated token
ghostfs auth add --user bob
# Token will be printed to stdout

User Directories

Each user is isolated to their own subdirectory under the root:

/path/to/data/
├── alice/    # Alice can only access this
└── bob/      # Bob can only access this

Token Management

# List all tokens
ghostfs auth list

# Revoke a token
ghostfs auth revoke --token secrettoken123

Running as a Service

Create a systemd service file at /etc/systemd/system/ghostfs.service:

[Unit]
Description=GhostFS Server
After=network.target

[Service]
Type=simple
User=ghostfs
ExecStart=/usr/local/bin/ghostfs server --root /data --bind 0.0.0.0
Restart=on-failure

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable ghostfs
sudo systemctl start ghostfs

On this page