• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Setup NFS Share on Debian

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
53
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Requirements
  2. Private network
    1. Server
    2. Client
  3. Server configuration
  4. Client configuration
  5. Conclusion
  6. Want to contribute?


NFS is a network-based file system that allows computers to access files across a computer network. This guide explains how you can expose folders over NFS from one instance to another. Vultr’s private network feature assists you with securing the connections between the instances. Please note that you can also expose folders over NFS through the public internet, however, I highly recommend that you use a private network for security purposes. If you are sharing folders in different locations, an encrypted VPN can replace the private network. This guide assumes that both instances are in the same location.

Requirements

  • Two instances in the same physical location.
  • Debian 7 or newer.
  • Private networking enabled.
  • 10 minutes time.

Private network

Before getting started, ensure that your instances can ping each other and that they both have an unique IP assigned. For example, you can use these commands in order to comply with this article:

Server

ifconfig eth1 up
ip addr add 192.168.0.1/24 dev eth1

Client

ifconfig eth1 up
ip addr add 192.168.0.2/24 dev eth1

Once the servers can ping one another, continue on for configuration changes.

Server configuration

The following commands are run on the server-side on which the folder to be exposed is located. First, we start with installing the NFS server.

apt-get install nfs-kernel-server nfs-common

Now we can create the directory which will be exposed.

mkdir /opt/share
chown nobody:nogroup /opt/share
chmod 755 /opt/share

In order to expose the directory over NFS, open the file /etc/exports and attach the following line at the bottom:

/opt/share           192.168.0.2(rw,sync,no_subtree_check)

Start the NFS Server.

service nfs-kernel-server restart

Client configuration

We can now continue with mounting the folder on the client.

mkdir /mnt/share
mount 192.168.0.1:/opt/share /mnt/share

By running df -h, you can ensure that your operation was successful:

root@client> df -h
192.168.0.1:/opt/share  25.1G  0G  25.1G  0% /mnt/share

Additionally, by creating a file on the client and then checking the server, you will see the file appearing on the server immediately.

Conclusion

NFS is a great way to share files between multiple instances when using a central storage node. Happy hacking!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Setup Let’s Encrypt With Apache on Ubuntu 16.04

Next Post

Reset MySQL Root Password on Debian/Ubuntu

Next Post

Reset MySQL Root Password on Debian/Ubuntu

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet