Skip to content

Blender Files for 3D printable Raspberry Pi 3 Home Server case & my setup

Notifications You must be signed in to change notification settings

kritish-dhaubanjar/pi-3-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Raspberry Pi 3 Home Server

Concept Design
Concept Design Final Output
blender final
ssh-copy-id -i id_rsa.pub -o PreferredAuthentications=password pi@raspberrypi.local
sudo apt install cockpit

http://raspberrypi.local:9090

cokcpit

3. Mount Drive on Startup
sudo blkid

eg:

/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="5DE4-665C" TYPE="vfat" PARTUUID="a9fad9e6-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="7295bbc3-bbc2-4267-9fa0-099e10ef5bf0" TYPE="ext4" PARTUUID="a9fad9e6-02"
/dev/mmcblk0: PTUUID="a9fad9e6" PTTYPE="dos"
/dev/sda1: UUID="6CEE-A6AE" TYPE="vfat" PARTUUID="21164028-01"
/dev/sda3: UUID="71eb8c46-747a-4d40-b04c-2ad101fcb550" TYPE="ext4" PARTUUID="21164028-03"
/dev/sda5: UUID="57abd1e6-9bea-4ea0-a417-f41ce4e801eb" TYPE="ext4" PARTUUID="21164028-05"
sudo mkdir /mnt/titan
sudo mkdir /mnt/atlas
sudo vi /etc/fstab

eg: UUID=<uuid-of-your-drive> <mount-point> <file-system-type> <mount-option> <dump> <pass>

UUID=71eb8c46-747a-4d40-b04c-2ad101fcb550 /mnt/atlas ext4 defaults 0 2
UUID=57abd1e6-9bea-4ea0-a417-f41ce4e801eb /mnt/titan ext4 defaults 0 2
4. SAMBA Server
sudo mount -a
sudo apt install samba
vi /etc/samba/smb.conf
[titan]
comment = Titan
  path = /mnt/titan
  guest ok = no
  browseable = yes
  create mask = 0755
  valid users = pi
  directory mask = 0755
  read only = no

[atlas]
comment = Atlas
  path = /mnt/atlas
  guest ok = no
  browseable = yes
  create mask = 0755
  valid users = pi
  directory mask = 0755
  read only = no
sudo smbdpassw -a pi

smb://raspberrypi.local

samba

sudo apt install transmission-daemon
sudo systemctl stop transmission-daemon

sudo mkdir -p /mnt/titan/torrent/torrent-inprogress
sudo mkdir -p /mnt/titan/torrent/torrent-complete

sudo chown -R pi:pi /mnt/titan/torrent/torrent-inprogress
sudo chown -R pi:pi /mnt/titan/torrent/torrent-complete

sudo vi /etc/transmission-daemon/settings.json
...
"incomplete-dir": "/mnt/titan/torrent/torrent-inprogress",
"incomplete-dir-enabled": true,
...
"download-dir": "/mnt/titan/torrent/torrent-complete",
"rpc-password": "Your_Password",
"rpc-username": "Your_Username",
"rpc-whitelist": "192.168.*.*",
sudo vi /etc/init.d/transmission-daemon
USER=pi
sudo vi /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
USER=pi
sudo systemctl daemon-reload
sudo chown -R pi:pi /etc/transmission-daemon
sudo mkdir -p /home/pi/.config/transmission-daemon/
sudo ln -s /etc/transmission-daemon/settings.json /home/pi/.config/transmission-daemon/
sudo chown -R pi:pi /home/pi/.config/transmission-daemon/
sudo systemctl start transmission-daemon

http://raspberrypi.local:9091

transmission

sudo apt install mariadb-server
sudo mysql
GRANT ALL ON *.* TO 'pi'@'localhost' IDENTIFIED BY 'raspberry' WITH GRANT OPTION;
exit
FLUSH PRIVILEGES;
sudo apt install
sudo mkdir /var/www/html/nextcloud
cd /var/www/html/nextcloud
sudo chown -R www-data:www-data /var/www/html/nextcloud/
sudo wget https://download.nextcloud.com/server/installer/setup-nextcloud.php

sudo apt install apache2 libapache2-mod-php7.4
sudo apt install php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl
sudo apt install php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip
sudo mysql -u pi -p
CREATE DATABASE nextclouddb;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY '[PASSWORD]';
GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;

http://raspberrypi.local/nextcloud

mkdir /mnt/titan/nextcloud
chmod -R 770 /mnt/titan/nextcloud
cd /mnt/titan/nextcloud
touch .ocdata
sudo chown www-data:www-data nextcloud

nextcloud

sudo apt-get install apt-transport-https
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt-get update
sudo apt install plexmediaserver

http://raspberrypi.local:32400/web

plex

nvim /etc/systemd/system/strongB0x.service
[Unit]
Description=StrongB0x account service

[Service]
Type=simple
Restart=always
RestartSec=1
User=www-data
WorkingDirectory=/mnt/titan/Projects/strongB0x-php
ExecStart=/usr/bin/env php artisan serve --host=0.0.0.0

[Install]
WantedBy=multi-user.target
sudo systemctl restart strongB0x.service

strongB0x-php

http://raspberrypi.local:8000

curl -sSL https://install.pi-hole.net | bash

image

image

image

http://<IP_ADDPRESS_OF_YOUR_PI_HOLE>/admin/

curl -s https://www.dataplicity.com/2pm1e433.py | sudo python

dataplicity

/etc/cockpit/cockpit.conf

[WebService] 
Origins = https://www.example.net wss://www.example.net
ProtocolHeader = X-Forwarded-Proto
location / {
  proxy_pass http://127.0.0.1:9090;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $host;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
}
  1. Install dnsmasq
sudo apt install dnsmasq
  1. Assign Static IP Address
sudo vim /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.88.254/24
  1. Enable DHCP Server in eth0
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bak
sudo vim /etc/dnsmasq.conf
interface=eth0
dhcp-range=192.168.88.100,192.168.88.253,255.255.255.0
  1. Enable IPv4 forwarding
sudo vim /etc/sysctl.conf

net.ipv4.ip_forward=1

  1. iptable Rules
vim /etc/rc.local
...
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
exit 0

image

About

Blender Files for 3D printable Raspberry Pi 3 Home Server case & my setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published