formatting upgrade

main
Mel 3 years ago
parent 4f5f6e77b4
commit 4f015a84aa

@ -0,0 +1,33 @@
/* Adding a "Back to Top" function on Page end. Modified with the help from other members at Obsidian Forum */
/* To use this function:
1. first put a " ^Top" as an anchor at the begining of the page (exclude the double quotation marks)
2. then put "[[#^Top|TOP]]" at the end of the page (exclude the double quotation marks)
*/
.internal-link[data-href="#^Top"] {
width: 80px;
height: 40px;
border-radius: 10px 10px 0px 0px;
background-color: var(--background-primary-alt);
box-shadow: 0px 0px 4px darkgrey;
text-align: center;
color: #E01A45;
padding-top: 15px;
line-height: 100%;
font-weight: bold;
font-size: 14px;
position: fixed;
bottom: 0;
right: 5%;
margin: 0;
}
.internal-link[data-href="#^Top"]:hover {
background-color: #E01A45;
color: white;
box-shadow: 0px 5px 8px black;
}
.popover.hover-popover {
display: none;
}

@ -9,7 +9,7 @@
"state": {
"type": "markdown",
"state": {
"file": "03.01 Reading list/@Reading master.md",
"file": "05.01 Computer setup/Threats and Intrusions.md",
"mode": "preview"
}
}
@ -76,7 +76,7 @@
"state": {
"type": "backlink",
"state": {
"file": "03.01 Reading list/@Reading master.md",
"file": "05.01 Computer setup/Threats and Intrusions.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -115,15 +115,15 @@
},
"active": "c1cbd199334b4022",
"lastOpenFiles": [
"03.01 Reading list/@Reading master.md",
"03.03 Recipes/@@Recipes.md",
"05.02 Networks/@Networks.md",
"05.01 Computer setup/Threats and Intrusions.md",
"05.01 Computer setup/Storage and Syncing.md",
"05.01 Computer setup/Privacy & Security.md",
"05.01 Computer setup/Internet services.md",
"05.01 Computer setup/Email & Communication.md",
"05.01 Computer setup/@Computer Set Up.md",
"03.03 Recipes/@Main dishes.md",
"06.02 Investments/Crypto Investments.md",
"02.02 Paris/@@Paris.md",
"02.01 London/@@London.md",
"02.01 London/@Restaurants London.md",
"02.01 London/@Café London.md"
"03.02 Travels/@Travels.md",
"06.01 Finances/hLedger.md",
"06.02 Investments/@Investment master.md",
"06.02 Investments/VC Investments.md"
]
}

@ -1,5 +1,5 @@
```ad-command
~~~
~~~bash
<% tp.file.selection() %>
~~~
```

@ -11,7 +11,7 @@ class globalFunc {
} else if (!Array.isArray(iarg1)) {
let tempresult = false
for (let i = 0; i < iarg2.length; i++) {
tempresult = tempresult || this.compareData(iarg1, iarg2[i]) > -1
tempresult = tempresult || this.compareData(iarg1, iarg2[i])
}
var resultdc = tempresult
} else if (!Array.isArray(iarg2)) {
@ -400,7 +400,7 @@ class globalFunc {
switch(label) {
case 'French':
tempresult = "🇫🇷"
break;
break;
case 'Italian':
tempresult = "🇮🇹"
break;
@ -471,7 +471,7 @@ class globalFunc {
tempresult = "🐠"
break;
default:
tempresult = cuisine
tempresult = label
}
return tempresult
}

@ -0,0 +1,4 @@
const {globalFunc} = customJS
let {invtype, dateadded, style, stage, ccy, theme, tradingd, tradingp} = input;
dv.el('t', "<b>🔎 search terms:</b> \n• " + globalFunc.buildToPrint([invtype, dateadded, style, stage, ccy, theme, tradingd, tradingp], ["invtype", "dateadded", "style", "stage", "ccy", "theme", "tradingd", "tradingp"], "\n• "));

@ -1,5 +1,6 @@
---
cssclass: recipeTable
QPType: Restaurant
QPStyle:
QPAmbiance:

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Bars London", "Bars in London"]
Tag: ["London", "Bar"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Brunches London", "Brunches in London"]
Tag: ["London", "Brunch"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Cafés in London"]
Tag: ["Personal", "Lifestyle", "Café"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Restaurants London", "Restaurants in London"]
Tag: ["London", "Restaurant"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Sport in London"]
Tag: ["Personal", "Lifestyle", "Sport"]
Date: 2021-10-04

@ -7,6 +7,7 @@ QPKeyword: Terrace
QPArea:
QPStatus:
QPDAdded:
cssclass: recipeTable
Alias: ["Paris"]
Tag: ["Personal", "Life"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Bars Paris", "Bars in Paris"]
Tag: ["Paris", "Bar"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Hotels Paris", "Hotels in Paris"]
Tag: ["Paris", "Hotel"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Restaurants Paris", "Restaurants in Paris"]
Tag: ["Paris", "Restaurant"]
Date: 2021-10-04

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Sport in Paris"]
Tag: ["Personal", "Lifestyle", "Sport"]
Date: 2021-10-04

@ -6,6 +6,7 @@ QueryLanguage:
QueryAuthor:
QueryPublishedD:
QueryReadD:
cssclass: recipeTable
Alias: ["Reading", "Reading list"]
Tag: ["Lifestyle", "LifeHacks", "Book"]
Date: 2021-09-25

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Travels"]
Tag: ["Lifehacks", "Travel"]
Date: 2021-09-21

@ -8,6 +8,7 @@ QueryTheme: Healthy
QueryFavourite:
QueryRating: ""
QueryCookingTime: ""
cssclass: recipeTable
Alias: ["Recipes"]
Tag: ["Lifestyle", "Food", "Cooking"]
Date: 2021-10-20

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Desserts"]
Tag: ["Sweet"]
Date: 2021-10-21

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Main dishes", "Main Dishes"]
Tag: [""]
Date: 2021-10-21

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Side dishes"]
Tag: ["Vegetable", "Salad"]
Date: 2021-10-21

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Snacks"]
Tag: ["Sweet", "Savoury", "ComfortFood"]
Date: 2021-10-21

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["ComputerSetup", "Computer Setup"]
Tag: ["Admin", "Computer", "App", "Cloud"]
Date: 2021-08-10

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Tag: ["Computer", "Email"]
Date: 2021-09-28
DocType: Personal

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Privacy"]
Tag: ["Admin", "Computer", "Security", "Privacy"]
Date: 2021-08-10

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Storage & Sync"]
Tag: ["Admin", "Computer", "Cloud", "Privacy"]
Date: 2021-08-10

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Tag: ["Admin", "Computer", "Security", "CommandLine", "STIX"]
Date: 2021-08-10
DocType: "Personal"

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Tag: ["Computer", "Networks", "Web", "App"]
Date: 2021-08-28
DocType: "Personal"

@ -58,7 +58,7 @@ style: number
1. **Pull the software signature key & image**
```ad-command
~~~
~~~bash
echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" | sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
~~~
```
@ -66,7 +66,7 @@ echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" | sudo tee -a /etc/apt/sou
3. **Install caddy**
```ad-command
~~~
~~~bash
sudo apt update
sudo apt install caddy
~~~
@ -85,7 +85,7 @@ Go to the homepage to see the caddy default page.
PHP needs to be enabled for caddy to work.
```ad-command
~~~
~~~bash
sudo add-apt-repository ppa:ondrej/php
sudo apt install php-cli php-fpm php-mysql
~~~
@ -94,7 +94,7 @@ sudo apt install php-cli php-fpm php-mysql
Check if php is installed correctly:
```ad-command
~~~
~~~bash
php --version
~~~
```
@ -118,7 +118,7 @@ Caddy will fetch a **SSL certificate** for all sub-domains and addresses present
1. Create a default website folder
```ad-command
~~~
~~~bash
sudo mkdir -p /var/www/html
~~~
```
@ -126,7 +126,7 @@ sudo mkdir -p /var/www/html
2. Create a default log folder
```ad-command
~~~
~~~bash
sudo mkdir /var/log/caddy
sudo chown -R caddy:caddy /var/log/caddy
~~~
@ -191,7 +191,7 @@ listen.group = caddy
Once this is done, restart php:
```ad-command
~~~
~~~bash
sudo systemctl restart php7.4-fpm
~~~
```
@ -287,7 +287,7 @@ title: Tutorial
1. **Creat hashed passwords**
```ad-command
~~~
~~~bash
caddy hash-password
~~~
```
@ -399,7 +399,7 @@ A full repository of commands can be found [here](https://caddyserver.com/docs/)
#### Start/Stop/Restart
```ad-command
~~~
~~~bash
sudo systemctl start/stop/restart caddy
~~~
```
@ -411,7 +411,7 @@ sudo systemctl start/stop/restart caddy
Once config amended just run:
```ad-command
~~~
~~~bash
sudo systemctl reload caddy
~~~
```

@ -58,7 +58,7 @@ style: number
1. **Prerequisites**
```ad-command
~~~
~~~bash
sudo apt update
sudo apt install curl apt-transport-https ca-certificates software-properties-common
~~~
@ -69,7 +69,7 @@ If the packages are already installed and to the latest version, the OS will ski
2. **Pull the software signature key & image**
```ad-command
~~~
~~~bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key ad
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
~~~
@ -78,7 +78,7 @@ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubun
3. **Install docker**
```ad-command
~~~
~~~bash
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
~~~
@ -87,7 +87,7 @@ sudo apt install docker-ce docker-ce-cli containerd.io
4. **Test install**
```ad-command
~~~
~~~bash
sudo systemctl status docker
~~~
```
@ -99,7 +99,7 @@ sudo systemctl status docker
Users with sudo rights need to be added to the 'docker' group for being able to instruct docker:
```ad-command
~~~
~~~bash
sudo gpasswd -a (username) docker
sudo newgrp docker
~~~
@ -112,7 +112,7 @@ sudo newgrp docker
Docker-compose is a script generatir enabling leaner execution and update of each container. The following commands install the wizard.
```ad-command
~~~
~~~bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
~~~
```
@ -120,7 +120,7 @@ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-
File permissions need to be changed for docker-compose to be executable:
```ad-command
~~~
~~~bash
sudo chmod +x /usr/local/bin/docker-compose
~~~
```
@ -128,7 +128,7 @@ sudo chmod +x /usr/local/bin/docker-compose
Installation can be checked as follows:
```ad-command
~~~
~~~bash
sudo dockercompose --version
~~~
```
@ -148,7 +148,7 @@ sudo dockercompose --version
In order for docker to work, each container needs an internal IP address. This is defined by an internal docker network as follows:
```ad-command
~~~
~~~bash
sudo docker network create --driver=bridge --subnet=xxx.yyy.zzz.0/24 --gateway=xxx.yyy.zzz.1 dockernet
~~~
```
@ -166,7 +166,7 @@ Containers are created through docker-compose. Tutorial exist for each applicati
3. The docker-compose command for initialisation must be run from the folder:
```ad-command
~~~
~~~bash
sudo docker-compose up -d
~~~
```
@ -203,7 +203,7 @@ The command needs to be run periodically.
For updating containers, just amend the docker-compose file and run the following command to preserve the mounted data:
```ad-command
~~~
~~~bash
docker-compose up -d
~~~
```
@ -219,7 +219,7 @@ Docker does not have a standard way to update environment variables, and require
1. **stop docker**
```ad-command
~~~
~~~bash
sudo systemctl stop docker
~~~
```
@ -243,7 +243,7 @@ Within the 'Env' declaration, add the requested data field:
3. **Restart docker**
```ad-command
~~~
~~~bash
sudo systemctl start docker
~~~
```
@ -261,7 +261,7 @@ sudo systemctl start docker
#### List containers
```ad-command
~~~
~~~bash
docker container ls
~~~
```
@ -271,7 +271,7 @@ docker container ls
#### Execute commands in container
```ad-command
~~~
~~~bash
docker exec -it -u (username) (command)
~~~
```

@ -88,7 +88,7 @@ http://vpn.mfxm.fr:2812
The program is within the **apt** library:
```ad-command
~~~
~~~bash
sudo apt-get install monit
~~~
```
@ -96,7 +96,7 @@ sudo apt-get install monit
Once installed, it needs to be enabled:
```ad-command
~~~
~~~bash
sudo systemctl enable --now monit
~~~
```
@ -104,7 +104,7 @@ sudo systemctl enable --now monit
Check that the service is running appropriately:
```ad-command
~~~
~~~bash
sudo systemctl status monit
~~~
```
@ -135,7 +135,7 @@ set httpd port 2812
After making the change, monit needs to be restarted:
```ad-command
~~~
~~~bash
sudo systemctl restart monit
~~~
```
@ -143,7 +143,7 @@ sudo systemctl restart monit
And the corresponding port opened:
```ad-command
~~~
~~~bash
sudo ufw allow 2812
~~~
```
@ -173,7 +173,7 @@ set alert (dest email address)
After making the change, monit needs to be restarted:
```ad-command
~~~
~~~bash
sudo systemctl restart monit
~~~
```
@ -193,7 +193,7 @@ sudo systemctl restart monit
Monit has a number of pre-loaded configurations that can be accessed here:
```ad-command
~~~
~~~bash
ls -alh /etc/monit/conf-available
~~~
```
@ -201,7 +201,7 @@ ls -alh /etc/monit/conf-available
To enable some of the pre-loaded confs, command below:
```ad-command
~~~
~~~bash
sudo ln -s /etc/monit/conf-available/(process) /etc/monit/conf-enabled/
~~~
```
@ -213,7 +213,7 @@ sudo ln -s /etc/monit/conf-available/(process) /etc/monit/conf-enabled/
Create a conf document in the following folder:
```ad-command
~~~
~~~bash
sudo touch /etc/monit/conf-available/(processname)
~~~
```
@ -231,7 +231,7 @@ check process (processname) matching "(processname)"
Once done, enable the config:
```ad-command
~~~
~~~bash
sudo ln -s /etc/monit/conf-available/(process) /etc/monit/conf-enabled/
~~~
```
@ -245,7 +245,7 @@ Docker containers can be set up as programs with the use of a script.
1. Create a script for the docker container
```ad-command
~~~
~~~bash
sudo mkdir /etc/monit/scripts/
sudo touch /etc/monit/scripts/check_container_(container name).sh
sudo chmod 711 /etc/monit/scripts/check_container_(container name).sh
@ -265,7 +265,7 @@ exit $?
3. Create the configuration file
```ad-command
~~~
~~~bash
sudo touch/vi /etc/monit/conf-available/(container name)
~~~
```
@ -285,7 +285,7 @@ CHECK PROGRAM (container name) WITH PATH /etc/monit/scripts/check\_container_(co
5. Enable the config
```ad-command
~~~
~~~bash
sudo ln -s /etc/monit/conf-available/(container name) /etc/monit/conf-enabled/
~~~
```
@ -297,7 +297,7 @@ sudo ln -s /etc/monit/conf-available/(container name) /etc/monit/conf-enabled/
Once configuration is updated, monit provides a tool to check the script:
```ad-command
~~~
~~~bash
sudo monit -t
~~~
```
@ -305,7 +305,7 @@ sudo monit -t
The program needs to be restarted:
```ad-command
~~~
~~~bash
sudo monit reload
~~~
```
@ -323,7 +323,7 @@ sudo monit reload
#### Print monit activity
```ad-command
~~~
~~~bash
sudo monit summary
~~~
```

@ -56,7 +56,7 @@ Installation is simple and opens a dialogue box. Steps are described below:
1. **Install Postfix**
```ad-command
~~~
~~~bash
sudo apt-get install -y postfix postfix-pgsql -y
~~~
```
@ -231,7 +231,7 @@ query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND
##### Restart the service
```ad-command
~~~
~~~bash
sudo systemctl restart postfix
~~~
```
@ -260,7 +260,7 @@ title: Documentation
Ports (25, 465, 587) need to be opened by the firewall:
```ad-command
~~~
~~~bash
sudo ufw allow (port)/tcp
~~~
```
@ -301,14 +301,14 @@ Postfix SSL certs need to match that of the server (in [[Configuring Postfix#Mai
```ad-command
title: add a user
~~~
~~~bash
sudo saslpasswd2 -c -u (mydomain.tld) (username)
~~~
```
```ad-command
title: check number of users
~~~
~~~bash
sudo sasldblistusers2
~~~
```
@ -335,7 +335,7 @@ Allow for connecting to an external SMTP - not tested.
Unfortunately there is no built-in functionality to monitor specifically outgoing emails. The following command can however be used and grans relevant info from `mail.log`:
```ad-command
~~~
~~~bash
sudo grep "status=sent" /var/log/mail.log | egrep -ve 'postfix/(cleanup|pickup|master|qmgr|smtpd|local|pipe)'
~~~
```
@ -345,7 +345,7 @@ sudo grep "status=sent" /var/log/mail.log | egrep -ve 'postfix/(cleanup|pickup|m
#### Monitor SMTP connections
```ad-command
~~~
~~~bash
sudo tail -f /var/log/mail.log
~~~
```

@ -60,7 +60,7 @@ UFW should be installed by default in Ubuntu servers. If not, see below.
#### Installation of UFW
```ad-command
~~~
~~~bash
sudo apt install ufw
~~~
```
@ -70,7 +70,7 @@ sudo apt install ufw
#### Activation of UFW
```ad-command
~~~
~~~bash
sudo ufw status
~~~
```
@ -78,7 +78,7 @@ sudo ufw status
If disabled:
```ad-command
~~~
~~~bash
sudo ufw enable
~~~
```
@ -96,7 +96,7 @@ sudo ufw enable
#### UFW rules status
```ad-command
~~~
~~~bash
sudo ufw status
~~~
```
@ -112,7 +112,7 @@ Commands can be appended:
##### Allow / Deny
```ad-command
~~~
~~~bash
sudo ufw allow/deny
~~~
```
@ -133,7 +133,7 @@ Then:
Certain rules like IP denial need to be put on top of the rule stack as UFW reads rules in order one after another. Insert the following in the command to force insertion:
```ad-command
~~~
~~~bash
insert 1 (or any place in the pecking order)
~~~
```

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Tag: ["Computer", "Web", "Networks", "Domain"]
Date: 2021-09-01
DocType: "Personal"

@ -1,11 +1,11 @@
---
cssclass: recipeTable
Alias: ["Self host", "Self hosting", "Self-host", "Self-hosting"]
Tag: ["Server", "Computer", "Security", "Privacy", "Web"]
Date: 2021-08-26
DocType: "Personal"
Hierarchy: "Root2"
Parent: [[@Networks|Networks]]
TimeStamp:
location: [45.8714213, 2.3970385]
CollapseMetaTable: Yes
@ -14,6 +14,10 @@ CollapseMetaTable: Yes
Parent:: [[@Networks|Networks]], [[@Computer Set Up|Computer Setup]]
---
^Top
&emsp;
```button
@ -67,11 +71,11 @@ A good aggregator for low-cost VPS [here](https://lowendbox.com)
Otherwise, **physical hardware** include:
Product | Type | Price range
--------|-------|-----------
<p style="color:green">**Synology (DS218/220+)**</p> | NAS | £250/300
<p style="color:cyan">**Dell Poweredge Tower Server T30**</p> | Server | £300/400
<p style="color:maroon">**HP Z420**</p> | Workstation | £400
| Product | Type | Price range
|--------|-------|-----------
|<p style="color:green">**Synology (DS218/220+)**</p> | NAS | £250/300
|<p style="color:cyan">**Dell Poweredge Tower Server T30**</p> | Server | £300/400
|<p style="color:maroon">**HP Z420**</p> | Workstation | £400
==WIP==
@ -190,9 +194,9 @@ In essence, to run multiple services on the same hardware, a few basic steps nee
| Consideration | Tool | Description
|---------------|------|------------
<p style="color:cyan">**Compartimentalise services into containers**</p> | **docker** | Creates containers that can be run independently
<p style="color:turquoise">**Simplify docker commands**</p> | **docker-compose** | Enables to create 'script' for docker commands
<p style="color:teal">**Route internet traffic appropriately**</p> | reverse proxy: **nginx**, **Caddy2** | Enables to route addresses to the appropriate containers and manage SSL certificates (and https forcing)
| <p style="color:cyan">**Compartimentalise services into containers**</p> | **docker** | Creates containers that can be run independently
| <p style="color:turquoise">**Simplify docker commands**</p> | **docker-compose** | Enables to create 'script' for docker commands
| <p style="color:teal">**Route internet traffic appropriately**</p> | reverse proxy: **nginx**, **Caddy2** | Enables to route addresses to the appropriate containers and manage SSL certificates (and https forcing)
&emsp;
@ -207,8 +211,8 @@ In essence, to run multiple services on the same hardware, a few basic steps nee
A list of FOSS services can be found [here](https://github.com/awesome-selfhosted/awesome-selfhosted)
Service | OS | Technical reqs | Description
--------|----|----------------|--
| Service | OS | Technical reqs | Description
|--------|----|----------------|--
<p style="color:orange">**Email service**</p> | Linux | 2GB RAM recommended | self-host an [[#Email service]]
<p style="color:green">**Email aliases**</p> | Linux | 2GB RAM; ports: 22, 25, 80, 443 | an [[#Email alias service\|alias service]] like [SimpleLogin](https://simplelogin.io)
**[[Nextcloud]]** | Linux | 500M RAM; MySQL & SQL Lite; PHP 8.0; Apache 2.4 with PHP or nginx with PHP | [[#Personal cloud syncing]] instance
@ -321,7 +325,7 @@ Open source CMS solution: [here](https://gohugo.io/)
| Tool | Self-hosted service | Link to tutorial | Sub-domain
|------|---------------------|---------------|----------
<p style="color:orange">**Password manager**</p> | **Bitwarden** | [here](https://cyberhost.uk/selfhost-bitwarden/) | pw-manager
<p style="color:orangered">**[[NextDNS|DNS resolver]]**</p> | **AdGuard Home** | [here](https://cyberhost.uk/adguard-setup/) | dns-resolver
<p style="color:orangered">**[[NextDNS\|DNS resolver]]**</p> | **AdGuard Home** | [here](https://cyberhost.uk/adguard-setup/) | dns-resolver
<p style="color:coral">**Note-taking app**</p> | **[Notea](https://cinwell.com/notea/)**, **[Turtl](https://turtlapp.com)**, **[Boost Note](https://boostnote.io)**, **[Trilium](https://github.com/zadam/trilium)** | [Notea](https://cyberhost.uk/notea/), [Turtl with docker](https://github.com/turtl/server#running-the-server) | notes
<p style="color:lightsalmon"> **Git instance**</p> | **[Gitea](https://gitea.io/en-us/)** | [for Gitea](https://www.techrepublic.com/article/how-to-install-the-self-hosted-git-server-gitea-on-ubuntu-18-04/), [Gitea with docker](https://www.how2shout.com/linux/gitea-on-docker-installation-of-self-hosted-git-service/), [Gitea with docker-compose](https://docs.gitea.io/en-us/install-with-docker/) | git
@ -329,16 +333,19 @@ Open source CMS solution: [here](https://gohugo.io/)
Database: MySQL, MariaDB, Postgres
| App | Database
|-----|:----------:
**Turtl** | Postgres
**Gitea** | MariaDB
**AdGuard** | *none*
**Bitwarden** | *none*
|------|----------
| **Turtl** | Postgres
| **Gitea** | MariaDB
| **AdGuard** | *none*
| **Bitwarden** | *none*
```ad-info
title: VPS ideas
[MikroVPS - FR](https://my.mikrovps.net/cart.php?a=checkout&gid=34&language=English&pid=584&promocode=LEB2021LXC50&utm_source=lowendbox&utm_medium=display&utm_campaign=lbpromo2021)
```
[[#^Top|TOP]]
&emsp;
&emsp;

@ -127,11 +127,15 @@ All dependencies for running the alias service.
title: Docker for non root users
[[Docker config|docker]] predominantly works for the root user. In order to let non-root users instruct Docker, users need to be added to the Docker group:
`sudo usermod -aG docker (username)`
~~~bash
sudo usermod -aG docker (username)
~~~
Potentially, the Docker group needs to be defined:
`sudo groupadd docker`
~~~bash
sudo groupadd docker
~~~
```
Currently running [[Configuring Docker|docker]] containers
@ -241,7 +245,7 @@ Sample configs can be found [here](https://github.com/simple-login/app/blob/mast
Once the change is made, restart the app container:
```ad-command
~~~
~~~bash
docker restart sl-app
~~~
```
@ -253,7 +257,7 @@ docker restart sl-app
Users will be defaulted to the 'Free' plan and asked to subscribe to the premium plan. In order to force users onto the Premium plan, please update the database:
```ad-command
~~~
~~~bash
docker exec -it sl-db psql -U (dbusername) simplelogin
~~~
```
@ -261,7 +265,7 @@ docker exec -it sl-db psql -U (dbusername) simplelogin
And then run:
```ad-command
~~~
~~~bash
UPDATE users SET lifetime = 'TRUE' WHERE EMAIL = '(emailaddress)';
~~~
```

@ -172,7 +172,7 @@ performance_schema = OFF
In order to restart mysql, the command is:
```ad-command
~~~
~~~bash
sudo service mysql restart
~~~
```
@ -202,7 +202,7 @@ Memory caching addon for Nextcloud. Memory caching management is provided by Nex
1. **Define the cronjob**
```ad-command
~~~
~~~bash
sudo crontab -u www-data -e
~~~
```
@ -218,7 +218,7 @@ sudo crontab -u www-data -e
3. **Verify that the cron job is added**
```ad-command
~~~
~~~bash
sudo crontab -u www-data -l
~~~
```
@ -230,7 +230,7 @@ sudo crontab -u www-data -l
SVG support is installed in the form of a package.
```ad-command
~~~
~~~bash
sudo apt-get update -y
sudo apt-get install -y libmagickcore-6.q16-6-extra
~~~
@ -298,7 +298,7 @@ From the server's command line, Nextcloud offers the ability to perform some tas
The tool needs to be invoked by the "www-data" user and compiled with PHP:
```ad-command
~~~
~~~bash
sudo -u www-data php /var/www/html/nextcloud/occ
~~~
```
@ -320,7 +320,7 @@ sudo -u www-data php /var/www/html/nextcloud/occ
After each data transfer, run the following command to refresh [[Nextcloud]]'s webapp:
```ad-command
~~~
~~~bash
sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all
~~~
```
@ -339,7 +339,7 @@ title: Data transfer tool
rClone uses a simple config interface to configure remote hosts (including [[Nextcloud]]):
```ad-command
~~~
~~~bash
rclone config
~~~
```
@ -349,7 +349,7 @@ The config data can be password-protected for security.
1. **Copy data**
```ad-command
~~~
~~~bash
rclone copy source:'datapath' dest:'datapath'
~~~
```
@ -357,7 +357,7 @@ rclone copy source:'datapath' dest:'datapath'
2. **Sync data**
```ad-command
~~~
~~~bash
rclone sync source:'datapath' dest:'datapath'
~~~
```

@ -154,7 +154,7 @@ LWERS4M7njDLiAJe5A6gkv9jRDabvnzBGyYk9vPr1F5dY0LMu47FSjB0v21BAE83rYTOksElzcYmioWA
Classic installation with a dedicated configuration:
```ad-command
~~~
~~~bash
sudo nano /etc/fail2ban/jail.d/sshd.local
~~~
```
@ -334,7 +334,7 @@ One GitHub user is offering a [repo](https://github.com/iganeshk/standardnotes-e
* **Configuration file**
```ad-command
~~~
~~~bash
~/standardnotes-extensions/.env
~~~
```
@ -342,7 +342,7 @@ One GitHub user is offering a [repo](https://github.com/iganeshk/standardnotes-e
* **Repository update**
```ad-command
~~~
~~~bash
sudo python3 build_repo.py
~~~
```

@ -124,7 +124,7 @@ The VPN server will host a single VPN service and dependencies bare metal.
Classic installation with a dedicated configuration:
```ad-command
~~~
~~~bash
sudo nano /etc/fail2ban/jail.d/sshd.local
~~~
```
@ -208,7 +208,7 @@ title: Server Config file
```ad-command
title: In `~` for `melchiorbv`
~~~
~~~bash
./wireguard-install.sh
~~~
```

@ -11,6 +11,8 @@ CollapseMetaTable: Yes
---
^Top
Parent:: [[Selfhosting]], [[Server Alias]], [[Server Cloud]], [[Server Tools]], [[Server VPN]]
&emsp;
@ -61,17 +63,28 @@ Simple commands to start using a Virtual Private Server.
#### Connection
`ssh username@IPv4`
```ad-command
~~~bash
ssh username@IPv4
~~~
```
It is usual to change password:
`passwd`
```ad-command
~~~bash
passwd
~~~
```
&emsp;
#### Initialisation and updates
`sudo apt update`
`sudo apt upgrade`
```ad-command
~~~bash
sudo apt update && sudo apt upgrade
~~~
```
&emsp;
@ -79,21 +92,21 @@ It is usual to change password:
```ad-command
title: Add user
~~~
~~~bash
sudo adduser 'username'
~~~
```
```ad-command
title: Delete user
~~~
~~~bash
sudo userdel -r 'username'
~~~
```
```ad-command
title: Grant admin privileges
~~~
~~~bash
usermod -aG sudo 'username'
~~~
```
@ -103,7 +116,7 @@ usermod -aG sudo 'username'
#### Switch between user accounts
```ad-command
~~~
~~~bash
su - (username)
~~~
```
@ -113,7 +126,7 @@ su - (username)
#### Reboot
```ad-command
~~~
~~~bash
sudo reboot now
~~~
```
@ -121,7 +134,7 @@ sudo reboot now
Or
```ad-command
~~~
~~~bash
sudo systemctl reboot
~~~
```
@ -133,7 +146,7 @@ sudo systemctl reboot
1. **Check the static hostname**
```ad-command
~~~
~~~bash
sudo hostnamectl
~~~
```
@ -141,7 +154,7 @@ sudo hostnamectl
2. **Change the hostname**
```ad-command
~~~
~~~bash
sudo hostnamectl set-hostname (hostname)
~~~
```
@ -169,13 +182,13 @@ This section gives an overview of how to switch signing-in to a machine without
2 simple commands to prepare the server:
```ad-command
~~~
~~~bash
mkdir -p ~/.ssh
~~~
```
```ad-command
~~~
~~~bash
chmod 700 ~/.ssh
~~~
```
@ -187,7 +200,7 @@ chmod 700 ~/.ssh
On Linux & MacOS clients, the process is simple:
```ad-command
~~~
~~~bash
ssh-keygen -t rsa
~~~
```
@ -197,7 +210,7 @@ And follow the prompts.
You can then send the public key to the server:
```ad-command
~~~
~~~bash
ssh-copy-id -i ~/.ssh/(key name).pub (user)@(server)
~~~
```
@ -211,7 +224,7 @@ ssh-copy-id -i ~/.ssh/(key name).pub (user)@(server)
In order to active SSH Agent, run:
```ad-command
~~~
~~~bash
ssh-agent $BASH
~~~
```
@ -219,7 +232,7 @@ ssh-agent $BASH
To add any key to the agent:
```ad-command
~~~
~~~bash
ssh-add ~/.ssh/(key name)
~~~
```
@ -231,7 +244,7 @@ ssh-add ~/.ssh/(key name)
SSH can understand scripting for ease of use. To create and edit a config file on the local machine:
```ad-command
~~~
~~~bash
touch/vim ~/.ssh/config
~~~
```
@ -251,7 +264,7 @@ Host (scriptname) (serverIP)
Once set up, a connection can be called from Terminal with the following command:
```ad-command
~~~
~~~bash
ssh (scriptname)
~~~
```
@ -263,7 +276,7 @@ ssh (scriptname)
To open the config file:
```ad-command
~~~
~~~bash
sudo (nano/vim) /etc/ssh/sshd_config
~~~
```
@ -301,7 +314,7 @@ Port xxxxx
After any change of the config file, restart the SSH service:
```ad-command
~~~
~~~bash
sudo systemctl restart sshd
~~~
```
@ -310,7 +323,7 @@ sudo systemctl restart sshd
issue.net needs to be set:
```ad-command
~~~
~~~bash
sudo nano/vim /etc/issue.net
~~~
```
@ -330,14 +343,14 @@ This server is the property of mydomain.example
```ad-command
title: simple port monitoring
~~~
~~~bash
sudo netstat -an
~~~
```
```ad-command
title: active port monitoring
~~~
~~~bash
sudo netstat -anp (IP/TCP/UDP)
~~~
```
@ -371,21 +384,21 @@ Simple commands to access files on the server.
```ad-command
title: Explore current directory
~~~
~~~bash
ls -alh
~~~
```
```ad-command
title: Change directory
~~~
~~~bash
cd (folder path)
~~~
```
```ad-command
title: Find a file
~~~
~~~bash
sudo find / -iname (filename)
~~~
```
@ -395,7 +408,7 @@ sudo find / -iname (filename)
#### Create file
```ad-command
~~~
~~~bash
touch (filepath/name)
~~~
```
@ -405,7 +418,7 @@ touch (filepath/name)
#### Edit file
```ad-command
~~~
~~~bash
vi (filepath/name)
~~~
```
@ -420,14 +433,14 @@ vi (filepath/name)
```ad-command
title: Delete file
~~~
~~~bash
rm (file path & name)
~~~
```
```ad-command
title: Delete folder and contents
~~~
~~~bash
rm -r (folder path)
~~~
```
@ -450,7 +463,7 @@ title: Permissions
```ad-command
title: Change permissions
~~~
~~~bash
chmod xxx (folder/file path)
~~~
```
@ -462,14 +475,14 @@ For x:
```ad-command
title: Change owner
~~~
~~~bash
chown (owner):(group) (folder/file path)
~~~
```
```ad-command
title: Change group
~~~
~~~bash
chgrp -R (new group) (folder/file path)
~~~
```
@ -480,14 +493,14 @@ chgrp -R (new group) (folder/file path)
```ad-command
title: Change file permission in a folder
~~~
~~~bash
find (folder path) -type f -exec chmod xxx {} \;
~~~
```
```ad-command
title: Change sub-folder permission in a folder
~~~
~~~bash
find (folder path) -type d -exec chmod xxx {} \;
~~~
```
@ -513,7 +526,7 @@ Instructions to use rclone for file transfers can be found [[Server Cloud#Cloud2
Create a directory for backup:
```ad-command
~~~
~~~bash
sudo mkdir /Backup
~~~
```
@ -525,7 +538,7 @@ sudo mkdir /Backup
Best is to launch the command from the Backup folder:
```ad-command
~~~
~~~bash
cd /Backup
~~~
```
@ -533,7 +546,7 @@ cd /Backup
Command:
```ad-command
~~~
~~~bash
sudo tar -cvpzf /Backup --exclude=/Backup/backup.tar.gz --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=/dev --exclude=/sys --exclude=/run --exclude=/var/cache/apt/archives --exclude=/usr/src/linux-headers* --exclude=/home/*/.gvfs --exclude=/home/*/.local/share/Trash /
~~~
```
@ -553,7 +566,7 @@ After transfer, [[#Delete files folders|delete]] the .tar.gz file from its folde
1. From the server:
```ad-command
~~~
~~~bash
sudo nc -l 1024 | sudo tar -xvpzf - -C /media/backup
~~~
```
@ -561,7 +574,7 @@ sudo nc -l 1024 | sudo tar -xvpzf - -C /media/backup
2. From the Client's machine, instruct:
```ad-command
~~~
~~~bash
cat (backup path & name.tar.gz) | nc -q 0 (hostname) 1024
~~~
```
@ -574,13 +587,13 @@ Or through **FTP**:
2. Copy /boot/grub/menu.lst to menu.lst.bak
3. Restore
```ad-command
~~~
~~~bash
sudo tar xvpfz backup.tar.gz -C /
~~~
```
4. Recreate excluded directories
```ad-command
~~~
~~~bash
mkdir proc
Mkdir lost+found
mkdir mnt
@ -615,7 +628,7 @@ Check:
And how many instances:
```ad-command
~~~
~~~bash
sudo ps ax | grep (program)
~~~
```
@ -625,7 +638,7 @@ sudo ps ax | grep (program)
#### Check what program uses a port
```ad-command
~~~
~~~bash
sudo netstar -lntup | grep (port#)
~~~
```
@ -635,7 +648,7 @@ sudo netstar -lntup | grep (port#)
#### List all programs
```ad-command
~~~
~~~bash
sudo apt list --installed
~~~
```
@ -645,7 +658,7 @@ sudo apt list --installed
#### Remove a package
```ad-command
~~~
~~~bash
sudo apt remove (package name)
~~~
```
@ -653,7 +666,7 @@ sudo apt remove (package name)
For cleaner removal:
```ad-command
~~~
~~~bash
sudo apt purge (package name)
~~~
```
@ -686,4 +699,5 @@ title: Scripting OSX
```
&emsp;
&emsp;
&emsp;
[[#^Top|TOP]]

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["mfxm.fr", "mfxm Scope"]
Tag: ["Web", "Website", "Server"]
Date: 2021-09-02

@ -78,7 +78,7 @@ Installation is simple:
```ad-command
~~~
~~~bash
brew install hledger
~~~
```
@ -142,7 +142,7 @@ This method is well-guided with hLedger:
```ad-command
~~~
~~~bash
hledger add -f 'journalname'
~~~
```
@ -166,7 +166,7 @@ Open the .journal file and manually enter transactions with the following format
```ad-command
title: Import from Note
~~~
~~~bash
hledger import -f 'journalname' 'filename'
~~~
```
@ -289,7 +289,7 @@ Simple reports can be found [here](https://hledger.org/quickstart.html#run-repor
```ad-command
~~~
~~~bash
hledger -f 'filename' is -Y (period argument) -3 (depth argument) -S (sorting by amount argument) -o (output file argument)
~~~
```
@ -298,7 +298,7 @@ hledger -f 'filename' is -Y (period argument) -3 (depth argument) -S (sorting by
**Balance sheet report**
```ad-command
~~~
~~~bash
hledger -f 'filename' bs -Y (period argument) -V (optional price basis: end of year each year, local ccy; --value=end,(ccy) for forcing GBP/EUR) (optional --infer-value) -o (output file argument)
~~~
```
@ -309,7 +309,7 @@ hledger -f 'filename' bs -Y (period argument) -V (optional price basis: end of y
**ROI report**
```ad-command
~~~
~~~bash
hledger -f 'filename' roi --investment (investment account) -Y (period argument) --value=then,"(ccy)" --infer-market-price --pnl "unrealized"
~~~
```

@ -9,6 +9,7 @@ QICcy:
QITheme:
QITradingd:
QITradingp:
cssclass: recipeTable
Alias: ["Investment Master"]
Tag: ["Wealth", "Investment", "Equity", "VC", "Crypto"]
Date: 2021-08-17
@ -86,21 +87,6 @@ style: number
&emsp;
### Master Navigation
&emsp;
```dataview
Table Date as "Creation Date" from "06.02 Investments"
Sort file.name ascending
```
&emsp;
---
&emsp;
### Search
&emsp;
@ -115,9 +101,11 @@ id EditMetaData
&emsp;
```dataviewjs
dv.view("00.01 Admin/dv-views/print_data", {toprint: [dv.current().QITableType, dv.current().QIInvType, dv.current().QIAddedD, dv.current().QIStyle, dv.current().QIStage, dv.current().QICcy, dv.current().QITheme, dv.current().QITradingd, dv.current().QITradingp]})
dv.view("00.01 Admin/dv-views/print_invsearch", {invtype: dv.current().QIInvType, dateadded: dv.current().QIAddedD, style: dv.current().QIStyle, stage: dv.current().QIStage, ccy: dv.current().QICcy, theme: dv.current().QITheme, tradingd: dv.current().QITradingd, tradingp: dv.current().QITradingp})
```
&emsp;
```dataviewjs
dv.view("00.01 Admin/dv-views/query_inv", {tabletype: dv.current().QITableType, invtype: dv.current().QIInvType, dateadded: dv.current().QIAddedD, style: dv.current().QIStyle, stage: dv.current().QIStage, ccy: dv.current().QICcy, theme: dv.current().QITheme, tradingd: dv.current().QITradingd, tradingp: dv.current().QITradingp})
```
@ -128,6 +116,21 @@ dv.view("00.01 Admin/dv-views/query_inv", {tabletype: dv.current().QITableType,
&emsp;
### Investment list
&emsp;
```dataview
Table Date as "Creation Date" from "06.02 Investments"
Sort file.name ascending
```
&emsp;
---
&emsp;
### Tag Navigation
&emsp;

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Crypto Investment"]
Tag: ["Wealth", "Investment", "Crypto"]
Date: 2021-08-17

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["Equity Investment"]
Tag: ["Wealth", "Equity"]
Date: 2021-08-17

@ -1,5 +1,6 @@
---
cssclass: recipeTable
Alias: ["VC Investment"]
Tag: ["Wealth", "Investment", "VC"]
Date: 2021-08-17

Loading…
Cancel
Save