# Netatalk Manual

- Introduction
- Installation
- Configuration
  - CNID Backends
  - Character Sets
  - Authentication
  - ACL Support
  - Directory Caching
  - Interoperability
  - Filesystem Change Events
  - Search
- AppleTalk
- Upgrading
- License
- Legal Notices

# Installation

> WARNING: Before upgrading to Netatalk 4 from an earlier version, please read the Upgrade chapter in this manual.

## How to obtain Netatalk

Please have a look at the Netatalk homepage for the most up to date information on where to find the latest version of the software.

### Binary packages

Binary packages of Netatalk are included in the package repositories of some Linux, BSD, and Solaris-like distributions. Installing Netatalk through this channel will give you the most seamless experience, with managed updates when new package versions are available.

See the Netatalk page on Repology for a living list of known Netatalk packages.

You might also want to have a look at 3rd party package repositories for your operating system, such as rpmfind for Red Hat based Linux distributions, OpenCSW for Solaris and its descendants, and Homebrew or MacPorts for macOS.

### Source packages

Prepackaged tarballs with stable releases of the Netatalk source code are available on the Netatalk releases page on GitHub.

The source code is also available from the Netatalk Git repository.

See the Installation Quick Start guide for instructions on how to build Netatalk from source.

## Prerequisites

Netatalk depends on a number of third-party libraries and utilities. There are a handful of mandatory packages that must be installed before attempting to build Netatalk. In addition, there are a number of optional packages that can be installed to enhance Netatalk’s functionality.

### Required third-party software

- bstring

  Netatalk relies on the Better String Library for memory safe string data manipulation and retrieval. Version 1.0.1 or later of Mike Steinert’s bstring fork is recommended, but any version of the original bstrlib library by Paul Hsieh should theoretically work just as well.

  In the absence of a shared bstring library, the Netatalk build system will build and install the library as a Meson subproject.

- iniparser

  The iniparser library is used to parse the configuration files. At least version 3.1 is required, while 4.0 or later is recommended.

- libevent / libev

  Internal event callbacks in the netatalk service controller daemon are implemented using libevent version 2 or libev.

- Libgcrypt

  The Libgcrypt library supplies the encryption for the password based User Authentication Methods (UAMs).

#### CNID database backends

At least one of the below database libraries is required to power the CNID scheme of your choice.

- Berkeley DB

  The dbd (Database Daemon) CNID backend for netatalk uses Berkeley DB to store unique file identifiers.

  The recommended Berekeley DB version is 5.3, while versions 4.6 and later should work as well. Version 6 and later should generally be avoided due to licensing issues.

- MySQL Client or MariaDB Client

  By leveraging a MySQL-compatible client library, netatalk can be built with the mysql CNID backend that is highly scalable and reliable. The administrator has to provide a separate database instance for use with this backend.

- SQLite v3

  The SQLite library version 3 enables the sqlite CNID backend which is an embedded database option that does not require a separate database server to be set up and maintained by the system administrator.

### Optional third-party software

Netatalk can use the following third-party software to enhance its functionality.

- ACL and LDAP

  LDAP is an open and industry-standard user directory protocol that works in tandem with the advanced permissions scheme of ACL. On some operating systems ACL and LDAP libraries are built in to the system, while on others you have to install supporting packages to enable this functionality.

- Avahi or mDNSresponder for Zeroconf

  Mac OS X 10.2 and later uses Zeroconf for automatic service discovery. Netatalk can advertise AFP file sharing and Time Machine volumes by using Avahi or mDNSResponder.

  When using Avahi, D-Bus is also required, and the Avahi library must have been built with D-Bus support.

- cmark, cmark-gfm, or pandoc

  Netatalk’s documentation is authored in Markdown format. The man page sources consist of standards-compliant CommonMark, while the rest of the documentation is authored in GitHub-Flavored Markdown (gfm).

  The pandoc library generates the nicest output, but is significantly more resource intensive than the other two options. The cmark reference implementation is the most widely distributed, but cmark-gfm handles GitHub extensions like tables better.

- CrackLib

  When using the Random Number UAMs and netatalk’s own afppasswd password manager, CrackLib can help protect against setting weak passwords for authentication with netatalk.

  The CrackLib dictionary, which is sometimes distributed separately in a runtime package, is also a requirement both at compile and run time.

- iconv

  iconv provides conversion routines for many character encodings. Netatalk uses it to provide charsets it does not have built in conversions for, like ISO-8859-1. On glibc systems, Netatalk can use the glibc provided iconv implementation. Otherwise you can use the GNU libiconv implementation.

- Kerberos V

  Kerberos v5 is a client-server based authentication protocol invented at the Massachusetts Institute of Technology. With the Kerberos library, netatalk can produce the GSS UAM library for authentication with existing Kerberos infrastructure.

- PAM

  PAM provides a flexible mechanism for authenticating users. PAM was invented by SUN Microsystems. Linux-PAM is a suite of shared libraries that enable the local system administrator to choose how applications authenticate users.

- Perl

  Netatalk’s administrative utility scripts rely on the Perl runtime, version 5.8 or later. The required Perl modules include IO::Socket::IP (asip-status) and IO::Socket::UNIX (afpstats).

- po4a

  With the help of po4a, Netatalk’s documentation can be translated into other languages. It uses gettext to extract translatable strings from source files and merge them with the translations stored in PO files.

- talloc

  Samba’s talloc library is used for memory management in the Spotlight query parser.

- TCP wrappers

  Wietse Venema’s network logger, also known as TCPD or LOG_TCP.

  Security options are: access control per host, domain and/or service; detection of host name spoofing or host address spoofing; booby traps to implement an early-warning system.

- UnicodeData.txt

  The Unicode Character Database is required to regenerate Netatalk’s Unicode character conversion tables.

  This is mostly relevant for developers or package managers who want to regenerate the Unicode source files.

- Xapian

  The Xapian library is used for Netatalk-managed filename, plain-text content, and MIME type indexing.

- libmagic

  The libmagic library is used by the Xapian Spotlight backend to identify file MIME types.

### Spotlight LocalSearch backend dependencies

The LocalSearch backend for Spotlight enables rich file content and metadata matching, and depends on the following third-party software:

- bison

  A Yacc parser such as bison is required to build the SPARQL query parser for Spotlight support.

- D-Bus

  The LocalSearch indexer is a D-Bus session-bus service. Netatalk launches a private dbus-daemon to host an isolated session bus that afpd and the indexer communicate over, separate from the system bus and any user session bus.

- DConf

  DConf is a low-level configuration database. Netatalk writes a dconf keyfile listing the volumes to index, then runs dconf update to compile it into the binary database. The LocalSearch indexer reads this configuration on startup.

- flex

  A lexer like flex is required to build the SPARQL query parser for Spotlight support.

- GLib and GIO

  GLib’s main loop drives the TinySPARQL/LocalSearch async query pipeline.

- LocalSearch

  Netatalk uses GNOME LocalSearch, or Tracker as it was previously known, version 3 or later as the metadata extractor for Spotlight compatible search indexing.

  You can add metadata extraction support for additional file types by installing the appropriate Tracker extractors.

- TinySPARQL

  The TinySPARQL library is used for parsing SPARQL queries in the Spotlight support.

## Starting and stopping Netatalk

The Netatalk distribution comes with several operating system specific startup script templates that are tailored according to the options given to the build system before compiling. Currently, templates are provided for systemd, openrc, in addition to platform specific scripts for popular Linux distributions, BSD variants, Solaris descendants, and macOS.

When building from source, the Netatalk build system will attempt to detect which init style is appropriate for your platform. You can also configure the build system to install the specific type of startup script(s) you want by specifying the with-init-style option. For the syntax, please refer to the build system’s help text.

Since new Linux, *BSD, and Solaris-like distributions appear at regular intervals, and the startup procedure for the other systems mentioned above might change as well, it is a good idea to not blindly install a startup script but to confirm first that it will work on your system.

If you use Netatalk as part of a fixed setup, like a Linux distribution, an RPM or a BSD package, things will probably have been arranged properly for you. The previous paragraphs therefore apply mostly for people who have compiled Netatalk themselves.

The following daemon need to be started by whatever startup script mechanism is used:

- netatalk

In the absence of a startup script, you can also launch this daemon directly (as root), and kill it with SIGTERM when you are done with it.

Additionally, make sure that the configuration file afp.conf is in the right place. You can inquire netatalk where it is expecting the file to be by running the netatalk -V command.

If you want to run AppleTalk services, you also need to start the atalkd daemon, plus the optional papd, timelord, and a2boot daemons. See the AppleTalk chapter in this manual for more information.