Kherbin's personal homeserver using nextcloud because why not?
- Nextcloud web app
- MariaDB database
- Works with Android, Laptop, PC using Tailscale
- Wake-on-LAN support
- Own Data Storage
- For reproduction
- Main Server (PC or Laptop)
- Operating System: Arch Linux
- Extra Storage for Cloud
- Wake-on-LAN supported Motherboard (Optional)
I personally recommend getting a Raspberry Pi for remote SSH Wake-on-Lan or any always on device. Even an old laptop could work :>>
With all the microservices they've been feeding us lately from
- Limited Cloud Storage
- A.I. Bloat
- Spyware
I wanted to host my own Server that I can run locally. Every software I utilized is free and opensource.
├── scripts/
│├── install.sh
│├── start.sh
├── .gitignore
├── README.md
├── docker-compose.yaml
git clone https://github.com/CodeKheb/Homelab-server.git
cd Homelab-serverChange
- SQL Password in MariaDB
nano docker-compose.yml
or
vim docker-compose.ymlservices:
db:
image: mariadb:10.11
container_name: nextcloud-db
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
MYSQL_ROOT_PASSWORD: rootpass123 # change this for access to root
MYSQL_DATABASE: nextcloud
MYSQL_USER: yourUsername123 # change your SQL username
MYSQL_PASSWORD: whateverPassword123 # change this to your strong password
volumes:
- db_data:/var/lib/mysql
app:
image: nextcloud
container_name: nextcloud-app
ports:
- 8080:80 # change this to whatever local port you want e.g 8090:80 -> this will be used for access to nextcloud. Tailwind IP + local port
restart: always
links:
- db
environment:
MYSQL_HOST: db
MYSQL_DATABASE: nextcloud
MYSQL_USER: yourUsername123 # change your username
MYSQL_PASSWORD: whateverPassword123 # change this to your strong password
volumes:
- ./data:/var/www/html
volumes:
db_data:
bash scripts/install.sh- Installs Docker, Docker Compose, and Tailscale
- Makes data folders
bash scripts/start.shEnable Tailscale
sudo systemctl enabled --now tailscaledAuthenticate and Login
sudo tailscale upCheck IP
tailscale ip -4Copy this IP for this will be important for nextcloud later
To backup your other files from your other Computers, you can install tailscale as well
If you haven't installed tailscale with the script
Arch Linux
sudo pacman -S tailscaleYou need to use curl for most other Linux Distros
Tailscale is not available in most default repos
Enable Tailscale
sudo systemctl enabled --now tailscaledAuthenticate and Login
sudo tailscale upYou should be able to see every devices connected including your Main Server by visiting: Tailscale
- Install Tailscale on Playstore
- Login with your preferred account
I personally use a google account
- Login with same account used in your Main Server
This should automatically connect you to your own VPN You should see:
├── Main Server Name
├── Android Phone Name
├── Laptop Name Put in your tailscale ip on your Main server
http://100.XX.XXX.XXX:8080 Change :8080 Your Local Port in docker-compose.yml
This should open nextcloud and ask you to login or make an account
On your other devices, try sending a file through nextcloud and see if it works
- On Android Download nextcloud in the playstore and login using the IP
- On Laptop or Another PC Put in your chosen browser the exact same ip and port used in your main server, this should ask you to login, put the same login credentials as your main server
Added this also for our TV and to view downloaded media locally from the server in all connected devices
cd ~/Homelab-Server/jellyfinnano docker-compose.yml services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
network_mode: "host"
volumes:
- ~/media/Shows:/shows #change to whatever directory you want
- ~/media/Movies:/movies # :/show and :/movies will show up in jellyfin path
- ./config:/config
- ./cache:/cache
- /mnt/media:/media
restart: unless-stoppeddocker compose upWill write a script for this soon, babes
TO BE CONTINUED More to ADD !!