Video

Server messages on Mac: straight to your menu bar, no open port

Want your server to tell you when the backup is done? With the channelbar command-line tool, a Linux server sends its messages through channelBar Cloud straight to your menu bar, and no port has to be open on your Mac. One line at the end of your script is enough. The video shows you how in three minutes.

A server on the internet can also send messages to the menu bar of channelBar for macOS. They travel through channelBar Cloud: the server sends its message to the cloud, and your Mac picks it up there. No port has to be open on your Mac.

The tool on the server

First, the command-line tool goes onto the server. The commands for Debian and Ubuntu are on channelbar.app under “Linux”. The first one fetches the key of the package source packages.channelbar.app, the second one adds the channelBar package source, so apt can find the package. Then apt update reloads the package lists, now including the one from channelBar, and apt install channelbar installs the package. If curl or gnupg are missing, get them first with apt install curl gnupg. For Fedora and Red Hat, the package is also available for dnf.

Without any arguments, channelbar shows all of its commands. Three of them matter most for the server: config buffer-add sets up a buffer, ping checks the connection, and set sends a message. On Linux, the tool always talks to channelBar Cloud.

A channel for the server

On the Mac, the server gets a channel of its own. In the settings, the plus under “Channels” adds a new one; here it’s called “Server”. The “Standard” preset shows the newest message as text up in the menu bar. After “Create”, the channel first appears in gray up top, until the first message arrives.

Connecting to the cloud

On the “Provider” page, add “channelBar Cloud” with “Add Provider”. That’s how messages from the cloud get into this channel. Before that, it still needs the connection to the cloud, and “Connect” takes you to “Cloud Buffer”.

For that, you need a cloud account. Under “Cloud Login”, create it with “Create Account” and confirm the notice. You don’t need an email address or a password: channelBar gets an identifier based on your app download. Then turn on the switch under “Cloud Buffer”, and from now on, channelBar picks up messages from the cloud. Without an account, the switch can’t be turned on.

The cloud is still in beta and included in your purchase. Each account sends up to 100 messages a day; scope and limits may still change before the end of the beta. The latest information is on the channelBar Cloud page.

A buffer for your messages

Under “Cloud Buffer”, now create a buffer: enter a name, here “backup”, and click the plus next to it. The buffer keeps messages for up to 24 hours until your Mac picks them up.

The Terminal icon in its row copies the matching command, channelbar config buffer-add with the name of the buffer. It contains your identifier and the API key for this buffer, so keep it to yourself. On the server, paste it and confirm; after that, the tool knows the buffer. First, channelbar ping checks whether the server reaches the buffer in the cloud.

Assigning the buffer

Back at the “Server” channel, on the “Provider” page, pick the new buffer under “Add Buffer”. A buffer can only be assigned to one channel; if it’s already taken, the list shows which channel has it.

One line is enough

Now one line is enough: channelbar set, the name of the buffer and the text of the message in quotes. The message shows up in the menu bar right away. Put the line at the end of your backup script, for example. That’s how your server reports straight to your menu bar, without any open port.

Scripts on your Mac itself don’t need the cloud; Messages from Your Own Sources shows how they send messages.

← All posts