Giter Site home page Giter Site logo

home-server's Introduction

Home server setup w/ DietPi

Setup a multi-function home server on a Raspberry Pi 4.

I'll use the DietPi operating system, which is a minimal image designed to run on small single board computers like my RPi. It also uses dialog boxes, so I won't have to remember command line commands any more than I need to.

I also won't connect the RPi to any keyboard or monitor. But, I've installed a desktop environment just in case I do need it.

Setup DietPi

  1. Add wifi network SSID and password to the dietpi-wifi.txt present in this repository.

  2. Edit the dietpi.txt file in this repository, fill in sensitive fields like passwords etc.

  3. Download latest image from DietPi.

  4. Mount the .img file (on macos: double click the file).

  5. Replace existing dietpi.txt, dietpi-wifi.txt files with the edited ones.

  6. Flash it to a USB drive using BalenaEtcher.

  7. Plug the USB drive into the RPi 4 and power it on.

  8. SSH into the RPi. Find the RPi's IP by logging into the router, or use nmap (instructions here).

# Hostname will work only if `avahi-daemon` was specified to be downloaded
# in `dietpi.txt` and DietPi's first boot setup is complete.
# Otherwise IP address of the RPi is needed.

ssh dietpi@<IP address / hostname.local from dietpi.txt>
  1. If DietPi's first boot setup is still running, a message will print on loop. Wait for it to finish.
# Follow the output of the first run setup
tail -n 10 -f /var/tmp/dietpi/logs/dietpi-firstrun-setup.log

# Check output of automation custom script run after install
cat /var/tmp/dietpi/logs/dietpi-automation_custom_script.log
  1. Reboot the RPi.
sudo shutdown -r now
  1. SSH into the RPi.
ssh dietpi@<HOSTNAME>.local
  1. Update everything.
sudo apt-get update
sudo apt-get upgrade

Setup an external media drive

  1. Organize the movies, shows, music on the drive for Plex. Follow this guide.

  2. Plug the drive into the RPi.

  3. Mount the drive using dietpi-drive_manager.

sudo dietpi-drive_manager
# Click through the menus to mount the drive in the default location
# /mnt/<UUID of drive>
  1. Verify new entry in /etc/fstab.
cat /etc/fstab
# A new entry should read near the end of the file:
# UUID=<UUID of drive> /mnt/<UUID of drive> <format> <options>

Setup Plex

  1. Plex is already installed if it was specified in dietpi.txt. Otherwise use dietpi-software to install it.

  2. Open http://<server hostname>.local:32400/web from any device on the same network as the server.

  3. Follow through with the setup on-screen. Add libraries from directories in /mnt/<UUID of drive>/.

  4. Disable video stream transcoding in Settings > Transcoder > Show Advanced > Disable video stream transcoding.

  5. Enjoy!

More setting up

  1. Change default download directory of qBittorrent. In the WebUI Settings > Downloads > Default Save Path. Note: Ensure the specified directory doesn't exist already. Otherwise qBittorrent may have insufficient permissions to write to it.

  2. Change netdata configuration to allow remote connections.

sudo nano /etc/netdata/netdata.conf
# Comment out the line 'bind socket to IP = 127.0.0.1'
sudo systemctl restart netdata
  1. Change directory served by ProFTPD.
sudo nano /etc/proftpd/proftpd.conf
# Edit `DefaultRoot` option
sudo systemctl restart proftpd

Using the desktop

  1. Run the dekstop (by default, the desktop environment is not run on startup).
startx

References

home-server's People

Contributors

shivambl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.