session-open-group-server/README.md

100 lines
3.5 KiB
Markdown
Raw Normal View History

2021-04-21 07:47:18 +02:00
![example workflow](https://github.com/nielsandriesse/session-open-group-server/actions/workflows/check.yml/badge.svg)
2021-03-05 05:13:31 +01:00
2021-04-23 06:04:19 +02:00
[API Documentation](https://github.com/nielsandriesse/session-open-group-server/blob/main/DOCUMENTATION.md)
2021-03-31 05:24:53 +02:00
2021-04-23 06:04:19 +02:00
[CLI Reference](https://github.com/nielsandriesse/session-open-group-server/blob/main/CLI.md)
2021-03-30 06:19:18 +02:00
2021-06-15 13:59:06 +02:00
Want to build from source? See [BUILDING.md](https://github.com/nielsandriesse/session-open-group-server/blob/main/BUILDING.md).
Want to deploy using Docker? See [DOCKER.md](https://github.com/nielsandriesse/session-open-group-server/blob/main/DOCKER.md).
2021-04-01 01:48:27 +02:00
## Installation Instructions
2021-03-15 05:41:24 +01:00
2021-07-26 03:09:49 +02:00
### [Video Guide](https://www.youtube.com/watch?v=D83gKXn6iTI)
2021-06-15 13:59:06 +02:00
**Note:** .debs for the Session Open Group server are currently only available for Ubuntu 20.04.
For other operating systems, you can either [build from source](https://github.com/nielsandriesse/session-open-group-server/blob/main/BUILDING.md) or use [Docker](https://github.com/nielsandriesse/session-open-group-server/blob/main/DOCKER.md).
2021-05-12 09:15:10 +02:00
2021-04-08 05:54:53 +02:00
### Step 1: Pull in the Session open group server executable:
2021-04-08 05:51:55 +02:00
2021-04-08 05:52:12 +02:00
```
2021-04-21 05:54:38 +02:00
sudo curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
echo "deb https://deb.oxen.io $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/oxen.list
sudo apt update
sudo apt install session-open-group-server
2021-05-12 09:15:10 +02:00
sudo chown _loki /var/lib/session-open-group-server -R
2021-04-08 05:52:12 +02:00
```
2021-04-08 05:51:55 +02:00
2021-04-23 02:47:36 +02:00
### Step 2: Add a room
Add a room of your choice with the following command:
```
2021-05-12 09:15:10 +02:00
session-open-group-server --add-room {room_id} {room_name}
2021-04-23 02:47:36 +02:00
```
2021-05-13 06:49:56 +02:00
`room_id` must be lowercase and consist of only letters, numbers and underscores.
2021-05-12 09:15:10 +02:00
2021-05-13 06:49:56 +02:00
For **example**:
2021-05-12 09:15:10 +02:00
```
session-open-group-server --add-room fish FishingAustralia
```
2021-04-23 02:47:36 +02:00
### Step 3: Print your server's URL
Print the URL users can use to join rooms on your open group server by running:
2021-04-08 06:27:10 +02:00
```
2021-05-12 09:15:10 +02:00
session-open-group-server --print-url
```
2021-05-13 06:49:56 +02:00
This will output a result similar to:
2021-05-12 09:15:10 +02:00
```
2021-05-12 09:22:14 +02:00
http://[host_name_or_ip]/[room_id]?public_key=2054fa3271f27ec9e55492c85d022f9582cb4aa2f457e4b885147fb913b9c131
2021-05-12 09:15:10 +02:00
```
2021-05-13 06:50:39 +02:00
You will need to replace `[host_name_or_ip]` with the IP address of your VPS or the domain mapping to your IP address, and `[room_id]` with the ID of one of the rooms you created earlier.
2021-05-12 09:15:10 +02:00
2021-05-13 06:49:56 +02:00
For **example**:
2021-05-12 09:15:10 +02:00
```
2021-05-12 09:22:14 +02:00
http://116.203.217.101/fish?public_key=2054fa3271f27ec9e55492c85d022f9582cb4aa2f457e4b885147fb913b9c131
2021-05-12 09:15:10 +02:00
```
2021-05-13 06:49:56 +02:00
This URL can then be used to join the group inside the Session app.
2021-05-12 09:15:10 +02:00
### Step 4: Make yourself a moderator
2021-05-13 06:49:56 +02:00
Make yourself a moderator using the following command:
2021-05-12 09:15:10 +02:00
```
session-open-group-server --add-moderator {your_session_id} {room_id}
```
2021-05-13 06:49:56 +02:00
For **example**:
2021-05-12 09:15:10 +02:00
2021-04-08 06:27:10 +02:00
```
2021-05-12 09:15:10 +02:00
session-open-group-server --add-moderator 05d871fc80ca007eed9b2f4df72853e2a2d5465a92fcb1889fb5c84aa2833b3b40 fish
2021-06-15 13:59:06 +02:00
```
2021-04-23 05:02:00 +02:00
2021-05-12 09:15:10 +02:00
### Step 5: Add an image for your new room (Optional)
2021-04-23 05:02:00 +02:00
2021-05-12 09:15:10 +02:00
- Add your room on Session desktop using the URL printed earlier
- Use Session desktop to upload a picture for your room
2021-04-23 05:02:00 +02:00
Or
2021-04-23 05:02:23 +02:00
- Upload a JPG to your VPS
- Put it in `/var/lib/session-open-group-server/files`
- Rename it to `{room_id}` (no file extension)
2021-04-23 06:12:06 +02:00
## Customization
The default options the Session open group server runs with should be fine in most cases, but if you like you can run on a custom port or host, specify the path to the X25519 key pair you want to use, etc. To do this, simply add [the right arguments](https://github.com/nielsandriesse/session-open-group-server/blob/main/BUILDING.md#step-3-run-it) to the `ExecStart` line in your systemd service file (normally located under `/etc/systemd/system`) and restart your service using:
```
systemctl restart session-open-group-server.service
```