diff --git a/Cargo.toml b/Cargo.toml index ae7de599..9196cf46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -137,7 +137,7 @@ instead of a server that has high scalability.""" section = "net" priority = "optional" assets = [ - ["debian/README.Debian", "usr/share/doc/matrix-conduit/", "644"], + ["debian/README.md", "usr/share/doc/matrix-conduit/README.Debian", "644"], ["README.md", "usr/share/doc/matrix-conduit/", "644"], ["target/release/conduit", "usr/sbin/matrix-conduit", "755"], ] diff --git a/DEPLOY.md b/DEPLOY.md index b7433380..ec7dd461 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -81,7 +81,7 @@ you to make sure that the file permissions are correctly set up. In Debian or RHEL, you can use this command to create a Conduit user: ```bash -sudo adduser --system conduit --no-create-home +sudo adduser --system conduit --group --disable-login --no-create-home ``` ## Forwarding ports in the firewall or the router diff --git a/README.md b/README.md index 8fabefd6..52ea3c1f 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Check out the [Conduit 1.0 Release Milestone](https://gitlab.com/famedly/conduit #### How can I deploy my own? - Simple install (this was tested the most): [DEPLOY.md](DEPLOY.md) -- Debian package: [debian/README.Debian](debian/README.Debian) +- Debian package: [debian/README.md](debian/README.md) - Nix/NixOS: [nix/README.md](nix/README.md) - Docker: [docker/README.md](docker/README.md) diff --git a/debian/README.Debian b/debian/README.md similarity index 58% rename from debian/README.Debian rename to debian/README.md index 5f63b5cb..443be76b 100644 --- a/debian/README.Debian +++ b/debian/README.md @@ -1,28 +1,36 @@ Conduit for Debian ================== +Installation +------------ + +Information about downloading, building and deploying the Debian package, see +the "Installing Conduit" section in [DEPLOY.md](../DEPLOY.md). +All following sections until "Setting up the Reverse Proxy" be ignored because +this is handled automatically by the packaging. + Configuration ------------- When installed, Debconf generates the configuration of the homeserver (host)name, the address and port it listens on. This configuration ends up in -/etc/matrix-conduit/conduit.toml. +`/etc/matrix-conduit/conduit.toml`. You can tweak more detailed settings by uncommenting and setting the variables -in /etc/matrix-conduit/conduit.toml. This involves settings such as the maximum +in `/etc/matrix-conduit/conduit.toml`. This involves settings such as the maximum file size for download/upload, enabling federation, etc. Running ------- -The package uses the matrix-conduit.service systemd unit file to start and +The package uses the `matrix-conduit.service` systemd unit file to start and stop Conduit. It loads the configuration file mentioned above to set up the environment before running the server. This package assumes by default that Conduit will be placed behind a reverse proxy such as Apache or nginx. This default deployment entails just listening -on 127.0.0.1 and the free port 6167 and is reachable via a client using the URL -http://localhost:6167. +on `127.0.0.1` and the free port `6167` and is reachable via a client using the URL +. At a later stage this packaging may support also setting up TLS and running stand-alone. In this case, however, you need to set up some certificates and diff --git a/debian/postinst b/debian/postinst index 73e554b7..dfa599de 100644 --- a/debian/postinst +++ b/debian/postinst @@ -19,11 +19,11 @@ case "$1" in _matrix-conduit fi - # Create the database path if it does not exist yet. - if [ ! -d "$CONDUIT_DATABASE_PATH" ]; then - mkdir -p "$CONDUIT_DATABASE_PATH" - chown _matrix-conduit "$CONDUIT_DATABASE_PATH" - fi + # Create the database path if it does not exist yet and fix up ownership + # and permissions. + mkdir -p "$CONDUIT_DATABASE_PATH" + chown _matrix-conduit "$CONDUIT_DATABASE_PATH" + chmod 700 "$CONDUIT_DATABASE_PATH" if [ ! -e "$CONDUIT_CONFIG_FILE" ]; then # Write the debconf values in the config.