• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Running Netatalk on macOS

slipperygrey

Well-known member
To continue the barrage of Netatalk topics, I just wanted to share that you are now able run an AFP server on macOS, if you're bummed out that Apple deprecated their AFP server with 10.9 Mavericks.

The release of Netatalk 3.1.15 marks the culmination of 2 years of hard work by @dgsga, originally in their own fork, to get Netatalk running on Mac hardware again.

I tagged and released it a few hours ago: https://github.com/Netatalk/netatalk/releases/tag/netatalk-3-1-15

The installation process is very straight forward, as documented in the wiki: https://github.com/Netatalk/netatalk/wiki/Installing-on-macOS

Please note that this is netatalk3, so AppleTalk/DDP is not supported.
 

robin-fo

Well-known member
I tried the installation some weeks ago with partial success. I remember I had to install a custom dbus (?) version using homebrew which broke some other packages. Has this now changed (as I no longer see dbus as requirement)?

But besides this, many thanks for your hard work to bring ancient Apple technology to modern devices! 🤓
 

pax

Well-known member
This is great news, thank you. Slightly off-topic (my apologies!), if I want to use my modern macOS server to share my files (and my printer) to all my macs, from System 6 up to macOS Ventura with resource forks intact, what is the best option and does this release change anything?
 

slipperygrey

Well-known member
I tried the installation some weeks ago with partial success. I remember I had to install a custom dbus (?) version using homebrew which broke some other packages. Has this now changed (as I no longer see dbus as requirement)?

But besides this, many thanks for your hard work to bring ancient Apple technology to modern devices! 🤓
Right, I don't think the dbus stuff is even included in the PR that @dgsga filed upstream, and got merged. You only need dbus for Spotlight and afpstats support anyways (might be something else too that I forget.) We ported only the bare minimum of the changes in the fork. More improvements may be ported over time.
 

slipperygrey

Well-known member
This is great news, thank you. Slightly off-topic (my apologies!), if I want to use my modern macOS server to share my files (and my printer) to all my macs, from System 6 up to macOS Ventura with resource forks intact, what is the best option and does this release change anything?
Unfortunately, you need AppleTalk to use AppleShare with System 6 Macs. There isn't a good solution right now natively on macOS, but you can run netatalk2 on a VM running Linux or *BSD for instance.

This release is helpful if your Macs are running System 7.1 or later, which are compatible with AppleShareIP clients.
 

robin-fo

Well-known member
If we had an ASP implementation working on modern macOS, how easy or would it be to separate the Netatalk 2 AFP server from the rest of the package?
 

slipperygrey

Well-known member
No, I mean the AppleTalk Session Protocol, which is required for AFP over DDP. Kind of what DSI is for AFP over IP...
Ah yes of course, I didn't notice that box on architecture diagram before. Still learning.

So all the AppleTalk protocols are implemented in libatalk in a modular fashion. The ASP code is in libatalk/asp. From what I can tell AFP over ASP is implemented in etc/afpd/afp_asp.c (so not in atalkd as I initially assumed.) So at least afpd needs to be modified to use the system ASP, it seems.

Do you have a scenario where macOS provides ASP but not AFP?
 

robin-fo

Well-known member
Do you have a scenario where macOS provides ASP but not AFP?
My work-in-progress portable AppleTalk stack already supports ATP (I was able to port the Timelord server from CAP to it; it's running nicely now) and some initial work for ASP has also been done. So at one point, I will hopefully be able to offer ASP server and client services...
 

Snial

Well-known member
This sounds great! Does it mean I can simply connect a serial cable between a pre-USB Classic Mac OS (e.g. my Powerbook 1400cs) and a Raspberry PI (or better still, my MacBook Air M2 with a USB to serial adapter) and do a simple peer-to-peer AppleTalk connection?
 

robin-fo

Well-known member
This sounds great! Does it mean I can simply connect a serial cable between a pre-USB Classic Mac OS (e.g. my Powerbook 1400cs) and a Raspberry PI (or better still, my MacBook Air M2 with a USB to serial adapter) and do a simple peer-to-peer AppleTalk connection?
You would require an AirTalk or LocalTalk to Ethernet bridge for this as standard USB to serial adapters only support UART interfaces.
 

Snial

Well-known member
You would require an AirTalk or LocalTalk to Ethernet bridge for this as standard USB to serial adapters only support UART interfaces.
OK, thanks for that. That means the easiest way to simply transfer data is via a simple serial connection. I was only wondering because in the System 7.1 era, I used to transfer data between my LC II* and Powerbook 100 using a standard serial connection and AppleTalk™, with no LocalTalk bridge. It's a pity there's no full duplex SerialTalk data link layer for 2-node topologies.

(*Performa 400 variant actually).
 

pax

Well-known member
Another—admittedly uninformed—question: How are the shared files stored with Netatalk on macOS? It's been a while since I ran Netatalk (on SunOS) and I think I remember everything was stored in AppleDouble format. Is this also the case with Netatalk 3.1.15 on macOS?

For my own file sharing needs, I would prefer is files are stored natively on HFS+ (or APFS) disks and shared directly with modern macs (as well as backed up using my normal backup schemes). And then Netatalk also shares the same folder or disk with my vintage macs. Perhaps this setup is not realistic with a modern mac as file server, and would be better handled by a bridge mac running an older OS version that can support both old and newer macs.
 

robin-fo

Well-known member
Actually, running Netatalk 2 with AppleTalk support on modern macOS might even be easier than I thought.. Just for fun, I successfully compiled it on Monterrey. You apparently only need to provide...
<netat/appletalk.h>
<atalk/ddp.h>

...and implement the following functions:
ddp_close(...);
ddp_open(...);
rtmp_netinfo(...);

and do some other hacks as well.

I used dummy implementations for now, and the executables therefore launch with an error:
Bash:
socket: Address family not supported by protocol family
atalkd: can't get interfaces, exiting.
Which is probably related to a socket( AF_APPLETALK, SOCK_DGRAM, 0 ) call, obviously no longer supported, even if AF_APPLETALK is still defined to this day. Of course those calls would need to be replaced.
 

NJRoadfan

Well-known member
I think Netatalk 3 supports storing resource forks and the like natively in the file system with the "ea" (extended attributes) back end. Problem is it likely doesn't support HFS+, it looks more geared for something like ZFS.
 

slipperygrey

Well-known member
Actually, running Netatalk 2 with AppleTalk support on modern macOS might even be easier than I thought.. Just for fun, I successfully compiled it on Monterrey. You apparently only need to provide...
<netat/appletalk.h>
<atalk/ddp.h>

...and implement the following functions:
ddp_close(...);
ddp_open(...);
rtmp_netinfo(...);

and do some other hacks as well.

I used dummy implementations for now, and the executables therefore launch with an error:
Bash:
socket: Address family not supported by protocol family
atalkd: can't get interfaces, exiting.
Which is probably related to a socket( AF_APPLETALK, SOCK_DGRAM, 0 ) call, obviously no longer supported, even if AF_APPLETALK is still defined to this day. Of course those calls would need to be replaced.
That's a neat experiment! Please do share your fork when you get around to it. I'm pretty sure that's the exact same result you get when trying to run atalkd on a Linux system that lacks the appletalk kernel module.

Do you have a development thread for your portable AppleTalk stack, or a code repo somewhere? I'm curious to keep up with your progress.
 

robin-fo

Well-known member
I can do a fork of Netatalk on my GitHub. My own stack is already there, albeit in a private repo until it gains a certain maturity. Please PM me and I will add you as collaborator.
 

-_- JC

Member
Sorry to bump an old thread but I'm trying to install Netatalk 3 on macOS and I keep getting stuck on the compile step, specifically with this terminal command:

./configure --with-ssl-dir=/path/to/openssl/installation --with-bdb=/path/to/bdb/installation

As soon as I run it I keep getting this error: Berkeley DB library required but not found! This is weird as I already installed all the prerequisites, so I was hoping that I could get some help with this.
 

slipperygrey

Well-known member
Sorry to bump an old thread but I'm trying to install Netatalk 3 on macOS and I keep getting stuck on the compile step, specifically with this terminal command:

./configure --with-ssl-dir=/path/to/openssl/installation --with-bdb=/path/to/bdb/installation

As soon as I run it I keep getting this error: Berkeley DB library required but not found! This is weird as I already installed all the prerequisites, so I was hoping that I could get some help with this.
This is a simple fix. You need to substitute both paths to the actual location of your openssl/bdb libraries. If you look carefully in the wiki, it tells you how to use "brew --prefix" to identify what those paths are!
 
Top