Skip to content

Commit 2db6af3

Browse files
committed
Expanded documentation for production server configuration
1 parent 4070182 commit 2db6af3

File tree

3 files changed

+171
-0
lines changed

3 files changed

+171
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
External services and secrets to configure
2+
3+
- S3 bucket
4+
- S3 access key
5+
- OpenAI API key
6+
- Sentry Project and API key
7+
- Sendgrid API Key
8+
- Secret key base
9+
- Rails encryption key
10+
- Rails encrypted credentials
11+
-
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Raspberry Pi Setup
2+
3+
- Flash OS to SD card
4+
5+
- configure static IP for ethernet and wlan
6+
7+
- disable wifi
8+
9+
- disable bluetooth
10+
11+
- mute audio
12+
13+
- connect to gigabit ethernet
14+
15+
- update repositories `sudo apt-get update`
16+
17+
- upgrade software `sudo apt-get upgrade -y`
18+
19+
- install docker (debian) - https://docs.docker.com/engine/install/debian/
20+
21+
- docker Linux post-install (group modifications) - https://docs.docker.com/engine/install/linux-postinstall/
22+
23+
- Install cloudflared - https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-local-tunnel/#1-download-and-install-cloudflared
24+
25+
- Create and/or connect Cloudflare tunnel
26+
27+
- install nordvpn - https://nordvpn.com/download/linux/
28+
29+
- to login from CLI, run `nordvpn login` in the terminal and copy the link it provides
30+
- open the link in the browser and log in with Nord account
31+
- after login, copy the URL of the 'continue' button
32+
- in the terminal, use `nordvpn login --callback "{your success URL}"` to login
33+
34+
- configure nordvpn
35+
36+
- enable meshnet `nordvpn set meshnet on`
37+
- enable lan-discovery `nordvpn set lan-discovery on`
38+
- enable cybersec `nordvpn set cybersec on`
39+
40+
- configure pi hardening
41+
42+
- https://sunknudsen.com/privacy-guides/how-to-configure-hardened-raspberry-pi
43+
44+
- http://www.arch13.com/security-setup-hardening-of-raspberry-pi-os-buster/
45+
46+
- outline:
47+
48+
- ensure pi user not used
49+
50+
- ensure sudo with password
51+
52+
- `rm /etc/sudoers.d/010_*`
53+
54+
- disable root user history
55+
56+
- ```
57+
echo "HISTFILESIZE=0" >> ~/.bashrc
58+
history -c; history -w
59+
source ~/.bashrc
60+
```
61+
62+
- disable root login and password auth
63+
64+
- ```
65+
sed -i -E 's/^(#)?PermitRootLogin (prohibit-password|yes)/PermitRootLogin no/' /etc/ssh/sshd_config
66+
sed -i -E 's/^(#)?PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
67+
systemctl restart ssh
68+
```
69+
70+
71+
72+
- ensure non-default hostname
73+
74+
- install ufw firewall
75+
76+
- `sudo apt-get install ufw`
77+
- `sudo ufw enable`
78+
- `sudo ufw allow http`
79+
- `sudo ufw allow https`
80+
- `sudo ufw limit ssh`
81+
82+
- install fail2ban `sudo apt-get install fail2ban
83+
84+
- install unattended upgrades
85+
86+
- `sudo apt-get install unattended-upgrades`
87+
88+
- enable unattended upgrades `sudo dpkg-reconfigure --priority=low unattended-upgrades`
89+
- You’ll be presented with a confirmation screen that you want to enable automatic software updates. Select `Yes` to proceed.
90+
91+
- install borgbackup `sudo apt install borgbackup`
92+
93+
- configure borgbackup - https://borgbackup.readthedocs.io/en/stable/quickstart.html
94+
95+
- create initial repo `borg init --encryption=repokey /path/to/storage/{hostname}
96+
- run initial full backup `sudo borg create --verbose --stats --compression lz4 /storage-hdd/backups/{hostname}::full_{now} /etc /home /root /var /usr/local/bin /usr/local/sbin /usr/local/etc /usr/local/src /opt /srv`
97+
- configure borg automated backup
98+
99+
- install and configure cosmos-server - https://cosmos-cloud.io/doc/1%20index/
100+
101+
- `docker run -d --network host --privileged --name cosmos-server -h cosmos-server --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /:/mnt/host -v /{external storage path}/cosmos:/config azukaar/cosmos-server:latest`
102+
- Don't use https for cosmos. This is handled via the Cloudflare tunnel
103+
104+
- configure automount external storage (if present)
105+
106+
- https://unix.stackexchange.com/a/654953
107+
108+
- install cosmos apps
109+
110+
- Nextcloud
111+
- Set up cron
112+
- Set up plugins
113+
- Mount ffmpeg binaries
114+
- `/storage-hdd/utilities/ffmpeg-6.1/ffmpeg:/usr/bin/ffmpeg`
115+
- `/storage-hdd/utilities/ffmpeg-6.1/ffprobe:/usr/bin/ffprobe`
116+
- Ghost
117+
118+
- Install Discourse
119+
120+
- Install launcher
121+
- configure & deploy data container
122+
- configure & deploy web container
123+
- Expose ports
124+
- Add cosmos URL to route traffic to web container
125+
126+
- Install Collective Commerce (Solidus)
127+
128+
129+
130+
131+
132+
# Dokku
133+
134+
For Dokku on raspi, use arm64 version of docker images when needed:
135+
136+
Postgres
137+
138+
- `dokku postgres:create community-engine-db --image imresamu/postgis --image-version latest`

docs/welcome.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
✨ Welcome to Better Together! ✨
2+
3+
Thank you for starting this journey with us. You're now setting up your very own Community Engine server—a powerful tool created with kindness, connection, and cooperation at its heart.
4+
5+
Better Together is more than technology. It’s a movement dedicated to bringing people closer, so they can support each other and work together to solve important problems like climate change, fairness, and making communities stronger.
6+
7+
Our Community Engine helps you create a safe, welcoming space online. It’s where your community can share ideas, plan projects, and take real action. It doesn't matter if you're new to tech or experienced—we believe everyone has something valuable to share.
8+
9+
Here’s how we do it:
10+
11+
Discover new ideas, skills, and opportunities to help your community grow.
12+
13+
Connect deeply with others, building friendships and understanding.
14+
15+
Empower everyone to use their strengths, take action, and make positive changes.
16+
17+
We invite you to dream big. Imagine how much we can achieve when we listen to each other, support each other, and build together. This server is your first step towards creating a brighter, more connected future—where everyone feels valued, heard, and inspired to act.
18+
19+
Thank you for being part of this journey. We're excited to see the incredible things your community will accomplish!
20+
21+
Let’s get started—because we’re always Better Together.
22+

0 commit comments

Comments
 (0)