Close Menu
IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
  • Home
  • News
  • Blog
  • Selfhosting
  • AI
  • Linux
  • Cyber Security
  • Gadgets
  • Gaming

Subscribe to Updates

Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

What's Hot

FBI warns against using Chinese mobile apps due to privacy risks

April 5, 2026

Skills That Remain Valuable Even as AI Advances

April 5, 2026

How to Turn an Old PC into a NAS Using Ubuntu Server (Complete Guide) – Linux Hint

April 5, 2026
Facebook X (Twitter) Instagram
Facebook Mastodon Bluesky Reddit
IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
  • Home
  • News
  • Blog
  • Selfhosting
  • AI
  • Linux
  • Cyber Security
  • Gadgets
  • Gaming
IOupdate | IT News and SelfhostingIOupdate | IT News and Selfhosting
Home»Linux»How to Turn an Old PC into a NAS Using Ubuntu Server (Complete Guide) – Linux Hint
Linux

How to Turn an Old PC into a NAS Using Ubuntu Server (Complete Guide) – Linux Hint

MarkBy MarkApril 5, 2026No Comments11 Mins Read
How to Turn an Old PC into a NAS Using Ubuntu Server (Complete Guide) – Linux Hint


Tired of scattered files across multiple devices and paying endless subscription fees for cloud storage? Discover how to transform an old PC into a powerful, cost-effective Linux NAS using Ubuntu Server 24.04 LTS. This comprehensive guide empowers tech enthusiasts to build their own home server for centralized data storage, offering unparalleled control and privacy. Say goodbye to e-waste and hello to a robust, self-hosted solution that keeps your valuable data accessible across all your devices, securely and efficiently. Dive in to unlock the full potential of your dormant hardware!

Repurposing Old Hardware: Building Your Own Linux NAS with Ubuntu Server

Ever thought about giving that dusty old PC a new lease on life? Instead of contributing to e-waste, you can transform it into a highly functional Linux Network Attached Storage (NAS) device. For professionals and enthusiasts juggling multiple computers, a dedicated NAS provides a centralized hub for all your files, eliminating the hassle of data fragmentation and costly cloud subscriptions. This guide will walk you through setting up a robust, self-hosted home server using Ubuntu Server 24.04 LTS, turning your discarded hardware into a powerful data solution.

We’ll cover everything from physically preparing your old PC and installing Ubuntu Server, to stress testing hardware, configuring Samba for file sharing, and securely accessing your new Linux NAS from various operating systems. Get ready to reclaim control over your data!

Preparing Your Old PC for a Linux NAS Project

The first step in building your custom home server is a thorough inspection of the hardware. This ensures stability and longevity for your new NAS.

  1. Inspect and Prepare the Old PC
    Open the side panel of your PC case and visually inspect the internal components. Look for dust buildup, leaking capacitors, signs of liquid damage, or any physical damage. Verify that HDDs and/or SSDs are properly mounted. Check cooling fans and connectors. If there’s excessive dust, use compressed air to clean it thoroughly.
  2. Assessing Hardware Specifications for Your Home Server
    If the device already has an OS, check its specifications. On Linux, especially Ubuntu, you can typically find these details in the “About” section. My system, an OptiPlex 9020, came with 4GB RAM, a 119GB SSD, and a 320GB HDD – robust specs for a NAS. If there’s no OS yet, you can check specs after installing Ubuntu Server.
  3. Ensuring Hardware Stability: Stress Testing Your Components
    Before committing to the full setup, stress test your hardware to confirm its stability. If you haven’t installed an OS yet, perform these tests after installing Ubuntu Server.
    Test 1: Storage Health Test
    Use the smartctl command to check the health of your storage drives. Look for the “Passed” result in the self-assessment test.
    sudo smartctl -a /dev/sda
    Unique Tip: For older HDDs, consider running sudo smartctl -H /dev/sda in addition to the full report, as it gives a quick self-assessment test result (PASSED/FAILED) without a full scan. Always replace drives showing any warning signs.
    Test 2: CPU Stress Test
    Utilize stress-ng to simulate high CPU loads, helping identify overheating or stability issues.
    stress-ng --cpu 4 --timeout 60s
    Check temperatures during and after the test to ensure they remain within safe limits:
    watch -n 1 sensors (in a separate terminal for live updates)
    Test 3: RAM Test
    The memtester command locks a specified amount of RAM (e.g., 512MB) and writes/reads multiple patterns to verify accuracy, flagging faulty RAM.
    sudo memtester 512M 1
    Test 4: Network Test
    Ensure your network components are functioning. If using Wi-Fi, test the dongle. For a NAS, a stable wired Ethernet connection is highly recommended.
    ip a or ifconfig
    Test 5: Workload Usage Test
    Though less scientific, a practical workload test (e.g., browsing, video playback, document editing) can reveal real-world performance issues. My old PC surprised me by handling basic multitasking without freezing or lagging.

Installing Ubuntu Server 24.04 LTS for Your NAS

Now, let’s get Ubuntu Server 24.04 LTS installed, forming the backbone of your Linux NAS.

  1. Download Ubuntu Server from the official website.
  2. Prepare a Bootable USB: Insert a USB drive and identify its device name (e.g., /dev/sdb or /dev/sdc) using lsblk.
  3. Create Bootable USB: Use the dd command to write the ISO to your USB drive. Adjust the ISO filename and device path as needed:
    sudo dd if=~/Downloads/ubuntu-24.04-live-server-amd64.iso of=/dev/sdc bs=4M status=progress oflag=sync
  4. Boot from USB: Reboot your PC and repeatedly press F10 or F12 (depending on your system) to enter the one-time boot menu. Select your USB device.
  5. Install Ubuntu Server: Choose “Try or Install Ubuntu Server.”
  6. Language and Keyboard: Select your preferred language and confirm keyboard layout.
  7. Installation Type: Ensure “Ubuntu Server” is selected.
  8. Network Configuration: With LAN connected, DHCPv4 IP Address should be detected. Confirm and proceed.
  9. Archive Mirror: Accept the default mirror.
  10. Storage Configuration: **CRUCIAL STEP:** Select the disk space where you want to install Ubuntu Server (e.g., your SSD). Confirm your selection, understanding that this will erase all data on that drive.
  11. User Setup: Add your name, server name, username, and a strong password.
  12. Ubuntu Pro: Choose “Skip for now” unless you require its advanced features.
  13. OpenSSH Server: Select “Install OpenSSH server” and “Allow password-based authentication.” This is essential for remote access.
  14. Complete Installation: Allow the installation to finish, then select “Reboot now” and immediately remove the USB drive.
  15. First Login: After reboot, log in with your username and password. Your machine’s IP address will be displayed. Note it down! If you miss it, use ip a or ifconfig to find it (look for inet 192.168.x.x).

Remote Access: Connecting to Your Ubuntu NAS via SSH

With Ubuntu Server installed, you’ll manage your NAS remotely using SSH. Ensure an SSH client is installed on your host machine (usually default on Linux/macOS; for Windows, you can use PuTTY or the built-in OpenSSH client via PowerShell).

Connect using the command below, replacing bobby with your username and ip_address with your server’s IP:

ssh bobby@ip_address

You’ll be prompted to confirm the connection and enter your server’s password. Once connected, your host terminal becomes your server’s terminal, allowing full remote administration.

Going Headless: Managing Your NAS Without a Monitor

The beauty of a Linux NAS running Ubuntu Server is its ability to operate “headless.” Since you’re connected via SSH, you can now disconnect your monitor, keyboard, and mouse from the server. All you need is the system unit, power, and a LAN cable. For a stable remote connection, consider setting a static IP address for your NAS or configuring a DHCP reservation on your router to prevent its IP from changing.

Setting Up Shared Storage: Creating Your NAS Directories

Before configuring file sharing, we need a dedicated directory on your home server. This directory will be exposed to your network for all shared files.

mkdir -p ~/server-data/shared

We create this specific directory rather than sharing your home directory for security. Sharing your home directory would expose configuration files and other sensitive data, which is not best practice for a `Linux NAS`.

Enabling File Sharing: Installing and Configuring Samba

Samba is the essential tool for file sharing on your Linux NAS, allowing seamless access from various operating systems.

  1. Install Samba:
    sudo apt update && sudo apt install samba
  2. Backup Configuration: Always back up the default Samba configuration file before making changes:
    sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
  3. Edit Configuration: Open the Samba configuration file for editing:
    sudo nano /etc/samba/smb.conf
    Add the following lines to the very end of the file. Adjust bobby to your server username:

    [Shared]
    path = /home/bobby/server-data/shared
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0664
    directory mask = 0775
    valid users = bobby

    These settings define a share named “Shared,” specify its path, allow browsing, enable read/write access (read only = no), restrict guest access (guest ok = no), set default file and directory permissions, and restrict access to the specified user.

  4. Test Configuration: Save and exit (CTRL+O, CTRL+X), then test the configuration for errors:
    testparm
    Look for “Loaded services file OK.”
  5. Set Samba Password: You need to set a Samba-specific password for your user. This can be different from your system password.
    sudo smbpasswd -a bobby
  6. Firewall Check (UFW): Check if UFW (Uncomplicated Firewall) is active:
    sudo ufw status
    If inactive, no action is needed. If active, allow Samba traffic:
    sudo ufw allow samba
  7. Restart Samba: Apply changes by restarting the Samba services:
    sudo systemctl restart smbd nmbd

Accessing Your Linux NAS from Various Operating Systems

Your Linux NAS is now ready! Here’s how to connect from different devices and access your shared directory.

Connecting from Linux Desktops

Navigate to your file manager (e.g., Files on GNOME), go to “Network,” and enter your NAS’s IP address in the connect bar:

smb://YOUR_NAS_IP_ADDRESS/

Click “Connect,” select “Registered User,” enter your username and Samba password, then “Connect.” You’ll see your “Shared” directory, ready for drag-and-drop file management.

Whatever you create or modify here will be simultaneously accessible on the server and all other connected devices.

Connecting from macOS Devices

On macOS, open Finder, go to “Go” in the menu bar, and select “Connect to Server…”

Enter the path with your server’s IP address:

smb://YOUR_NAS_IP_ADDRESS/Shared

Click “Connect,” enter your username and Samba password, and hit “Connect.” Your “Shared” folder will appear, allowing you to manage files just like a local folder.

Connecting from Windows Systems

(While Windows isn’t my daily driver, here’s how to connect for those still using it!)

Right-click on “This PC” and select “Map network drive…”

In the window, use a backslash format for the IP address and share name:

\\YOUR_NAS_IP_ADDRESS\Shared

Enter your Samba username and password, optionally check “Remember my credentials,” and click “OK.” Your shared folder will now be accessible like a local drive, and any changes will sync instantly across your network.

Conclusion: Your Self-Hosted Linux NAS Awaits!

You’ve successfully repurposed an old PC into a robust Linux NAS, creating a central storage solution for your home or small office network. This self-hosted setup offers significant advantages over commercial NAS devices and cloud services, including cost savings, enhanced privacy, and full control over your data.

Here are some crucial takeaways for maintaining your new home server:

  • Security First: Always use strong, unique passwords. For remote access outside your home network, **never** expose your NAS directly to the internet. Instead, set up a VPN server (like WireGuard or OpenVPN) on your router or NAS. For SSH, always prefer key-based authentication over passwords, especially for internet-facing access.
  • NAS is Not a Backup: While a NAS centralizes your data, it is not a backup solution. Hardware failures can still lead to data loss. Implement a robust 3-2-1 backup strategy: at least three copies of your data, stored on two different media types, with one copy off-site.
  • Monitor Drive Health: Regularly check your storage drives using SMART tools (e.g., smartctl) or set up automated alerts to catch potential issues before they become critical.
  • Data Integrity: For enhanced data integrity on your Linux NAS, consider implementing ZFS on Linux if your hardware supports it. ZFS offers advanced features like data checksumming, snapshots, and RAID-Z for superior data protection against bit rot and drive failures, providing enterprise-grade reliability for your home server.

Enjoy your new, efficient, and secure network-attached storage solution!


FAQ

Question 1: How can I ensure data safety and prevent loss on my homemade Linux NAS?
Answer 1: A crucial point for any home server is data redundancy, as a NAS itself isn’t a backup. Implement a RAID configuration (e.g., RAID 1 or RAID 5, if you have multiple drives) to protect against single drive failures. More importantly, always follow the 3-2-1 backup strategy: at least three copies of your data, stored on two different types of media, with one copy off-site. Consider cloud backups or a second external drive for critical files. For enhanced data integrity, explore filesystems like ZFS on Linux, which offers checksumming and snapshots.

Question 2: What are the minimum hardware specifications required to build an effective Ubuntu NAS?
Answer 2: For a basic Linux NAS serving a few users, surprisingly modest hardware can suffice. A dual-core CPU (e.g., Intel Core 2 Duo or equivalent AMD) with 4GB of RAM is generally a good starting point for Ubuntu Server. The most critical component is reliable storage – ideally, enterprise-grade HDDs or SSDs if budget allows. Network connectivity is also key, so a Gigabit Ethernet port is highly recommended for faster data transfer speeds. Modern versions of Ubuntu Server are quite lightweight, making efficient use of older hardware.

Question 3: Is it safe to access my self-hosted NAS from outside my home network?
Answer 3: Directly exposing your Linux NAS to the internet is generally not recommended due to significant security risks. The safest approach for remote access is to set up a Virtual Private Network (VPN) server (e.g., OpenVPN or WireGuard) on your router or the NAS itself. This creates a secure, encrypted tunnel to your home network, allowing you to access your NAS as if you were local. Avoid port forwarding SMB/NFS directly. For SSH access, always use key-based authentication instead of passwords and consider changing the default SSH port.



Read the original article

0 Like this
Complete Guide hint Linux NAS Server Turn Ubuntu
Share. Facebook LinkedIn Email Bluesky Reddit WhatsApp Threads Copy Link Twitter
Previous ArticleThe gig workers who are training humanoid robots at home
Next Article Skills That Remain Valuable Even as AI Advances

Related Posts

Linux

Electronic Disinformation Drops – Pixelated Dwarf

April 5, 2026
Linux

Archinstall 4.0 Arch Linux Installer Released with New Textual UI

April 1, 2026
Linux

From Linux to Blockchain: The Infrastructure Behind Modern Financial Systems

April 1, 2026
Add A Comment
Leave A Reply Cancel Reply

Top Posts

AI Developers Look Beyond Chain-of-Thought Prompting

May 9, 202515 Views

6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

April 21, 202512 Views

Andy’s Tech

April 19, 20259 Views
Stay In Touch
  • Facebook
  • Mastodon
  • Bluesky
  • Reddit

Subscribe to Updates

Get the latest creative news from ioupdate about Tech trends, Gaming and Gadgets.

About Us

Welcome to IOupdate — your trusted source for the latest in IT news and self-hosting insights. At IOupdate, we are a dedicated team of technology enthusiasts committed to delivering timely and relevant information in the ever-evolving world of information technology. Our passion lies in exploring the realms of self-hosting, open-source solutions, and the broader IT landscape.

Most Popular

AI Developers Look Beyond Chain-of-Thought Prompting

May 9, 202515 Views

6 Reasons Not to Use US Internet Services Under Trump Anymore – An EU Perspective

April 21, 202512 Views

Subscribe to Updates

Facebook Mastodon Bluesky Reddit
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2026 ioupdate. All Right Reserved.

Type above and press Enter to search. Press Esc to cancel.