README.mdView |
---|
5 | 5 … | easily host your own Secure ScuttleButt (SSB) pub in a docker container |
6 | 6 … | |
7 | 7 … | to run a pub you need to have a static public IP, ideally with a DNS record (i.e.`<hostname.yourdomain.tld>`) |
8 | 8 … | |
| 9 … | +## setup box |
| 10 … | + |
| 11 … | +on a fresh Debian 9 box, as root |
| 12 … | + |
| 13 … | +```shell |
| 14 … | +apt update |
| 15 … | +apt upgrade |
| 16 … | +apt install apt-transport-https ca-certificates curl software-properties-common |
| 17 … | +wget https://download.docker.com/linux/debian/gpg -O docker-gpg |
| 18 … | +sudo apt-key add docker-gpg |
| 19 … | +echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list |
| 20 … | +apt update |
|
| 21 … | +apt install docker-ce |
| 22 … | +systemctl start docker |
| 23 … | +systemctl enable docker |
| 24 … | +``` |
| 25 … | + |
9 | 26 … | ## install image |
10 | 27 … | |
11 | 28 … | #### (option a) pull image from docker hub |
12 | 29 … | |
13 | | -``` |
| 30 … | +```shell |
14 | 31 … | docker pull ahdinosaur/ssb-pub |
15 | 32 … | ``` |
16 | 33 … | |
17 | 34 … | #### (option b) build image from source |
38 | 55 … | docker run --name my-ssb-pub \ |
39 | 56 … | -d -v ~/ssb-pub-data/:/home/node/.ssb/ \ |
40 | 57 … | -e HOST="<hostname.yourdomain.tld>" \ |
41 | 58 … | -p 8008:8008 --restart unless-stopped \ |
42 | | - ssb-pub |
| 59 … | + ahdinosaur/ssb-pub |
43 | 60 … | ``` |
44 | 61 … | |
45 | 62 … | ## create invites |
46 | 63 … | |
| 64 … | +from your remote machine |
| 65 … | + |
| 66 … | +```shell |
| 67 … | +docker run -it --rm \ |
| 68 … | + -d -v ~/ssb-pub-data/:/home/node/.ssb/ \ |
| 69 … | + ahdinosaur/ssb-pub \ |
| 70 … | + invite.create 1 |
47 | 71 … | ``` |
| 72 … | + |
| 73 … | +from your local machine, using ssh |
| 74 … | + |
| 75 … | +```shell |
48 | 76 … | ssh root@<hostname.yourdomain.tld> invite.create 1 |
49 | 77 … | ``` |
50 | 78 … | |
51 | 79 … | ## control service |