Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit f498c98

Browse files
committed
Redirect users to Codeberg, remove README contents
1 parent ba651ef commit f498c98

File tree

1 file changed

+3
-194
lines changed

1 file changed

+3
-194
lines changed

README.md

Lines changed: 3 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -1,198 +1,7 @@
1-
<!-- omit in toc -->
21
# synadm - the Synapse Admin CLI
32

4-
- [About](#about)
5-
- [Prerequisites](#prerequisites)
6-
- [Installation](#installation)
7-
- [Configuration](#configuration)
8-
- [Getting an Admin Token](#getting-an-admin-token)
9-
- [The configurator](#the-configurator)
10-
- [matrix-docker-ansible-deploy](#matrix-docker-ansible-deploy)
11-
- [Usage](#usage)
12-
- [Command Line Reference](#command-line-reference)
13-
- [Advanced Usage](#advanced-usage)
14-
- [Update](#update)
15-
- [Update PyPI Package](#update-pypi-package)
16-
- [Update git Installation](#update-git-installation)
17-
- [Implementation Status / Commands List](#implementation-status--commands-list)
18-
- [Get in Touch](#get-in-touch)
19-
- [Contributing](#contributing)
3+
We have moved to Codeberg!
204

5+
Please visit [codeberg.org/synadm/synadm](https://codeberg.org/synadm/synadm).
216

22-
## About
23-
24-
A CLI tool to help admins of [Matrix-Synapse homeservers](https://github.com/matrix-org/synapse) conveniently issue commands available via its [Admin API](https://element-hq.github.io/synapse/develop/usage/administration/admin_api/index.html#the-admin-api).
25-
26-
27-
## Prerequisites
28-
29-
- Python 3.6+
30-
- a running Synapse instance
31-
- an admin-enabled user on the instance
32-
- the admin user's access token
33-
34-
`synadm` is designed to run either directly on the host running the Synapse instance or on a remote machine able to access Synapse's API port. Synapse's default Admin API endpoint address usually is http://localhost:8008/_synapse/admin or https://localhost:8448/_synapse/admin.
35-
36-
37-
## Installation
38-
39-
If `pipx` is available on your operating system, it is the recommended method for installation:
40-
41-
`pipx install synadm`
42-
43-
Alternatively, regular `pip` can also be used:
44-
45-
`pip3 install synadm`
46-
47-
To install the latest version from Git to a Python virtual environment [see the chapter in the contributing docs](https://synadm.readthedocs.io/en/latest/contributing.html#getting-the-source-and-installing).
48-
49-
50-
## Configuration
51-
52-
`synadm` stores its configuration inside the executing user's home directory in `~/.config/synadm.yaml` and is handled by [the synadm configurator](#the-configurator). Usually it's not required to edit it manually.
53-
54-
### Getting an Admin Token
55-
56-
To find out your admin user's token in Element-Web: _Login as this user - "Click User Avatar" - "All Settings" - "Help & About" - Scroll down - "Advanced" - "Access Token"_
57-
58-
Or use synadm to fetch a token already. Use the fully qualified Matrix ID of the admin user:
59-
60-
```
61-
synadm matrix login @admin_username:yourdomain.org
62-
Password:
63-
```
64-
65-
If you issue this command in a fresh `synadm` installation, [the configurator](#the-configurator) will launch anyway.
66-
67-
- Answer the questions.
68-
- Set token to "invalid" at first, to convience `synadm` to launch the `matrix login` command (otherwise you'd get a "Configuration incomplete" error).
69-
- After successfully entering your admin password you will be presented a token which you can finally set by re-launching the configurator as described below.
70-
71-
72-
### The configurator
73-
74-
`synadm` asks for necessary configuration items on first launch automatically. Also whenever new mandatory configuration items where added (eg after an update), the user will be prompted for missing items automatically.
75-
76-
Configuration can be changed any time by launching the configurator directly:
77-
78-
```
79-
synadm config
80-
```
81-
82-
Configuration will be saved in `~/.config/synadm.yaml`
83-
84-
*Note: Be aware that once you configured `synadm`, your admin user's token is saved in the configuration file. On Posix compatible systems permissions are set to mode 0600, on other OS's it is your responsibilty to change permissions accordingly.*
85-
86-
### matrix-docker-ansible-deploy
87-
88-
To use `synadm` with Synapse homeservers that were installed using [matrix-docker-ansible-deploy](https://github.com/spantaleev/matrix-docker-ansible-deploy) you have two options.
89-
90-
Access the Synapse Admin API's "via the public endpoint" similar to a Matrix client.
91-
92-
- In [vars.yaml](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook.md#configuring-the-ansible-playbook) set `matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: true`.
93-
- The API's are accessible on the Client-Server API port, at `https://matrix.DOMAIN`.
94-
- Install `synadm` on your Docker host or on a separate machine.
95-
- Configure `synadm` to access at `https://matrix.DOMAIN:443/_synapse/admin`
96-
97-
Alternatively, you can access the API's on the container network `matrix`.
98-
99-
- Synapse is accessible via the hostname `matrix-synapse` resolved by the internal Docker DNS server.
100-
- The containers are connected internally via a network named `matrix` by default.
101-
- Start a container on that same network and install `synadm` into it.
102-
- Configure `synadm` to access at `http://matrix-synapse:8008/_synapse/admin` (http here, not https).
103-
104-
Find some more details about the topic in [this issue post on the matrix-docker-ansible-deploy repo](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1846#issuecomment-1135516112).
105-
106-
_Note that currently `synadm` is using a part of the Server-Server (Federation) API (`keys/v2/server`) to retrieve "its own homeserver name". This affects some of the `media` management commands. By default and also as the Matrix spec recommends, this API is not accessible via the Client-Server API port. We are working on a better solution to retrieve the own servername but as a workaround the `key` API's can be exposed by setting `matrix_synapse_http_listener_resource_names: ["client","keys"]` in [vars.yaml](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook.md#configuring-the-ansible-playbook)._
107-
108-
Find more details about the topic [here](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1761#issuecomment-1101170229).
109-
110-
111-
## Usage
112-
113-
Use the online help of the main command:
114-
115-
```
116-
synadm -h
117-
```
118-
119-
and of the available subcommands:
120-
121-
```
122-
synadm version -h
123-
synadm user -h
124-
synadm room -h
125-
```
126-
127-
You even can spare the `-h` option, `synadm` will show some abbreviated help for the executed subcommand anyway. For example:
128-
129-
```
130-
synadm user
131-
```
132-
or
133-
```
134-
synadm user details
135-
```
136-
137-
will show essential help for the particular subcommand right away.
138-
139-
*Note: A list of currently available commands is found in chapter [implementation status / commands list](#implementation-status--commands-list)* as well as in the following chapter.
140-
141-
### Command Line Reference
142-
143-
A detailed [Command Line Reference](https://synadm.readthedocs.io/en/latest/index_cli_reference.html) can be found in `synadm's` readthedocs documentation.
144-
145-
### Advanced Usage
146-
147-
Examples of how `synadm` can be used in shell scripts and oneliners is
148-
provided in the
149-
[Scripting Examples](https://synadm.readthedocs.io/en/latest/examples.html)
150-
docs chapter.
151-
152-
153-
## Update
154-
155-
### Update PyPI Package
156-
157-
```
158-
pip3 install synadm --upgrade
159-
```
160-
161-
### Update git Installation
162-
163-
To update `synadm` to the latest development state, just update your git repo and reinstall:
164-
165-
```
166-
cd synadm
167-
git pull
168-
pip install .
169-
```
170-
171-
*Note: If you installed it to a Python venv, [activate it](CONTRIBUTING.md#3-set-up-a-python3-virtual-environment).*
172-
173-
*Note: If you installed it in [editable mode](CONTRIBUTING.md#4-install-in-editable-mode) (or for development), you can spare the `pip install .` command - just `git pull` and you're done.*
174-
175-
176-
177-
## Implementation Status / Commands List
178-
179-
The [API to CLI Mapping](https://synadm.readthedocs.io/en/latest/features.html) section of our documentation provides an overview of what `synadm` can do.
180-
181-
182-
## Get in Touch
183-
184-
If you need advice on using synadm, have a feature idea or would like to discuss anything else around `synadm`, get in touch via Matrix!
185-
186-
We are hanging around in the official support room for Synapse, [#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org). Usually you'll find `synadm` users there that might answer your questions already. If not, mentioning `synadm` will ping us with the help of Element's keyword notify feature and we'll try to get in touch.
187-
188-
The most direct way to reach synadm maintainers as well as seasoned users and Synapse admins is by joining [#synadm:peek-a-boo.at](https://matrix.to/#/#synadm:peek-a-boo.at).
189-
190-
If you are sure you've found a bug that was not already reported, certainly directly [opening an issue](https://codeberg.org/synadm/synadm/issues) is a valid option too. If unsure, ask in [#synadm:peek-a-boo.at](https://matrix.to/#/#synadm:peek-a-boo.at) first.
191-
192-
193-
194-
## Contributing
195-
196-
First of all, thanks for your interest in contributing to `synadm`! We appreciate any help, no matter if you are a programmer or a user. Both groups can do valuable things for the `synadm` project. We love providing a useful tool to fellow Synapse sysadmins but rely on contribution from the Synapse and Matrix community to keep `synadm` useful, current and stable.
197-
198-
Please review the [contributing docs](https://synadm.readthedocs.io/en/latest/contributing.html) for guidelines and help around the topic!
7+
For general questions, join [#synadm:peek-a-boo.at](https://matrix.to/#/#synadm:peek-a-boo.at).

0 commit comments

Comments
 (0)