|
@@ -1,30 +1,52 @@
|
1
|
1
|
# Sovereign
|
2
|
2
|
|
3
|
3
|
Forked from [Sovereign on GitHub](https://github.com/sovereign/sovereign).
|
|
4
|
+This is a set of ansible roles to setup your own little private Cloud on a VPS.
|
|
5
|
+
|
|
6
|
+I removed a bunch of roles from the upstream version, added new ones, and made it compatible with more recent versions of Debian.
|
|
7
|
+Ubuntu is no longer supported, simply because I just use Debian.
|
|
8
|
+
|
|
9
|
+I also added the ability for full-fledged user-management using OpenLDAP and FusionDirectory.
|
|
10
|
+This is optional, however.
|
|
11
|
+You can also use statically configured credentials, which is enough for single-user setups.
|
|
12
|
+
|
|
13
|
+| Program | Domain | Status | Debian 9 | Debian 10 | Debian 11 | LDAP Auth |
|
|
14
|
+| ------------- | ---------- | ------ | -------- | --------- | --------- | --------- |
|
|
15
|
+| Website | www | ✔️ | ✔️ | ✔️ | ✔️ | N/A |
|
|
16
|
+| Lets Encrypt | - | ✔️ | ✔️ | ✔️ | ✔️ | N/A |
|
|
17
|
+| Webmail | mail | ✔️ | ✔️ | ✔️ | ✔️ | ❓ |
|
|
18
|
+| E-Mail Config | autoconfig | ✔️ | ✔️ | ✔️ | ✔️ | N/A |
|
|
19
|
+| monit | status | ✔️ | ✔️ | ✔️ | ✔️ | ❌ |
|
|
20
|
+| OpenVPN | - | ✔️ | ✔️ | ❓ | ❓ | ❓ |
|
|
21
|
+| Fathom | stats | ✔️ | ✔️ | ✔️ | ✔️ | ❌ |
|
|
22
|
+| commento | comments | ✔️ | ✔️ | ✔️ | ✔️ | ❓ |
|
|
23
|
+| ZNC | - | ✔️ | ✔️ | ❓ | ❓ | ❓ |
|
|
24
|
+| gitea | git | ✔️ | ✔️ | ✔️ | ✔️ | ❓ |
|
|
25
|
+| dokuwiki | wiki | ✔️ | ❓ | ✔️ | ✔️ | ✔️ |
|
|
26
|
+| kanboard | kanboard | ✔️ | ❓ | ✔️ | ✔️ | ✔️ |
|
|
27
|
+| jitsi | jitsi | ✔️ | ❓ | ✔️ | ✔️ | ✔️ |
|
|
28
|
+| rocket.chat | chat | ❓ | ❓ | ✔️ | ❓ | ❓ |
|
|
29
|
+| NextCloud | cloud | ✔️ | ✔️ | (❓) | ✔️ | ✔️ |
|
|
30
|
+| LimeSurvey | survey | ✔️ | (❓) | ✔️ | ✔️ | ❓ |
|
|
31
|
+| matrix / riot | matrix | ❌ | ✔️ | ❓ | ❓ | ❓ |
|
|
32
|
+| mastodon | social | ❌ | ✔️ | ❓ | ❓ | ❓ |
|
|
33
|
+| LDAP | users | ❓ | ❓ | ❓ | ✔️ | ✔️ |
|
|
34
|
+| Self-Signed | - | ✔️ | ❓ | ✔️ | ❓ | N/A |
|
|
35
|
+| grafana | iot | ✔️ | ❓ | ✔️ | ❓ | ❓ |
|
|
36
|
+| Selfoss | news | ❌ | ✔️ | ❓ | ❓ | ❓ |
|
|
37
|
+
|
|
38
|
+You don't have to setup all roles, simply select the subset you require.
|
|
39
|
+Please take a look inside the respective folders of the roles, they often contain a `DESIGN.md` file explaining the intricacies of the specific software or its configuration.
|
4
|
40
|
|
5
|
41
|
# Usage
|
6
|
42
|
|
7
|
|
-## What You’ll Need
|
8
|
|
-
|
9
|
|
-1. A VPS (or bare-metal server if you wanna ball hard). My VPS is hosted at [Linode](http://www.linode.com/?r=45405878277aa04ee1f1d21394285da6b43f963b). You’ll probably want at least 512 MB of RAM between Apache, Solr, and PostgreSQL. Mine has 1024.
|
10
|
|
-2. [64-bit Debian 9 or 10](http://www.debian.org/). (You can use whatever distro you want, but deviating from Debian will require more tweaks to the playbooks. See Ansible’s different [packaging](http://docs.ansible.com/ansible/list_of_packaging_modules.html) modules.)
|
11
|
|
-
|
12
|
|
-You do not need to acquire an SSL certificate. The SSL certificates you need will be obtained from [Let's Encrypt](https://letsencrypt.org/) automatically when you deploy your server.
|
13
|
|
-
|
14
|
43
|
## Installation
|
15
|
44
|
|
16
|
45
|
### On the remote server
|
17
|
46
|
|
18
|
|
-The following steps are done on the remote server by `ssh`ing into it and running these commands.
|
19
|
|
-
|
20
|
|
-#### Install required packages
|
|
47
|
+Install dependencies and change the root password:
|
21
|
48
|
|
22
|
49
|
apt-get install sudo python
|
23
|
|
-
|
24
|
|
-#### Prep the server
|
25
|
|
-
|
26
|
|
-For goodness sake, change the root password:
|
27
|
|
-
|
28
|
50
|
passwd
|
29
|
51
|
|
30
|
52
|
Create a user account for Ansible to do its thing through:
|
|
@@ -56,8 +78,6 @@ Or you can just add your `deploy` user to the sudo group.
|
56
|
78
|
|
57
|
79
|
### On your local machine
|
58
|
80
|
|
59
|
|
-Ansible (the tool setting up your server) runs locally on your computer and sends commands to the remote server.
|
60
|
|
-
|
61
|
81
|
#### Software
|
62
|
82
|
|
63
|
83
|
Download this repository somewhere on your machine, either through `Clone or Download > Download ZIP` above, `wget`, or `git` as below.
|
|
@@ -83,39 +103,17 @@ In that case you also need to add your custom port to the task `Set firewall rul
|
83
|
103
|
|
84
|
104
|
#### Set up DNS
|
85
|
105
|
|
86
|
|
-If you’ve just bought a new domain name, point it at [Linode’s DNS Manager](https://library.linode.com/dns-manager) or similar.
|
87
|
|
-Most VPS services (and even some domain registrars) offer a managed DNS service that you can use for this at no charge.
|
88
|
|
-If you’re using an existing domain that’s already managed elsewhere, you can probably just modify a few records.
|
89
|
|
-
|
90
|
|
-Create `A` and `AAAA` or `CNAME` records which point to your server's IP address:
|
91
|
|
-
|
92
|
|
-* `example.com`
|
93
|
|
-* `mail.example.com`
|
94
|
|
-* `www.example.com` (for Web hosting)
|
95
|
|
-* `autoconfig.example.com` (for email client automatic configuration)
|
96
|
|
-* `stats.example.com` (for web stats)
|
97
|
|
-* `news.example.com` (for Selfoss)
|
98
|
|
-* `cloud.example.com` (for NextCloud)
|
99
|
|
-* `git.example.com` (for gitea)
|
100
|
|
-* `status.example.com` (for monit)
|
101
|
|
-* `matrix.example.com` (for riot)
|
102
|
|
-* `social.example.com` (for mastodon)
|
103
|
|
-* `comments.example.com` (for commento)
|
104
|
|
-* `iot.example.com` (for grafana)
|
105
|
|
-* `wiki.example.com` (for dokuwiki)
|
106
|
|
-* `jitsi.example.com` (for jitsi)
|
107
|
|
-* `kanboard.example.com` (for kanboard)
|
|
106
|
+Create `A` and `AAAA` or `CNAME` records which point to your server's IP address for the subdomains used with the programs you selected.
|
108
|
107
|
|
109
|
108
|
#### Run the Ansible Playbooks
|
110
|
109
|
|
111
|
|
-First, make sure you’ve [got Ansible installed](http://docs.ansible.com/intro_installation.html#getting-ansible).
|
112
|
|
-This should already be done by running the pip requirements.txt from above.
|
113
|
|
-
|
114
|
|
-To run the whole dang thing:
|
|
110
|
+To run the whole thing:
|
115
|
111
|
|
116
|
|
- ansible-playbook -i ./hosts --ask-sudo-pass site.yml
|
|
112
|
+ ansible-playbook -i ./hosts --ask-sudo-pass --key-file KEY site.yml
|
117
|
113
|
|
118
|
114
|
If you chose to make a passwordless sudo deploy user, you can omit the `--ask-sudo-pass` argument.
|
|
115
|
+If you don't need to specify an ssh key to connect to the host, leave out `--key-file KEY` part, otherwise replace `KEY` with the path to the key you want to use.
|
|
116
|
+Append eg. `-l testing` to only run for the hosts in the testing group.
|
119
|
117
|
|
120
|
118
|
#### Finish DNS set-up
|
121
|
119
|
|
|
@@ -158,3 +156,9 @@ To re-new the LetsEncrypt certificates, for example after adding a new role that
|
158
|
156
|
sudo certbot delete -c /etc/letsencrypt/cli.conf --cert-name DOMAIN
|
159
|
157
|
|
160
|
158
|
Then re-run the whole sovereign playbook, or at least the letsencrypt part of it.
|
|
159
|
+
|
|
160
|
+To access your Postgres database, use:
|
|
161
|
+
|
|
162
|
+ sudo -u postgres psql
|
|
163
|
+
|
|
164
|
+Then use commands like `\l`, `\c database`, `\dt` or SQL statements.
|