Rename config file, parameters, application name, package.
This commit is contained in:
@@ -6,37 +6,37 @@
|
||||
1. Download the [latest release](https://github.com/ma1uta/ma1sd/releases/latest)
|
||||
2. Run:
|
||||
```bash
|
||||
dpkg -i /path/to/downloaded/mxisd.deb
|
||||
dpkg -i /path/to/downloaded/ma1sd.deb
|
||||
```
|
||||
## Files
|
||||
| Location | Purpose |
|
||||
|-------------------------------------|----------------------------------------------|
|
||||
| `/etc/mxisd` | Configuration directory |
|
||||
| `/etc/mxisd/mxisd.yaml` | Main configuration file |
|
||||
| `/etc/systemd/system/mxisd.service` | Systemd configuration file for mxisd service |
|
||||
| `/usr/lib/mxisd` | Binaries |
|
||||
| `/var/lib/mxisd` | Data |
|
||||
| `/var/lib/mxisd/signing.key` | Default location for mxisd signing keys |
|
||||
| `/etc/ma1sd` | Configuration directory |
|
||||
| `/etc/ma1sd/ma1sd.yaml` | Main configuration file |
|
||||
| `/etc/systemd/system/ma1sd.service` | Systemd configuration file for ma1sd service |
|
||||
| `/usr/lib/ma1sd` | Binaries |
|
||||
| `/var/lib/ma1sd` | Data |
|
||||
| `/var/lib/ma1sd/signing.key` | Default location for ma1sd signing keys |
|
||||
|
||||
## Control
|
||||
Start mxisd using:
|
||||
Start ma1sd using:
|
||||
```bash
|
||||
sudo systemctl start mxisd
|
||||
sudo systemctl start ma1sd
|
||||
```
|
||||
|
||||
Stop mxisd using:
|
||||
Stop ma1sd using:
|
||||
```bash
|
||||
sudo systemctl stop mxisd
|
||||
sudo systemctl stop ma1sd
|
||||
```
|
||||
|
||||
## Troubleshoot
|
||||
All logs are sent to `STDOUT` which are saved in `/var/log/syslog` by default.
|
||||
You can:
|
||||
- grep & tail using `mxisd`:
|
||||
- grep & tail using `ma1sd`:
|
||||
```
|
||||
tail -n 99 -f /var/log/syslog | grep mxisd
|
||||
tail -n 99 -f /var/log/syslog | grep ma1sd
|
||||
```
|
||||
- use Systemd's journal:
|
||||
```
|
||||
journalctl -f -n 99 -u mxisd
|
||||
journalctl -f -n 99 -u ma1sd
|
||||
```
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
## Fetch
|
||||
Pull the latest stable image:
|
||||
```bash
|
||||
docker pull kamax/mxisd
|
||||
docker pull kamax/ma1sd
|
||||
```
|
||||
|
||||
## Configure
|
||||
On first run, simply using `MATRIX_DOMAIN` as an environment variable will create a default config for you.
|
||||
You can also provide a configuration file named `mxisd.yaml` in the volume mapped to `/etc/mxisd` before starting your
|
||||
You can also provide a configuration file named `ma1sd.yaml` in the volume mapped to `/etc/ma1sd` before starting your
|
||||
container.
|
||||
|
||||
## Run
|
||||
@@ -22,7 +22,7 @@ Use the following command after adapting to your needs:
|
||||
- The volumes host paths
|
||||
|
||||
```bash
|
||||
docker run --rm -e MATRIX_DOMAIN=example.org -v /data/mxisd/etc:/etc/mxisd -v /data/mxisd/var:/var/mxisd -p 8090:8090 -t kamax/mxisd
|
||||
docker run --rm -e MATRIX_DOMAIN=example.org -v /data/ma1sd/etc:/etc/ma1sd -v /data/ma1sd/var:/var/ma1sd -p 8090:8090 -t kamax/ma1sd
|
||||
```
|
||||
|
||||
For more info, including the list of possible tags, see [the public repository](https://hub.docker.com/r/kamax/mxisd/)
|
||||
|
||||
@@ -5,23 +5,23 @@ avoid leak of credentials/key pairs
|
||||
|
||||
## Configuration
|
||||
Your config file should have the following ownership:
|
||||
- Dedicated user for mxisd, used to run the software
|
||||
- Dedicated group for mxisd, used by other applications to access and read configuration files
|
||||
- Dedicated user for ma1sd, used to run the software
|
||||
- Dedicated group for ma1sd, used by other applications to access and read configuration files
|
||||
|
||||
Your config file should have the following access:
|
||||
- Read and write for the mxisd user
|
||||
- Read for the mxisd group
|
||||
- Read and write for the ma1sd user
|
||||
- Read for the ma1sd group
|
||||
- Nothing for others
|
||||
|
||||
This translates into `640` and be applied with `chmod 640 /path/to/config/file.yaml`.
|
||||
|
||||
## Data
|
||||
The only sensible place is the key store where mxisd's signing keys are stored. You should therefore limit access to only
|
||||
the mxisd user, and deny access to anything else.
|
||||
The only sensible place is the key store where ma1sd's signing keys are stored. You should therefore limit access to only
|
||||
the ma1sd user, and deny access to anything else.
|
||||
|
||||
Your key store should have the following access:
|
||||
- Read and write for the mxisd user
|
||||
- Nothing for the mxisd group
|
||||
- Read and write for the ma1sd user
|
||||
- Nothing for the ma1sd group
|
||||
- Nothing for others
|
||||
|
||||
The identity store can either be a file or a directory, depending on your version. v1.4 and higher are using a directory,
|
||||
|
||||
@@ -5,40 +5,40 @@ Follow the [build instructions](../build.md) then:
|
||||
### Prepare files and directories:
|
||||
```bash
|
||||
# Create a dedicated user
|
||||
useradd -r mxisd
|
||||
useradd -r ma1sd
|
||||
|
||||
# Create config directory
|
||||
mkdir -p /etc/mxisd
|
||||
mkdir -p /etc/ma1sd
|
||||
|
||||
# Create data directory and set ownership
|
||||
mkdir -p /var/lib/mxisd
|
||||
chown -R mxisd /var/lib/mxisd
|
||||
mkdir -p /var/lib/ma1sd
|
||||
chown -R ma1sd /var/lib/ma1sd
|
||||
|
||||
# Create bin directory, copy the jar and launch scriot to bin directory
|
||||
mkdir /usr/lib/mxisd
|
||||
cp ./build/libs/mxisd.jar /usr/lib/mxisd/
|
||||
cp ./src/script/mxisd /usr/lib/mxisd
|
||||
chown -R mxisd /usr/lib/mxisd
|
||||
chmod a+x /usr/lib/mxisd/mxisd
|
||||
mkdir /usr/lib/ma1sd
|
||||
cp ./build/libs/ma1sd.jar /usr/lib/ma1sd/
|
||||
cp ./src/script/ma1sd /usr/lib/ma1sd
|
||||
chown -R ma1sd /usr/lib/ma1sd
|
||||
chmod a+x /usr/lib/ma1sd/ma1sd
|
||||
|
||||
# Create symlink for easy exec
|
||||
ln -s /usr/lib/mxisd/mxisd /usr/bin/mxisd
|
||||
ln -s /usr/lib/ma1sd/ma1sd /usr/bin/ma1sd
|
||||
```
|
||||
|
||||
### Prepare config file
|
||||
Copy the configuration file you've created following the build instructions to `/etc/mxisd/mxisd.yaml`
|
||||
Copy the configuration file you've created following the build instructions to `/etc/ma1sd/ma1sd.yaml`
|
||||
|
||||
### Prepare Systemd
|
||||
1. Copy `src/systemd/mxisd.service` to `/etc/systemd/system/` and edit if needed
|
||||
1. Copy `src/systemd/ma1sd.service` to `/etc/systemd/system/` and edit if needed
|
||||
2. Enable service for auto-startup
|
||||
```bash
|
||||
systemctl enable mxisd
|
||||
systemctl enable ma1sd
|
||||
```
|
||||
|
||||
### Run
|
||||
```bash
|
||||
systemctl start mxisd
|
||||
systemctl start ma1sd
|
||||
```
|
||||
|
||||
## Debug
|
||||
mxisd logs to stdout, which is normally sent to `/var/log/syslog` or `/var/log/messages`.
|
||||
ma1sd logs to stdout, which is normally sent to `/var/log/syslog` or `/var/log/messages`.
|
||||
|
||||
Reference in New Issue
Block a user