@ -56,7 +56,7 @@ Installation is simple and opens a dialogue box. Steps are described below:
1. **Install Postfix**
1. **Install Postfix**
```ad-command
```ad-command
~~~
~~~bash
sudo apt-get install -y postfix postfix-pgsql -y
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
##### Restart the service
```ad-command
```ad-command
~~~
~~~bash
sudo systemctl restart postfix
sudo systemctl restart postfix
~~~
~~~
```
```
@ -260,7 +260,7 @@ title: Documentation
Ports (25, 465, 587) need to be opened by the firewall:
Ports (25, 465, 587) need to be opened by the firewall:
```ad-command
```ad-command
~~~
~~~bash
sudo ufw allow (port)/tcp
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
```ad-command
title: add a user
title: add a user
~~~
~~~bash
sudo saslpasswd2 -c -u (mydomain.tld) (username)
sudo saslpasswd2 -c -u (mydomain.tld) (username)
~~~
~~~
```
```
```ad-command
```ad-command
title: check number of users
title: check number of users
~~~
~~~bash
sudo sasldblistusers2
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`:
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`:
@ -60,7 +60,7 @@ UFW should be installed by default in Ubuntu servers. If not, see below.
#### Installation of UFW
#### Installation of UFW
```ad-command
```ad-command
~~~
~~~bash
sudo apt install ufw
sudo apt install ufw
~~~
~~~
```
```
@ -70,7 +70,7 @@ sudo apt install ufw
#### Activation of UFW
#### Activation of UFW
```ad-command
```ad-command
~~~
~~~bash
sudo ufw status
sudo ufw status
~~~
~~~
```
```
@ -78,7 +78,7 @@ sudo ufw status
If disabled:
If disabled:
```ad-command
```ad-command
~~~
~~~bash
sudo ufw enable
sudo ufw enable
~~~
~~~
```
```
@ -96,7 +96,7 @@ sudo ufw enable
#### UFW rules status
#### UFW rules status
```ad-command
```ad-command
~~~
~~~bash
sudo ufw status
sudo ufw status
~~~
~~~
```
```
@ -112,7 +112,7 @@ Commands can be appended:
##### Allow / Deny
##### Allow / Deny
```ad-command
```ad-command
~~~
~~~bash
sudo ufw allow/deny
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:
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:
@ -190,9 +194,9 @@ In essence, to run multiple services on the same hardware, a few basic steps nee
| Consideration | Tool | Description
| Consideration | Tool | Description
|---------------|------|------------
|---------------|------|------------
<pstyle="color:cyan">**Compartimentalise services into containers**</p> | **docker** | Creates containers that can be run independently
| <pstyle="color:cyan">**Compartimentalise services into containers**</p> | **docker** | Creates containers that can be run independently
<pstyle="color:turquoise">**Simplify docker commands**</p> | **docker-compose** | Enables to create 'script' for docker commands
| <pstyle="color:turquoise">**Simplify docker commands**</p> | **docker-compose** | Enables to create 'script' for docker commands
<pstyle="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)
| <pstyle="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)
 
 
@ -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)
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
--------|----|----------------|--
|--------|----|----------------|--
<pstyle="color:orange">**Email service**</p> | Linux | 2GB RAM recommended | self-host an [[#Email service]]
<pstyle="color:orange">**Email service**</p> | Linux | 2GB RAM recommended | self-host an [[#Email service]]
<pstyle="color:green">**Email aliases**</p> | Linux | 2GB RAM; ports: 22, 25, 80, 443 | an [[#Email alias service\|alias service]] like [SimpleLogin](https://simplelogin.io)
<pstyle="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
**[[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
| Tool | Self-hosted service | Link to tutorial | Sub-domain
@ -127,11 +127,15 @@ All dependencies for running the alias service.
title: Docker for non root users
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:
[[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:
Potentially, the Docker group needs to be defined:
`sudo groupadd docker`
~~~bash
sudo groupadd docker
~~~
```
```
Currently running [[Configuring Docker|docker]] containers
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:
Once the change is made, restart the app container:
```ad-command
```ad-command
~~~
~~~bash
docker restart sl-app
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:
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:
@ -142,7 +142,7 @@ This method is well-guided with hLedger:
```ad-command
```ad-command
~~~
~~~bash
hledger add -f 'journalname'
hledger add -f 'journalname'
~~~
~~~
```
```
@ -166,7 +166,7 @@ Open the .journal file and manually enter transactions with the following format
```ad-command
```ad-command
title: Import from Note
title: Import from Note
~~~
~~~bash
hledger import -f 'journalname' 'filename'
hledger import -f 'journalname' 'filename'
~~~
~~~
```
```
@ -289,7 +289,7 @@ Simple reports can be found [here](https://hledger.org/quickstart.html#run-repor
```ad-command
```ad-command
~~~
~~~bash
hledger -f 'filename' is -Y (period argument) -3 (depth argument) -S (sorting by amount argument) -o (output file argument)
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**
**Balance sheet report**
```ad-command
```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)
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