epicyon/README.md

109 lines
2.4 KiB
Markdown
Raw Normal View History

2019-07-04 20:50:46 +00:00
<img src="https://code.freedombone.net/bashrc/epicyon/raw/master/img/logo.png?raw=true" width=256/>
2019-07-04 21:20:26 +00:00
A minimal ActivityPub server.
2019-06-28 18:55:29 +00:00
2019-08-29 11:09:16 +00:00
[Commandline interface](README_commandline.md).
2019-08-29 11:09:16 +00:00
[W3C Specification](https://www.w3.org/TR/activitypub)
2019-06-29 10:08:59 +00:00
2019-08-29 11:09:16 +00:00
Includes emojis designed by [OpenMoji](https://openmoji.org) the open-source emoji and icon project. License: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0)
2019-08-09 12:52:52 +00:00
2019-08-29 11:16:33 +00:00
[Project Goals](README_goals.md)
2019-07-25 08:42:15 +00:00
2019-08-29 11:23:58 +00:00
[Customizations](README_customizations.md)
2019-06-28 18:55:29 +00:00
## Install
2019-07-13 13:39:52 +00:00
On Arch/Parabola:
2019-06-28 18:55:29 +00:00
``` bash
2019-08-21 16:35:46 +00:00
sudo pacman -S tor python-pip python-pysocks python-pycryptodome python-beautifulsoup4 imagemagick python-pillow python-numpy python-dateutil
2019-07-02 17:11:59 +00:00
sudo pip install commentjson
2019-07-04 20:44:03 +00:00
```
2019-07-13 13:39:52 +00:00
Or on Debian:
``` bash
2019-08-21 16:35:46 +00:00
sudo apt-get -y install tor python3-pip python3-socks imagemagick python3-numpy python3-setuptools python3-crypto python3-dateutil python3-pil.imagetk
2019-07-13 13:39:52 +00:00
sudo pip3 install commentjson beautifulsoup4 pycryptodome
```
2019-08-29 11:37:31 +00:00
## Running the Server
2019-07-04 20:44:03 +00:00
2019-08-29 11:37:31 +00:00
In the most common case you'll be using systemd to set up a daemon to run the server.
Add a dedicated user so that we don't have to run as root.
2019-07-04 20:44:03 +00:00
``` bash
2019-08-29 11:37:31 +00:00
adduser --system --home=/etc/epicyon --group epicyon
2019-07-04 20:44:03 +00:00
```
2019-08-29 11:37:31 +00:00
Edit */etc/systemd/system/epicyon.service* and add the following:
2019-07-04 20:44:03 +00:00
``` bash
2019-08-29 11:37:31 +00:00
[Unit]
Description=epicyon
After=syslog.target
After=network.target
Documentation=$EPICYON_REPO";
[Service]
Type=simple
User=epicyon
Group=epicyon
WorkingDirectory=/etc/epicyon
ExecStart=/usr/bin/python3 /etc/epicyon/epicyon.py --port 443 --proxy 7156 --domain YOUR_DOMAIN --registration open --debug";
Environment=USER=epicyon
Restart=always
StandardError=syslog
[Install]
WantedBy=multi-user.target }
2019-07-04 20:44:03 +00:00
```
2019-07-04 21:32:18 +00:00
2019-08-29 11:37:31 +00:00
Here the server was installed to */etc/epicyon*, but you can change that to wherever you installed it.
2019-07-12 14:42:43 +00:00
2019-08-29 11:37:31 +00:00
Then run the daemon:
2019-07-04 21:32:18 +00:00
``` bash
2019-08-29 11:37:31 +00:00
systemctl enable epicyon
chown -R epicyon:epicyon /etc/epicyon
systemctl start epicyon
2019-07-04 21:32:18 +00:00
```
2019-08-29 11:37:31 +00:00
Check the status of the daemon with:
2019-07-04 21:32:18 +00:00
2019-08-29 11:37:31 +00:00
``` bash
systemctl status epicyon
2019-07-04 21:32:18 +00:00
```
2019-08-29 11:37:31 +00:00
If it's not running then you can also look at the log:
2019-07-04 21:32:18 +00:00
``` bash
2019-08-29 11:37:31 +00:00
journalctl -u epicyon
2019-07-04 21:32:18 +00:00
```
2019-08-29 11:37:31 +00:00
You'll also need to set up a web server configuration. An Nginx example is as follows:
2019-07-04 21:32:18 +00:00
``` bash
```
2019-07-04 21:40:30 +00:00
2019-08-29 11:37:31 +00:00
## Object Capabilities Security
2019-07-17 12:31:10 +00:00
2019-08-29 11:37:31 +00:00
A description of the proposed object capabilities model [is here](ocaps.md).
2019-07-19 09:01:39 +00:00
2019-08-29 11:37:31 +00:00
## Running Unit Tests
2019-07-19 09:01:39 +00:00
2019-08-29 11:37:31 +00:00
To run the unit tests:
2019-07-19 09:01:39 +00:00
2019-08-29 11:37:31 +00:00
``` bash
python3 epicyon.py --tests
```
2019-07-23 22:00:17 +00:00
2019-08-29 11:37:31 +00:00
To run the network tests. These simulate instances exchanging messages.
2019-07-19 09:06:55 +00:00
2019-08-29 11:37:31 +00:00
``` bash
python3 epicyon.py --testsnetwork
```
2019-08-11 16:55:22 +00:00