[root tip] [How To] Simple Network Attached Storage (NAS) service

This is WIP

This is a short guide showing how you can add NAS filesharing capabilities to a running Manjaro installation thus converting into a simple NAS.

The first step is mandatory - to ensure the system is fully up-to-date

sudo pacman -Syu

This little project will use the web-based cockpit administration application. This application is maintained by Red Hat developers - so all documentation inside the app is pointing to Red Hat documentation.

Cockpit is a modular web application allowing the administrator to add various plugins or applications. A lot of plugins exist - they are user contributions - so it is recommended to properly assess your requirements and the plugin before you pour it onto your production system.

You should consider adding the firewalld to your system - cockpit has an excellent applet for maintaining firewalld.

Should you want to explore some Arch Linux based documentation - there is a - sort of - entry point in the Arch Linux wiki → Cockpit - ArchWiki

Installing cockpit is simple

sudo pacman -Syu cockpit

Then enable the web service

sudo systemctl enable --now cockpit.socket

Also enable avahi services for better discovery of your shares in your local network.

sudo systemctl enable --now avahi-daemon.socket avahi-daemon.service avahi-dnsconfd.service

The webservice is running on port 9090 - so open a browser and point the address to

In case of running on your local computer

http://localhost:9090

Or running on another system - e.g. a raspberry pi - you can use either hostname or ip address

http://ip.x.y.z:9090

Before we continue - login and explore the basic features - where a web based terminal is an important part. Other parts are

  • Logs
  • Accounts
  • Services

When you have familiarized yourself with the basics, move on to adding a File Sharing component. This compoenent makes it extremely simple to configure and maintain SMB and NFS shares for your local network.

The plugin source is on Github and a PKGBUILD is found with AUR

GitHub - 45Drives/cockpit-file-sharing: A Cockpit plugin to easily manage samba and NFS file sharing.
AUR (en) - cockpit-file-sharing

Building is straight forward - you can do it in the cockpit terminal

pamac build cockpit-file-sharing

If you do not have a new item labelled File Sharing in the left pane - reload the browser page.

Then click the File Sharing item.

At the top you have two options Samba and NFS.

Before you can start the service - you need to create a valid /etc/smb.conf.

First fill in the Global section. See [root tip] [How To] Samba Server From Scratch for more configuration.

A word of warning and caution: Public writable shares are at risk of unautorized changes by ransomware so be secure your shares with username and password.

For each share you have the option of defining valid users and groups and thus secure your data.

You will also need to ensure the correct permissions are set for the physical share path.

When you have configured the service - navigate to the ServicesServices section in cockpit, and using the filter box, locate smb, click the link and enable the service.

Normally when you reconfigure your samba service or shares - you should ensure to restart the service otherwise the changes will not take effect - but using the cockpit applet will switch the configuration from being file-based (/etc/samba/smb.conf to be database based - thus the changes will immediately reflect on the service.

3 Likes