Raspberry Pi as printing/file server
Set up raspberry pi as a printing server using cups and file server using samba.
Soft- and hardware specs: I’m using:
- Raspberry Pi 3B+ Model
- Raspberry Pi OS (aka. Raspbian)
- Brother DCP-7055 Printer
TIP: Setup Raspbian SSH connection without a monitor:
for the newest Raspberry Pi OS, SSH is not enabled by default. To enable SSH without a monitor: create a file named
Cups doesn’t support some of the printers out of the box (like my brother dcp-7055). You may need to manually find and install the driver for your printer.
In my case, it’s as simple as installing the package
apt-get install printer-driver-brlaser
SETTING UP CUPS
First install the
apt-get install cups
pi user privileges to configure cups (suppose you are using raspberry, whose default user is
sudo usermod -a -G lpadmin pi
Edit cups config, so that we can configure cups via network panel. Edit
/etc/cups/cupsd.conf as following:
change the line
Browsing On BrowseLocalProtocols dnssd
Browsing On BrowseAllow all BrowseAddressLocalProtocols CUPS dnssd BrowseAddress @LOCA
Find the following three sections:
<Location /> <Location /admin> <Limit Create-Job Print-job Print-URI Validate-Job>
And add this line to each
NOTE: change this address accordingly to your machine and router configs.
Now restart the cups service.
sudo service cups stop sudo service cups start
Well, I don’t know why, but
service cups reload won’t work….
Access the web config panel via port
192.168.1.2:631 from browser. Go to
Administration page, and hit “add printer”. Make sure the printer is connected to the Pi before doing this.
And follow the instruction.
In the right hand side of Administration page, mark “Share Printers connected to this system”. Now the printer server should work~
Setting up samba
… well maybe update this post later