瀏覽代碼

Merge pull request #63 from simple-login/improve-doc

Improve self-hosting instructions
Son Nguyen Kim 5 年之前
父節點
當前提交
b308ce36ef
共有 2 個文件被更改,包括 27 次插入0 次删除
  1. 11 0
      README.md
  2. 16 0
      docs/ufw.md

+ 11 - 0
README.md

@@ -285,6 +285,7 @@ sudo docker run -d \
     -e POSTGRES_USER=myuser \
     -e POSTGRES_DB=simplelogin \
     -p 5432:5432 \
+    --restart always \
     --network="sl-network" \
     postgres:12.1
 ```
@@ -476,6 +477,7 @@ sudo docker run -d \
     -v $(pwd)/dkim.key:/dkim.key \
     -v $(pwd)/dkim.pub.key:/dkim.pub.key \
     -p 7777:7777 \
+    --restart always \
     --network="sl-network" \
     simplelogin/app:1.0.3
 ```
@@ -489,6 +491,7 @@ sudo docker run -d \
     -v $(pwd)/dkim.key:/dkim.key \
     -v $(pwd)/dkim.pub.key:/dkim.pub.key \
     -p 20381:20381 \
+    --restart always \
     --network="sl-network" \
     simplelogin/app:1.0.3 python email_handler.py
 ```
@@ -531,6 +534,14 @@ please go to the database, table "users" and set "lifetime" column to "1" or "TR
 You don't have to pay anything to SimpleLogin to use all its features.
 You could make a donation to SimpleLogin on our Patreon page at https://www.patreon.com/simplelogin if you wish though.
 
+### Misc
+
+The above self-hosting instructions correspond to a freshly Ubuntu server and doesn't cover all possible server configuration.
+Below are pointers to different topics:
+
+- [UFW](docs/ufw.md) 
+  
+
 ## Contributing
 
 All work on SimpleLogin happens directly on GitHub.

+ 16 - 0
docs/ufw.md

@@ -0,0 +1,16 @@
+SimpleLogin needs to have the following ports open:
+- 22: so you SSH into the server
+- 25: to receive the incoming emails
+- 80 and optionally 443 for SimpleLogin webapp
+ 
+If you use `UFW` Firewall, you could run the following commands to open these ports:
+
+```bash
+sudo ufw allow 22
+sudo ufw allow 25
+sudo ufw allow 80
+
+# optional, enable 443 if you set up TLS for the webapp
+sudo ufw allow 443
+```
+