new install
This commit is contained in:
@@ -1,3 +1,91 @@
|
||||
## Server Setup
|
||||
|
||||
```sh
|
||||
ssh-keygen -t ed25519 -C "null" -f ~/.ssh/id_gitlab_home
|
||||
|
||||
cat .ssh/id_gitlab_home.pub
|
||||
|
||||
sudo apt install docker
|
||||
sudo apt install docker-compose
|
||||
sudo apt install nfs-kernel-server
|
||||
sudo apt install nfs-common
|
||||
sudo apt install nfs-utils
|
||||
sudo apt install nmap
|
||||
sudo apt install sshfs
|
||||
sudo apt install libnfs-utils
|
||||
sudo apt install fail2ban
|
||||
sudo apt install ncdu
|
||||
sudo apt install ddclient
|
||||
|
||||
|
||||
sudo systemctl start fail2ban.service
|
||||
sudo systemctl enable fail2ban.service
|
||||
docker network create traefik
|
||||
|
||||
docker volume create --driver local --opt type=nfs --opt o=addr=192.168.1.110,rw,vers=4 --opt device=:/media --name nfs_data
|
||||
sudo usermod -aG docker $USER
|
||||
```
|
||||
|
||||
## Add Key To config
|
||||
|
||||
```sh
|
||||
nano .ssh/config
|
||||
|
||||
Host gitlab.com
|
||||
IdentityFile ~/.ssh/id_gitlab_home
|
||||
|
||||
```
|
||||
|
||||
## PROJECTS
|
||||
|
||||
```sh
|
||||
git clone git@gitlab.com:null4bl3/home_server.git
|
||||
git clone git@gitlab.com:null4bl3/server-scripts.git
|
||||
git clone git@gitlab.com:null4bl3/bitbot_ai.git
|
||||
git clone git@gitlab.com:null4bl3/madplan_simple.git
|
||||
git clone git@gitlab.com:null4bl3/tinkersynth.git
|
||||
|
||||
```
|
||||
|
||||
## UFW
|
||||
|
||||
```sh
|
||||
sudo ufw allow 80
|
||||
sudo ufw allow 443
|
||||
sudo ufw allow 22
|
||||
sudo ufw allow 8096
|
||||
sudo ufw allow 8097
|
||||
sudo ufw allow 8384
|
||||
sudo ufw allow 3040
|
||||
sudo ufw allow 51820
|
||||
sudo ufw allow 51821
|
||||
sudo ufw allow 21027
|
||||
sudo ufw allow 32400
|
||||
sudo ufw allow 2222
|
||||
sudo ufw allow 8888
|
||||
sudo ufw allow 4444
|
||||
sudo ufw allow 22000
|
||||
sudo ufw allow 21027
|
||||
```
|
||||
|
||||
## FSTAB
|
||||
|
||||
```sh
|
||||
192.168.1.110:/i-data/b695a7f6/nfs/media /home/null/shares/disk1 nfs rw,auto,vers=3,nofail,noatime,nolock,timeo=14 0 0
|
||||
```
|
||||
|
||||
|
||||
## SSH
|
||||
|
||||
```sh
|
||||
sudo nano /etc/ssh/sshd_config
|
||||
|
||||
Port 8888
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
## Directories in /srv
|
||||
|
||||
```bash
|
||||
@@ -21,101 +109,6 @@ drwxrwxr-x 3 null null 4096 Jan 28 12:25 xbs
|
||||
drwxrwxr-x 5 null null 4096 Aug 7 2020 znc
|
||||
```
|
||||
|
||||
OR tree:
|
||||
|
||||
|
||||
```sh
|
||||
.
|
||||
├── cube
|
||||
│ └── schema
|
||||
├── dim
|
||||
├── emby
|
||||
│ ├── cache
|
||||
│ ├── config
|
||||
│ ├── data
|
||||
│ ├── logs
|
||||
│ ├── metadata
|
||||
│ ├── plugins
|
||||
│ ├── root
|
||||
│ └── transcoding-temp
|
||||
├── emu
|
||||
│ ├── config
|
||||
│ └── data
|
||||
├── file_browser
|
||||
├── ftp
|
||||
├── gitea
|
||||
│ ├── git
|
||||
│ ├── gitea
|
||||
│ └── ssh
|
||||
├── gitlab
|
||||
│ ├── config
|
||||
│ ├── data
|
||||
│ └── logs
|
||||
├── gitlab-runner
|
||||
├── http
|
||||
├── jellyfin
|
||||
│ └── config
|
||||
├── kuma
|
||||
│ ├── kuma.db
|
||||
│ ├── kuma.db.bak0
|
||||
│ ├── kuma.db-shm.bak0
|
||||
│ ├── kuma.db-wal.bak0
|
||||
│ └── upload
|
||||
├── mastodon
|
||||
│ ├── postgres14
|
||||
│ ├── redis
|
||||
│ ├── sidekiq
|
||||
│ └── web
|
||||
├── nextcloud
|
||||
│ ├── apps
|
||||
│ ├── config
|
||||
│ ├── data
|
||||
│ └── database
|
||||
├── plausible-clickhouse
|
||||
│ ├── clickhouse-config.xml
|
||||
│ ├── clickhouse-user-config.xml
|
||||
│ └── event-data
|
||||
├── plausible-db-data [error opening dir]
|
||||
├── plausible-geoip
|
||||
├── plex
|
||||
├── portainer
|
||||
│ └── portainer-data
|
||||
├── syncthing
|
||||
│ ├── cert.pem
|
||||
│ ├── config.xml
|
||||
│ ├── config.xml.v0
|
||||
│ ├── csrftokens.txt
|
||||
│ ├── https-cert.pem
|
||||
│ ├── https-key.pem
|
||||
│ ├── index-v0.14.0.db
|
||||
│ ├── key.pem
|
||||
│ └── Sync
|
||||
├── tmm
|
||||
├── traefik
|
||||
├── vaultwarden_data
|
||||
│ ├── attachments
|
||||
│ ├── db.sqlite3
|
||||
│ ├── db.sqlite3-shm
|
||||
│ ├── db.sqlite3-wal
|
||||
│ ├── icon_cache
|
||||
│ ├── rsa_key.pem
|
||||
│ ├── rsa_key.pub.pem
|
||||
│ ├── sends
|
||||
│ ├── tmp
|
||||
│ └── vaultwarden.log
|
||||
├── vaultwarden_data_backup [error opening dir]
|
||||
├── youtube_dl
|
||||
│ ├── appdata
|
||||
│ ├── db
|
||||
│ └── users
|
||||
└── znc
|
||||
├── configs
|
||||
├── moddata
|
||||
├── users
|
||||
└── znc.pem
|
||||
```
|
||||
|
||||
|
||||
Create the `traefik` network
|
||||
|
||||
```sh
|
||||
@@ -327,6 +320,32 @@ password=<NAMECHEAP_GENERATED_TOKEN>
|
||||
@
|
||||
```
|
||||
|
||||
```sh
|
||||
# Configuration file for ddclient generated by debconf
|
||||
#
|
||||
# /etc/ddclient.conf
|
||||
|
||||
protocol=namecheap \
|
||||
use=web, web=https://api.ipify.org/ \
|
||||
login=kattemonster \
|
||||
password='686559cf45c34d82820f0851a2cb6f0d' \
|
||||
|
||||
protocol=namecheap \
|
||||
use=web, web=https://api.ipify.org/ \
|
||||
login=kattemonster \
|
||||
password='8ba0d60246904f93ab77d4c80c79f8c0' \
|
||||
|
||||
protocol=namecheap \
|
||||
use=web, web=https://api.ipify.org/ \
|
||||
login=kattemonster \
|
||||
password='e347224ae801444dae7e48b4f4e40556' \
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
and in the root crontab:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user