sudo docker run -p 9999:80 -itd --restart=unless-stopped binwiederhier/ntfy serve
docker run -d --restart=unless-stopped cloudflare/cloudflared:latest tunnel --no-autoupdate run --token "$CLOUDFLARE_TOKEN"
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
- sudo nano ~/.bashrc
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
Add this to docker-compose file in /opt
netdata:
image: netdata/netdata:stable
container_name: netdata
pid: host
network_mode: host
restart: unless-stopped
cap_add:
- SYS_PTRACE
- SYS_ADMIN
security_opt:
- apparmor:unconfined
volumes:
- netdataconfig:/etc/netdata
- netdatalib:/var/lib/netdata
- netdatacache:/var/cache/netdata
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /etc/localtime:/etc/localtime:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
- /var/log:/host/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NETDATA_CLAIM_TOKEN=h5lSpsyoDQtZ7TqE-N9WtEjl19uVxfNpcigT9ex9dK3u5EuPMB4AH-_Z2wdNGHuJ_dCZV8TX75EUPseupUEq0nMBwZ6t9Had84HqOYhUTpm6B-37j5O6_Y-S2xop_SGIUTvHHI8
- NETDATA_CLAIM_URL=https://app.netdata.cloud
- NETDATA_CLAIM_ROOMS=851ec14e-2a88-460b-9e10-4626dce9677e
volumes:
netdataconfig:
netdatalib:
netdatacache:
- To see attached external devices type this in terminal:
lsblk
- Spot your drive like in my case it is sdb1 under sdb
- You need to create a mount point:
sudo mkdir -p /mnt/external
- In case you get any error like this:
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
-
To solve this error please follow these commands:
-
Mount the drive manually
sudo mount /dev/sda1 /mnt/external
-
Verify it
ls /mnt/external
it should show the data of hdd -
Now get the UUID of HDD
sudo blkid /dev/sda1
it looks like this:UUID="01DA837C8C0D34B0"
-
Edit fstab:
sudo nano /etc/fstab
-
After adjusting add this line to the file
UUID=1234-5678-90AB-CDEF /mnt/external ntfs defaults 0 2
-
Save file and type
sudo mount -a
-
Please follow these instruction to share that HDD on local network
- /home/orangepi/Desktop/temp/jellyfin/config
- /home/orangepi/Desktop/temp/jellyfin/cache
version: "3.8"
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
network_mode: host
restart: unless-stopped
volumes:
- /mnt/external:/media
- /home/orangepi/Desktop/temp/jellyfin/config:/config
- /home/orangepi/Desktop/temp/jellyfin/cache:/cache
environment:
- UID=1000
- GID=1000
- For permission issue:
sudo chown -R 1000:1000 /mnt/external
- To restart jellyfin docker:
sudo docker-compose restart jellyfin
- To setup with docker compose:
version: '3.0'
services:
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- grafana-storage:/var/lib/grafana
volumes:
grafana-storage: {}
- To setup with terminal:
sudo apt update
sudo apt upgrade -y
sudo apt install -y apt-transport-https gnupg2 curl
curl https://packages.grafana.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/grafana-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/grafana-archive-keyring.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt update
sudo apt install -y grafana
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
services:
influxdb:
image: influxdb:latest
container_name: influxdb
ports:
- "8086:8086"
volumes:
- influxdb-data:/var/lib/influxdb
restart: always
volumes:
influxdb-data:
docker run -d \
-e POSTGRES_USER=odoo \
-e POSTGRES_PASSWORD=odoo \
-e POSTGRES_DB=postgres \
--name db \
--restart unless-stopped \
postgres:15
docker run -d \
-p 8069:8069 \
--name odoo \
--link db:db \
-t \
--restart unless-stopped \
odoo
sudo apt remove brltty
sudo mv /usr/lib/udev/rules.d/90-brltty-device.rules /usr/lib/udev/rules.d/90-brltty-device.rules.disabled
sudo mv /usr/lib/udev/rules.d/90-brltty-uinput.rules /usr/lib/udev/rules.d/90-brltty-uinput.rules.disabled
sudo udevadm control --reload-rules
Consider looking into this information as it uses the smb server (HDD mount in router).
Follow these steps to configure Samba for sharing the /mnt/external
directory on your Linux machine so it can be accessed from other devices on the same network:
sudo apt update
sudo apt install samba
Edit the Samba configuration file:
sudo nano /etc/samba/smb.conf
Add the following lines at the end of the file:
[External]
path = /mnt/external
browsable = yes
writable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
Ensure the directory has the appropriate permissions:
sudo chmod -R 0777 /mnt/external
sudo chown -R nobody:nogroup /mnt/external
Restart the Samba service to apply the changes:
sudo systemctl restart smbd
Ensure Samba is running without errors:
sudo systemctl status smbd
From a Windows machine, you can access the share by typing \\linux_ip\External
in the File Explorer's address bar.
Replace linux_ip
with the IP address of your Linux machine.
Here are the commands you need to run:
sudo fuser -v /dev/sda1
sudo fuser -k /dev/sda1
sudo umount /dev/sda1
sudo mount /dev/sda1 /mnt/external
- All the installation guid is present on this page.
- Navigate to required directory
cd /Desktop/projects/
- Create folder
mkdir dashy_config
- Create config file in created folder
cd dashy_config && sudo nano config.yaml
- In dashy past this content for now or try using backup.
- Create folder in dashy
mkdir icons && cd icons
- In dashy folder clone this repo:
git clone https://github.com/walkxcode/dashboard-icons.git
- Navigate to docker compose file
cd /opt
- Edit docker compose file add this service:
services:
dashy:
image: lissy93/dashy
container_name: Dashy
ports:
- 8080:8080
volumes:
- /home/orangepi/Desktop/projects/dashy_config/config.yml:/app/public/config.yml
- /home/orangepi/Desktop/projects/dashy_config/icons/dashboard-icons/png:/app/public/item-icons/icons
restart: unless-stopped
pageInfo:
title: Home Lab
sections: # An array of sections
- name: Example Section
icon: far fa-rocket
items:
- title: GitHub
description: Dashy source code and docs
icon: fab fa-github
url: https://github.com/Lissy93/dashy
- title: Issues
description: View open issues, or raise a new one
icon: fas fa-bug
url: https://github.com/Lissy93/dashy/issues
- name: Local Services
items:
- title: Firewall
icon: favicon
url: http://192.168.1.1/
- title: Game Server
icon: https://i.ibb.co/710B3Yc/space-invader-x256.png
url: http://192.168.130.1/
wget --content-disposition https://www.noip.com/download/linux/latest
sudo tar xf noip-duc_3.1.1.tar.gz
cd /home/$USER/noip-duc_3.1.1/binaries && sudo apt install ./noip-duc_3.1.1_arm64.deb
noip-duc -g all.ddnskey.com --username $no_ip_username --password $no_ip_password
sudo apt-get update
sudo apt-get install cifs-utils
sudo mkdir -p /mnt/smbshare
sudo mount -t cifs -o username=$SMB_USERNAME,password=$SMB_PASSWORD,vers=1.0 //192.168.1.1/g /mnt/smbshare
sudo nano /etc/fstab
//192.168.1.1/g /mnt/smbshare cifs username=$SMB_USERNAME,password=$SMB_PASSWORD,vers=1.0,iocharset=utf8 0 0
Follow these steps to configure your Ubuntu system to send emails using Gmail.
sudo apt-get update
sudo apt-get install postfix mailutils
- During installation, select "Internet Site" and use your system's hostname.
Edit /etc/postfix/main.cf
:
sudo nano /etc/postfix/main.cf
Add or update the following lines:
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Set your system's domain name: (if you havn't set during postfix installation)
echo "yourdomain.com" | sudo tee /etc/mailname
(Replace yourdomain.com
with your actual domain or hostname.)
Create /etc/postfix/sasl_passwd
:
sudo nano /etc/postfix/sasl_passwd
Add:
[smtp.gmail.com]:587 your_email@gmail.com:your_app_password
(Replace your_email@gmail.com
and your_app_password
.)
sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo systemctl restart postfix
echo "Test email from Ubuntu" | mail -s "Test Email" recipient@example.com
(Replace recipient@example.com
with the recipient's email address.)