Setting Up A Home File Server

Moderator: Forum moderators

Post Reply
User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Setting Up A Home File Server

Post by wizard »

A home file server can store your media files, most used files, or file archives. These can then be accessed/streamed by other devices on your local network such as computers, tablets, phones, or smart TV's.

It is presented in five post to accommodate the included images.

wizard

What is needed:
-a home network either wired, wireless or both
-an extra computer that can run Puppy Linux, this can be an old single core system, minimum Pentium M or equivalent, 512mb ram.
-extra internal or external storage for the files

32bit Puppy's work fine for the server, this also allows using older slower computers. BionicPup32 or BionicPup64 (if you need a 64bit for some reason) work well.

This example will apply to BionicPup setup on an MBR internal drive and cover the following steps:
Prepare the boot drive
Create the file share (file storage)
Set a static IP address (optional)
Install remote administration (optional)
Other Useful Considerations

Prepare the boot drive
The boot drive can be an internal drive or it can be a bootable USB (if your hardware supports USB booting)

Boot system with a Puppy Bionic USB
Menu>System>Gparted
Use Gparted to partition the boot drive
-partition1=min 1gb, ext3 or 4, label=linux, flags=boot
-make additional partition if you will also store files on the boot drive, label=data

Example: 4gb boot partition and 144gb data storage partition

fs-gparted.jpg
fs-gparted.jpg (35.8 KiB) Viewed 496 times

Menu>Setup>Puppy Installer>Universal Installer>Internal hard drive
-install (frugal) Puppy to partition1
-install Grub4Dos to the boot drive, Options=search within only this device, Legacy compatible

Shut down, remove USB and reboot to the new boot drive
-connect to the network
-shutdown and create a save file or folder.

Last edited by wizard on Thu Oct 24, 2024 1:38 pm, edited 2 times in total.

Big pile of OLD computers

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

Create the file share (file storage)
Boot the server
Menu>Filesystem>Pmount
-right click your storage drive/partition
-choose: Mount partition at boot

fs-pmount.jpg
fs-pmount.jpg (31.56 KiB) Viewed 484 times

Menu>Network>Samba Simple Management
-enter a name for your shared files in the left column
-enter the path to your shared files in the right column

fs-share.jpg
fs-share.jpg (50.02 KiB) Viewed 484 times

click the SAMBA OFF button (turns Samba ON)
-click: Apply
-click: Quit

-open Rox File manager
-navigate to /etc/samba/smb.conf
-drag and drop smb.conf to the desktop
-click: smb.conf on the desktop
-in the global section, add: guest ok = yes

Code: Select all

[global]
	workgroup = Workgroup
	netbios name = fossa64test
	server string = Puppy Samba Server
	security = user
	map to guest = Bad Password
	printing = cups
	printcap name = cups
	load printers = yes
	guest ok = yes

-save the file
-disable the Firewall

You can now test the file share.
-add some files and directories to your share location
-place the mouse cursor over the network icon in the right side of the tray
-note the IP address

Use another Puppy computer on the local network.
Menu>Network>YASSM Samba share mounter>Setup
-enter the data for your file share

Example using IP 192.168.254.106

yassm.jpg
yassm.jpg (9.06 KiB) Viewed 484 times

-click: Test

You should now be connected to your shares.

MS Windows computers can also connect to the server using File Manager and typing the server IP address into the address line, i.e, \\192.168.254.106

Last edited by wizard on Mon Oct 14, 2024 1:20 pm, edited 2 times in total.

Big pile of OLD computers

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

Set A Static IP Address (optional)
Home routers automatically assign IP’s from a pool of about 250+ address’s. This is the number after the last period in the IP address, i.e., 192.168.1.xxx. The xxx can range from 1 to 254. Address’s assigned are not static and can change, especially if the router loses power. Instead of letting the router assign the address you can tell Puppy to use a static IP address.

If you are comfortable doing it, you should access your routers administrative interface (every router is different) and check or change its address range. If not, read on.

You want to pick an address the router won’t try to assign to another device. Many routers do not automatically use the whole 250+ range. Look at the number after the last period in your IP address. If it’s only one or two digits chances are your router may be using the whole 250+, if it’s 3 digits chances are the router is only using from 100 up to 254 or less. In my case, the number is 106, so I could safely assign a static IP like 192.168.254.50
If you have only 1 or 2 digits after the last period, then assign a high number such as 200, example: 192.168.254.200 would work on my system. This method is not ideal but will probably work fine since the router would not ever assign that large of a number on a home system.

Assign a static IP in Puppy
Menu>Setup>Internet Connection Wizard>Wired or wireless Lan>Network Wizard
-click the button for your interface
-click: Static IP
-type the static IP in the IP address box
-leaving the Gateway and DNS address’s blank prevents server internet access
-click OK
-click YES
-click Done

staticip.jpg
staticip.jpg (48.42 KiB) Viewed 481 times

-reboot and test

Last edited by wizard on Sun Oct 13, 2024 2:42 pm, edited 1 time in total.

Big pile of OLD computers

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

Install Remote Administration (optional)
This uses VNC remote control to allow you to login to your servers desktop from another computer (on the local network) to check its operation, edit configurations, restart, etc.

On the server:
-install x11vnc_server-0.9.14.pet from here:
https://sourceforge.net/projects/wizard ... t/download
or for 64bit
https://sourceforge.net/projects/wizard ... /download
Menu>Network>VNC server
-click: Every time
Note: ending a VNC remote session can result in the server being unable to blank its screen, do this to fix.
-copy restartx.sh to /root/my-applications/bin
-using Rox, drag and drop /root/my-applications/bin/ restartx.sh to the desktop
-end any VNC remote session by clicking restartx.sh

On the client:
-on older Puppy’s, try a tightvnc_viewer from here:
https://sourceforge.net/projects/wizard-stuff/files/
-on newer Puppy’s try TigerVNC client from the repo since it is more convenient to use.

-open the viewer
-enter the server IP address
-enter your password when prompted

Your server desktop should open in a window.

MS Windows computers can also connect to the Puppy VNC server using any of the free VNC clients available. Portable versions can be found on the web.

Attachments
restartX.sh.gz
Remove fake .gz before using
(35 Bytes) Downloaded 10 times
Last edited by wizard on Sun Oct 13, 2024 2:47 pm, edited 1 time in total.

Big pile of OLD computers

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

Other Useful Considerations

DO A BACKUP OF YOUR SAVE FILE/FOLDER

PUPMODE 13
Consider running the server in PUPMODE 13 to help prevent unwanted changes to the configuration.

Daily Reboot
Consider using a daily reboot just to keep everything cleaned up.
Menu>System>pSchedule>Schedule new task
-Command=wmreboot
-Task name=daily reboot
-select an Hour
-select: any, for all other choices

YASSM
If your clients use YASSM to connect, YASSM mounts the share in /root/YASSM, you may want to symlink that to /mnt to be consistent with most other mount points.

Auto Connect Shares
If you want a client to always connect to a share when booted, try downloading mntshare.sh from here:
https://forum.puppylinux.com/viewtopic.php?t=12846
Edit the indicated lines, then copy into /root/Startup. Mntshare.sh will mount the share in /mnt by default. You can also rename mntshare.sh to suit your need.

Big pile of OLD computers

Clif McIrvin
Posts: 13
Joined: Sat Jan 02, 2021 2:13 am
Has thanked: 5 times

Re: Setting Up A Home File Server

Post by Clif McIrvin »

Your instructions show to disable the firewall.
Can you show how to Samba with firewall active?
My Samba Server is running under
Linux Kernel: 4.9.163-lxpup-32-pae (i686)
Kernel Version: #1 SMP Thu Mar 14 15:41:19 GMT 2019
Build GCC: 8.3.0
PAE Enabled: Yes

Distro: BionicPup32 19.03
Window Manager: JWM v2.3.7
Desktop Start: xwin jwm

on a Dell OptiPlex 170L.

I have added my LAN to the icmp_packets chain in firewall_ng
with \$IPT -A icmp_packets -p ICMP -s 192.168.44.0/24 --icmp-type 8 -j ACCEPT

and with that addition I am able to ping my Samba Server but YASSM cannot find the samba server unless I disable the firewall.
My brother is using different systems, but by adding that line to firewall_ng and checking the Samba options in firewall setup his Samba setup works.

Any suggestions?

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

@Clif McIrvin

Try this.

Open the firewall setup
-check: Samba
-click: Apply

If using VNC
-click: Extras
-type: 5900,TCP
-click: Apply

With these firewall settings your file share and VNC should work. Note that ping will not work.

wizard

firewall.jpg
firewall.jpg (36.73 KiB) Viewed 215 times

Big pile of OLD computers

Clif McIrvin
Posts: 13
Joined: Sat Jan 02, 2021 2:13 am
Has thanked: 5 times

Re: Setting Up A Home File Server

Post by Clif McIrvin »

wizard wrote: Mon Nov 11, 2024 4:19 pm

Try this.

Open the firewall setup
-check: Samba
-click: Apply

Unfortunately, no joy.

As the file server is not connected to an outward facing network, I plan to take the easy way out and simply disable the firewall.

I enabled ping by adding
\$IPT -A icmp_packets -p ICMP -s 192.168.44.0/24 --icmp-type 8 -j ACCEPT
to the icmp_packets chain in /usr/sbin/firewall_ng

where 192.168.44 is the subnet established with assignment of a static IP.

Could the issue be that Samba needs a name server? Although, it does work with the firewall off, so I don't know if this question even is sensible.
(My LAN is peer to peer computers connected through a TrendNet ethernet switch.)

Thanks for the how to, and for the reply!

User avatar
wizard
Posts: 1986
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 692 times

Re: Setting Up A Home File Server

Post by wizard »

@Clif McIrvin

As the file server is not connected to an outward facing network, I plan to take the easy way out and simply disable the firewall.

Really no risk then. My servers are connected through a DHCP router, but have been assigned a static address. Not sure why yours does not work, as it does work on mine. Did you restart the firewall/reboot after making the change?

Thanks
wizard

Big pile of OLD computers

Clarity
Posts: 3834
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1632 times
Been thanked: 524 times

Re: Setting Up A Home File Server

Post by Clarity »

Yes, I agree with @wizard on his risk assessment.

If you are NOT running any browsers on your Sambe Server, the risk is practically non-existent in this home server setup.

I run Home servers never installing a distro OS on the local drive. Thus in one of my arrangement, the ONLY thing existing on the local drive is data...NO OS.

Explantion:
The PC ONLY has a data storage files; namely docs, pdfs, pics, movies, music... AND a partition for Save-sessions. NOTHING else.

Implementation:

  1. On a system drive set a partition named "Persistence" with a folder on it named "Sessions" (this is for the running PCs save-sessions to maintain the configuration across reboots)

  2. I have a Ventoy USB with the forum distro that is used to boot the PC

  3. On the USB in a BOOTISOS folder is where the distro exist that will boot and run the server on the PC

  4. When the forum distro boots, in its boot menu, I ensure it has a PSAVE parm that tells where the save-sessions are (WoofCE PUPs). If the forum distro is one of the KLs, they are already designed save sessions on Persistence in its Sessions folder. Choose the RAM2 item in the KL boot menu.

  5. I setup the SAMBA server using the distro's built in SAMBA services. After initial test, I shutdown to preserve the session in its Sessions folder on Persistence

I can provide details for the SAMBA setup if needed. Yet, the steps will be same-similar to what @wizard has already shown. See the SAMBA setup by @wizard here.

This arrangement is stable, the OS is via the ISO file booted, the data for sharing or storage and the save sessions are the only files on this PC's drives/partitions.

The difference with this arrangement is that there is NO distro's OS "installed" on the PC...merely its save-session folder or file.

Post Reply

Return to “Network/Server”