Home

Running a FujiNet TNFS Server on a Mac mini: Installation, Automatic Startup and Maintenance

November 25, 2026

Mac mini on the left serving up files for Atari FujiNet users ♥Mac mini on the left serving up files for Atari FujiNet users ♥

This article documents the setup of a FujiNet TNFS server running on a 2018 Intel Mac mini. The server uses an external storage volume for its TNFS file repository and runs as a background service under macOS.

The aim is to provide a practical reference for anyone interested in running their own TNFS server, as well as a record of the configuration used by BuriedBits.

The setup includes a Python supervisor, a macOS LaunchDaemon, automatic startup, storage-volume detection and log rotation. It is designed to recover automatically after a restart, including one caused by a power interruption.

1. Overview

The BuriedBits TNFS server runs on a humble 2018 Intel Mac mini with an Intel Core i3 processor.

The TNFS server executable is tnfsd, version 26.0915.1, compiled for x86_64.

The server makes files available to FujiNet-compatible clients over the network using the TNFS protocol.

The public hostname is:

fujinet.buriedbits.org

The server listens on port 16384, using both TCP and UDP.

The installation uses three main components (download links in Section 8):

The TNFS repository is stored on an external RAID volume rather than the Mac mini’s internal drive.

2. Storage and directory structure

The TNFS server uses the BuriedBits storage volume as its file repository.

The storage volume is mounted at:

/Volumes/BuriedBits_/

The TNFS root directory is:

/Volumes/BuriedBits_/tnfs

This is the directory from which TNFS clients access the available files.

The server’s operational files are kept separately in the user’s home directory:

/Users/alexsantos/tnfs/

The current directory structure is:

/Users/alexsantos/tnfs/
│
├── .DS_Store
│
├── __pycache__/
│
├── backups/
│   └── launchdaemons/
│       ├── org.tnfs.server.plist
│       └── README.rtf
│
├── logs/
│
├── org.tnfs.server.plist
│
├── tnfs-supervisor.py
│
├── start-tnfs.sh
│
└── tnfsd

The main components are:

The active LaunchDaemon configuration is installed separately in the system-wide macOS directory:

/Library/LaunchDaemons/org.tnfs.server.plist

This is the file macOS uses to load the service automatically. The copy in the user’s home directory is retained as a backup and is not loaded automatically by macOS.

A separate directory has been created for LaunchDaemon backups and recovery documentation:

/Users/alexsantos/tnfs/backups/launchdaemons/

It currently contains README.rtf, which explains the purpose of the backup and provides instructions for restoring the LaunchDaemon configuration.

Keeping the TNFS repository on the external storage volume and the server’s operational files in the home directory separates the data being served from the software and configuration used to serve it.

3. The macOS LaunchDaemon

macOS uses launchd to manage background services. A LaunchDaemon allows the TNFS server to start automatically without requiring a user to open Terminal and launch it manually.

The active configuration file is:

/Library/LaunchDaemons/org.tnfs.server.plist

The LaunchDaemon uses the following settings:

The important distinction is that the LaunchDaemon does not launch tnfsd directly. It starts the Python supervisor, which then manages the TNFS server process.

RunAtLoad tells macOS to start the service when the LaunchDaemon is loaded.

KeepAlive instructs macOS to keep the service running. If the supervisor exits, launchd can start it again.

The UserName setting specifies the account under which the service runs.

4. The Python supervisor

The supervisor script is located at:

/Users/alexsantos/tnfs/tnfs-supervisor.py

It is responsible for preparing the environment and starting the TNFS server.

Its main functions are:

Waiting for the storage volume

The script checks whether the BuriedBits volume is mounted and whether the TNFS root directory is available.

It waits for the volume before attempting to start the server. This is important because the TNFS repository resides on external storage, which may take longer to become available after a restart.

The supervisor waits for up to ten minutes. If the volume or repository is still unavailable after that period, it records an error and exits.

Checking the TNFS executable

Before launching the server, the supervisor checks that the tnfsd executable exists and has permission to run.

If the executable is missing or is not executable, the supervisor records an error in the log and exits.

Mac starts
    |
LaunchDaemon starts supervisor
    |
Wait up to 10 minutes for storage
    |
    +--- Volume available --> Start tnfsd
    |
    +--- Volume unavailable --> Log error and exit
                                      |
                               launchd restarts it
                                      |
                               Wait another 10 minutes

Starting the server

Once the storage volume and executable have passed their checks, the supervisor starts tnfsd with the TNFS root directory specified as its repository:

tnfsd -r /Volumes/BuriedBits_/tnfs

Managing log output

The supervisor captures the output from the TNFS server and writes it to the main log file.

It also implements log rotation to prevent the log from growing indefinitely.

The current configuration uses a maximum log size of 5 MB and retains up to five compressed historical log files.

The log directory is:

/Users/alexsantos/tnfs/logs/

This makes it possible to investigate startup problems and other events without allowing log files to consume excessive storage, especially relevant on smaller startup volumes like my Mac mini.

5. Startup script

The installation also includes a shell script:

/Users/alexsantos/tnfs/start-tnfs.sh

This script provides an alternative way to start the TNFS server.

It creates the log directory if necessary, waits for the TNFS storage directory to become available and then launches tnfsd with the correct repository path.

However, it is important to distinguish this script from the active automatic startup process.

The current LaunchDaemon does not call start-tnfs.sh. Instead, it launches tnfs-supervisor.py directly. The supervisor performs the storage checks, starts tnfsd and manages the server output.

The shell script is retained as a separate startup method, but it is not part of the current LaunchDaemon startup sequence.

6. Checking the service

The following commands can be used to check whether the TNFS service is running.

Check the LaunchDaemon

Open Terminal and run:

sudo launchctl print system/org.tnfs.server

A running service should report:

state = running

The output also provides information about the service process, its arguments and its exit status.

For a shorter overview, use:

sudo launchctl print system/org.tnfs.server | grep -E 'state =|pid =|program =|last exit code'

Check the TNFS network listener

To verify that the TNFS server is listening on port 16384, run:

sudo lsof -nP -i :16384

The output should show the tnfsd process listening on TCP port 16384 and bound to UDP port 16384.

These checks confirm that the service is running locally and that the server has opened its expected network sockets. They do not, by themselves, prove that the server is reachable from the public internet.

7. Backup and recovery

The LaunchDaemon configuration is an important part of the installation, so a separate copy is retained in the user’s home directory.

The active configuration is located at:

/Library/LaunchDaemons/org.tnfs.server.plist

The backup copy is currently located at:

/Users/alexsantos/tnfs/org.tnfs.server.plist /Users/alexsantos/tnfs/backups/org.tnfs.server.plist

The recovery documentation is stored in:

/Users/alexsantos/tnfs/backups/launchdaemons/README.rtf

The README explains how to validate the backup configuration, copy it back into the system LaunchDaemons directory, restore the required ownership and permissions, and reload the service.

The installed LaunchDaemon file should normally be owned by root:wheel and have permissions set to 644.

The recovery procedure uses the following commands to restore ownership and permissions:

sudo chown root:wheel /Library/LaunchDaemons/org.tnfs.server.plist
sudo chmod 644 /Library/LaunchDaemons/org.tnfs.server.plist

After restoring the configuration, the service can be reloaded using launchctl.

Restoring the LaunchDaemon configuration alone will not recover the entire server if other components are missing. The Python supervisor, TNFS executable, storage volume and repository must also be available.

8. Downloadable configuration files

The configuration files used by this installation can serve as a starting point for anyone setting up a similar TNFS server on macOS.

The following files are intended to be made available for reference:

These files reflect the BuriedBits installation. They contain paths and settings specific to this Mac mini and must be reviewed and adjusted before being used on another system.

In particular, users should check the macOS account name, Python installation path, TNFS executable location, storage volume name and repository path.

The TNFS executable itself is maintained separately by its developer. Rather than distributing a potentially outdated copy, users should obtain the appropriate version from the official TNFS source repository:

Updating the TNFS server executable

9. Automatic recovery after a restart

One of the main reasons for using a LaunchDaemon and a Python supervisor is to ensure that the TNFS service starts automatically when the Mac mini is powered on. This is particularly useful in locations where power interruptions, including recurring blackouts and brownouts, are a concern.

In my case, I prefer not to have the Mac mini restart automatically after a power failure. Consecutive brownouts can occur, so I prefer to wait until the power supply has stabilised before manually turning the machine back on. Once macOS has started, the LaunchDaemon automatically launches the Python supervisor, which waits for the external archive volume to become available before starting the TNFS server.

The checks described above provide a straightforward way to verify that the service has started correctly after a manual restart or an unexpected shutdown.

10. Updating the TNFS server executable

The TNFS server executable, tnfsd, is maintained by the FujiNetWIFI project. New versions may include bug fixes and improvements, so it is worth checking periodically for updates.

The official sources for downloading the executable are:

The GitHub Releases page provides the source code and precompiled binaries. When downloading a binary, select the macOS version appropriate for your hardware.

The BuriedBits server runs on an Intel Mac mini, so the required architecture is Intel x86_64 in my case and not Apple Silicon ARM64.

Preparing for an update

Before replacing the executable, make a backup of the currently installed version. This provides a straightforward way to roll back if the new version causes problems.

The TNFS executable is located at:

/Users/alexsantos/tnfs/tnfsd

Download the new Intel macOS binary and place it in the TNFS directory, naming the temporary copy:

tnfsd.new

Before proceeding, check that the downloaded file is an executable for the correct architecture:

file "$HOME/tnfs/tnfsd.new"

The output should identify a 64-bit Mach-O executable for x86_64.

Stopping the TNFS server

The TNFS server is managed by a macOS LaunchDaemon. It is important to unload the service before replacing the executable.

Run:

sudo launchctl bootout system/org.tnfs.server

This unloads the LaunchDaemon and stops the supervisor and its TNFS server process.

Confirm that the server has stopped:

sudo lsof -nP -i :16384

There should be no TNFS server process listening on port 16384.

Backing up and replacing the executable

Create a timestamped backup of the existing executable:

cp -p "$HOME/tnfs/tnfsd" "$HOME/tnfs/tnfsd.backup-$(date +%Y%m%d-%H%M%S)"

The original executable is now preserved under a separate filename.

Replace it with the downloaded version:

mv "$HOME/tnfs/tnfsd.new" "$HOME/tnfs/tnfsd"

Ensure that the new executable has permission to run:

chmod 755 "$HOME/tnfs/tnfsd"

Restarting the TNFS server

Load the LaunchDaemon again:

sudo launchctl bootstrap system /Library/LaunchDaemons/org.tnfs.server.plist

macOS will start the Python supervisor, which will check the storage volume and launch the new TNFS executable.

Check the LaunchDaemon:

sudo launchctl print system/org.tnfs.server

Look for:

state = running

Then verify that the server is listening on both TCP and UDP port 16384:

sudo lsof -nP -i :16384

The tnfsd process should appear with a TCP listening socket and a UDP socket.

Rolling back an update

If the new version does not work correctly, the previous executable can be restored.

First, stop the service again:

sudo launchctl bootout system/org.tnfs.server

Copy the backup executable over the current one. Replace the example backup filename below with the actual timestamped filename created earlier:

cp -p "$HOME/tnfs/tnfsd.backup-YYYYMMDD-HHMMSS" "$HOME/tnfs/tnfsd"

Restore executable permissions:

chmod 755 "$HOME/tnfs/tnfsd"

Then load the LaunchDaemon again:

sudo launchctl bootstrap system /Library/LaunchDaemons/org.tnfs.server.plist

Repeat the service and network-listener checks to confirm that the previous version is running.

Keeping a backup of the previous executable makes updates reversible without having to download an older release.

11. Conclusion

Running a TNFS server on a Mac mini provides a convenient way to make a collection of files available to FujiNet-compatible systems over a network.

The BuriedBits installation uses macOS LaunchDaemon management, a Python supervisor and external RAID storage to provide automatic startup and basic operational safeguards.

Separating the TNFS repository from the server’s operational files, maintaining a backup of the LaunchDaemon configuration and keeping logs under control all help make the installation easier to maintain.

The configuration documented here is specific to the BuriedBits environment, but the general approach can be adapted for other macOS systems.