Tag Archives: server

Samba : Set Up Your Raspberry Pi As A Local Network File Server

Samba is the Linux implementation of the SMB/CIFS file sharing standard used by Windows PCs and Apple computers and widely supported by media streamers, gaming consoles, and mobile apps. In this tutorial, you will learn how to use a Raspberry Pi as a file server where you can save backups and share files with all the other computers on your network using Samba.

You need the following things for this tutorial:

  • A keyboard (Wired or wireless)
  • A mouse (Wired or wireless)
  • Raspberry Pi (Model 3B is recommended)
  • A 32GB (or smaller) micro SD card
  • Internet connection (Only to download Samba)

The SD card must have a reasonable amount of free storage space without requiring any extra steps to make it accessible. However, if you want extra storage, simply mount a large USB drive and create a Samba entry for it. If you want to keep your Samba file server compact and portable, install Raspbian on a 128Gb or 256GB SD card. Before purchasing, check online whether the SD card is fully compatible with Raspberry Pi or not.

Install Samba

Samba is available in Raspbian’s standard software repositories. Update your repository index, make sure that the operating system is fully updated, and install Samba using apt-get. Open a Terminal and type:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install samba samba-common-bin

The download and installation process will start and it will take a while depending on your internet speed.

Create A Shared Directory

Now you need to create a shared directory that will be accessible by other PCs/mobiles connected to the same network. You can put it anywhere, but in this tutorial, it will be at the top level of the root file system of the Pi’s microSD card. Type the following command:

sudo mkdir -m 1777 /share

To help prevent the directory from being unintentionally deleted, the above command sets the sticky bit (1) and gives everyone read/write/execute (777) permissions on the shared directory.

Configure Samba

In this step, edit the smb.conf  file to configure Samba to share the selected directory and allow users to perform various actions like read, write etc. Open the smb.conf file using the following command:

sudo leafpad /etc/samba/smb.conf

You need to add the following entry:

[share]
Comment = Pi shared folder
Path = /share
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes
Configure Samba On Raspberry Pi
Configure Samba On Raspberry Pi

As per the above configuration, anyone can read, write, and execute files in the shared directory, either by logging in as a Samba user or as a guest. Just omit the guest ok = yes line if you don’t want to allow guests. To share a larger external hard disk, simply create a smb.conf entry for the path you want to share across the network (here the external hard disk).

Create A User & Start Samba

Everything is configured and now it’s time to create a user. To set up a password for the user, enter the following command:

sudo smbpasswd -a pi

Then set a password as prompted. It’s recommended that the password should be different from your Pi’s login password. Finally, restart the Samba and set it to start automatically when the Raspberry Pi starts up. Enter the following command:

sudo /etc/init.d/samba restart

Once you’ve made sure that you can locate your shared folder on the network, you can safely disconnect the mouse, monitor, and keyboard from your Pi and just leave it running as a headless file server.

Esp8266 WebServer farm

An Esp8266 WebServer farm project by Eldon Brown’s (a.k.a WA0UWH)

After several long months, I have reactivated my Esp8266 WebServer Farm.
Currently, one of my WebServers can be accessed as: esp.wa0uwh.com:8154

Esp8266 WebServer farm – [Link]

Exploring the Transcend Wifi-SD card

Transcend-WifiSD-16Go-512px_805434CD

James O’Neill explores a Transcend SD that he believes it’s the smaller Linux server. It’s actually a 16GB memory card, an ARM processor and a WIFI chip all in an SD card package.

The way these cards works is different from the better known Eye-FI card. They are SERVERS : they don’t upload pictures to a service by themselves, instead they expect a client to come to them, discover the files they want and download them. The way we’re expected to do this is using HTTP , either from a web browser or from an App on a mobile device which acts as wrapper for the same HTTP requests.

Exploring the Transcend Wifi-SD card – [Link]

AutoResetRRR – Automatically reset routers/cameras/servers

DSC_5624-600x398

“bogdan” published a new project, a device able to automatically reset your router, camera or server.

AutoResetRRR is a kind electronic frustration reducing device: it cuts the power periodically to devices that can go nuts (routers, net cams, servers), but it does give a heads up. If all is well, they can shut down safely and start back up. If not, the power cycle can fix a thing or two.

AutoResetRRR – Automatically reset routers/cameras/servers – [Link]

Raspberry Pi Web Server using Flask to Control GPIOs

Rpi_server

In this article “Rui Santos” shows us how to configure Raspberry Pi as server and use it to toggle two LEDs over the internet.

In this project you’ll create a standalone web server with a Raspberry Pi that can toggle two LEDs. You can replace those LEDs with any output (like a relay or a transistor). In order to create the web server you will be using a Python microframework called Flask.

Raspberry Pi Web Server using Flask to Control GPIOs – [Link]

Raspberry Pi 2 Web Hosting – Full Email Server & Web Server

LDSrelience shared this video on Youtube!

This is a short video going over a project I just finished to prove that a Raspberry Pi 2 Model B (new as of February 2015) can run a light duty website and low volume email server. I have installed Apache2 for the web server, which takes like 2 minutes for the basic install, and Postfix and Dovecot for the email server. The mail server definitely takes longer to set up but with the detailed, step by step instructions available at the link below it is really easy to do.

Raspberry Pi 2 Web Hosting – Full Email Server & Web Server – [Link]

How to Set Up a Raspberry Pi FTP Server

NewImage-169

This tutorial will guide you through the process of installing an FTP server on Raspberry Pi. Check it out:

For uploading files on a Raspberry Pi you should install a FTP server. Such a server is very useful if you use your Pi as a web server or even if you want to have a network storage, which can also be accessed outside of your network if an DNS server is installed.

However this tutorial is not only for web server but can also be used for easy file transfer between Raspberry Pi and your PC.

How to Set Up a Raspberry Pi FTP Server – [Link]