diff --git a/README.md b/README.md index 37d7a6f..00a9557 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # IT-infra + Document hacklab.fi common use infra ## Matrix server + Documentation for hacklab.fi usage, Matrix-server and other things This repository is source, actual site is here: diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 5123e7e..9d22d59 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -1,5 +1,7 @@ # Summary +[Readme](./readme.md) + - [Matrix](./matrix/general.md) - [Discord](./matrix/discord.md) - [Facebook](./matrix/facebook.md) @@ -9,4 +11,4 @@ - [Telegram](./matrix/telegram.md) - [Whatsapp](./matrix/whatsapp.md) - [Hookshot](./matrix/hookshot.md) -- [Server Admin minutes](./Server-admin-minutes.md) +- [Sysops](./sysops/general.md) diff --git a/src/matrix/discord.md b/src/matrix/discord.md index 4b3b399..07ce885 100644 --- a/src/matrix/discord.md +++ b/src/matrix/discord.md @@ -12,6 +12,6 @@ An Matrix<->Discord bridge for receiving and sending Discord messages with Matri - Invite the bridge to your Discord server using the link. The bridge will need all the permissions selected. - Invite `@_discord_bot:hacklab.fi` to your Matrix room. The bot should have permissions to invite users. - Open the text channel you'd like to bridge in the Discord web application. -- In the address bar there should be a URL like https://discordapp.com/channels/ServerID/ChannelID +- In the address bar there should be a URL like `https://discordapp.com/channels/ServerID/ChannelID` - Use that as a reference to say in your Matrix room `!discord bridge ServerID ChannelID` - The bridge will ask for confirmation on Discord side, and after approved your room should be bridged to Discord. diff --git a/src/matrix/facebook.md b/src/matrix/facebook.md index 94f4efd..18d0b33 100644 --- a/src/matrix/facebook.md +++ b/src/matrix/facebook.md @@ -1,6 +1,6 @@ # Matrix<->Facebook bridge -Up to date info about Mautrix-facebook itself: https://docs.mau.fi/bridges/python/facebook/index.html +Up to date info about Mautrix-facebook itself: ## What? @@ -19,7 +19,7 @@ An Matrix<->Facebook bridge for receiving and sending Facebook messages with Mat You can replace the Matrix puppet of your Messenger account with your Matrix account. When you do so, messages that you send from other Messenger clients will be sent from your Matrix account instead of the default puppet user. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. As with the Messenger account login, you must do this in a private chat with the bridge bot. diff --git a/src/matrix/gmessages.md b/src/matrix/gmessages.md index 9526970..bfd009a 100644 --- a/src/matrix/gmessages.md +++ b/src/matrix/gmessages.md @@ -1,6 +1,6 @@ # Matrix<->Google Messages bridge -Up to date info about Mautrix-gmessages itself: https://docs.mau.fi/bridges/go/gmessages/index.html +Up to date info about Mautrix-gmessages itself: ## What? @@ -23,7 +23,7 @@ This bridge uses the GMessages API, so your phone must be connected to the inter You can replace the Matrix puppet of your GMessages account with your Matrix account. When you do so, messages sent with GMessages app should be seen normally on Matrix-side. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. As with the GMessages account login, you must do this in a private chat with the bridge bot. diff --git a/src/matrix/hookshot.md b/src/matrix/hookshot.md index fe82e75..aa35a32 100644 --- a/src/matrix/hookshot.md +++ b/src/matrix/hookshot.md @@ -2,9 +2,9 @@ Github, Gitlab, Jira and generic webhooks! -https://matrix-org.github.io/matrix-hookshot/latest/hookshot.html + -https://github.com/matrix-org/matrix-hookshot + ## What? @@ -65,7 +65,7 @@ And to remove a feed Github has a github app registered for us `Hacklab.fi Matrix Hookshot` to use for the integration (@tsw:hacklab.fi, github username tswfi is the owner) -Install the app https://github.com/apps/hacklab-fi-matrix-hookshot into your account / organisation you want to use with hookshot. +Install the app into your account / organisation you want to use with hookshot. To login to your github account talk with `@hookshot:hacklab.fi` and check with `github status` if you are already logged in and with `github login` you can complete oauth with github. @@ -89,7 +89,7 @@ Closing an issue Hookshot github app will also push changes to the channel. Managing what to show is defined in the room state. TODO: document how to change these: -Check all the available options in https://matrix-org.github.io/matrix-hookshot/latest/usage/room_configuration/github_repo.html#configuration +Check all the available options in ## How it was installed @@ -105,7 +105,7 @@ sudo apt install curl build-essential gcc make sudo apt install build-essential libssl-dev ``` -basic steps for creating the user, installing necessary stuff and so on (note, the curl commands are taken from https://github.com/nvm-sh/nvm#installing-and-updating and https://rustup.rs/) +basic steps for creating the user, installing necessary stuff and so on (note, the curl commands are taken from and ) ### Create user diff --git a/src/matrix/signal.md b/src/matrix/signal.md index a8bbe41..0fa75d2 100644 --- a/src/matrix/signal.md +++ b/src/matrix/signal.md @@ -1,11 +1,13 @@ # Matrix<->Signal bridge -Up to date info about Mautrix-signal itself: https://docs.mau.fi/bridges/python/signal/index.html +Up to date info about Mautrix-signal itself: + ## What? An Matrix<->signal bridge for receiving and sending signal messages with Matrix-client, bridging groupchats, puppeting.. At the time of writing still pretty early version, but basic functionality exist and should work, like start chat from matrix, using as primary or linked device (signal stuff), direct messaging and group chats ## Set up + - On matrix: Open chat with `@signalbot:hacklab.fi` - Issue _either_ - `link [device name]` to link the bridge as a secondary device @@ -15,7 +17,7 @@ An Matrix<->signal bridge for receiving and sending signal messages with Matrix- You can replace the Matrix puppet of your Signal account with your Matrix account. When you do so, messages that you send from other Signal clients will be sent from your Matrix account instead of the default puppet user. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. As with the Signal account login, you must do this in a private chat with the bridge bot. diff --git a/src/matrix/slack.md b/src/matrix/slack.md index 0a8fc95..d2a35a6 100644 --- a/src/matrix/slack.md +++ b/src/matrix/slack.md @@ -3,18 +3,19 @@ ## Mautrix-slack: Mautrix-slack (puppeting bridge, channel bridging is not available), Mautrix-slack is recommended for new setups, Appservice-slack is deprecated. -Up to date info about Mautrix-slack itself: https://docs.mau.fi/bridges/go/slack/index.html +Up to date info about Mautrix-slack itself: ## What? An Matrix<->Slack bridge for individial using Slack through Matrix. ## Set up -- General setup finds from: https://docs.mau.fi/bridges/go/slack/authentication.html +- General setup finds from: - Ask details Matrix-channel: `#general:hacklab.fi` if unsure. ## Appservice-slack (deprecated) -Up to date info about matrix-appservice-slack itself: https://github.com/matrix-org/matrix-appservice-slack + +Up to date info about matrix-appservice-slack itself: ## What? @@ -24,7 +25,7 @@ An Matrix<->Slack bridge for bridging Slack-room to Matrix-room; puppets Slack-u You can replace the Matrix puppet of your Slack account with your Matrix account. When you do so, messages that you send from other Slack clients will be sent from your Matrix account instead of the default puppet user. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. As with the Slack account login, you must do this in a private chat with the bridge bot. diff --git a/src/matrix/telegram.md b/src/matrix/telegram.md index 595c4ca..b2d4982 100644 --- a/src/matrix/telegram.md +++ b/src/matrix/telegram.md @@ -1,6 +1,6 @@ # Matrix<->Telegram bridge -Up to date info about Mautrix-telegram itself: https://docs.mau.fi/bridges/python/telegram/index.html +Up to date info about Mautrix-telegram itself: ## What? @@ -20,7 +20,7 @@ You can replace the Matrix puppet of your Telegram account with your Matrix acco As with the Telegram account login, you must do this in a private chat with the bridge bot. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. - Log in with `login-matrix ` - After logging in, the default Matrix puppet of your Telegram account should leave rooms and your account should join all rooms the puppet was in automatically. diff --git a/src/matrix/whatsapp.md b/src/matrix/whatsapp.md index 6aeb78f..2510546 100644 --- a/src/matrix/whatsapp.md +++ b/src/matrix/whatsapp.md @@ -1,6 +1,6 @@ # Matrix<->Whatsapp bridge -Up to date info about Mautrix-whatsapp itself: https://docs.mau.fi/bridges/go/whatsapp/index.html +Up to date info about Mautrix-whatsapp itself: ## What? @@ -24,7 +24,7 @@ There also exist instructions how to run Android in virtual machine so you could You can replace the Matrix puppet of your Whatsapp account with your Matrix account. When you do so, messages that you send from other Whatsapp clients will be sent from your Matrix account instead of the default puppet user. -How to get virgin Access-token: Use https://gitlab.com/vurpo/matrix-login/ for currently most effortless method. +How to get virgin Access-token: Use for currently most effortless method. As with the Whatsapp account login, you must do this in a private chat with the bridge bot. diff --git a/src/readme.md b/src/readme.md new file mode 100644 index 0000000..fac76c8 --- /dev/null +++ b/src/readme.md @@ -0,0 +1,12 @@ +# Hacklab IT Infra documentation + +This site contains documentation for Hacklab IT services for both users and for sysops. + +Site is WIP and more information will be added as time permits. + +* [Matrix](/matrix/general.html) +* TODO: [DNS](/dns/general.html) +* TODO: [Websites](/websites/general.html) +* TODO: [Jitsi](/jitsi/general.html) +* TODO: [Discourse](/websites/general.html) +* [Sysops](/sysops/general.html) \ No newline at end of file diff --git a/src/Server-admin-minutes.md b/src/sysops/general.md similarity index 64% rename from src/Server-admin-minutes.md rename to src/sysops/general.md index 996e3be..29469d1 100644 --- a/src/Server-admin-minutes.md +++ b/src/sysops/general.md @@ -2,13 +2,25 @@ We use /opt/ for base home folder for system users, give it nologin as shell, etc -`sudo useradd --shell /usr/sbin/nologin --system --user-group --create-home --comment "Service longname" --home-dir /opt/servicehomedir username` +```bash +sudo useradd --shell /usr/sbin/nologin \ + --system --user-group \ + --create-home \ + --comment "Service longname" \ + --home-dir /opt/servicehomedir username +``` # Getting shell as system user for admin to do thing as the user -`sudo -Hu username /bin/bash -l` + +```bash +sudo -Hu username /bin/bash -l +``` Same can be used to run psql on postgres user directly -`sudo -Hu postgres psql` + +```bash +sudo -Hu postgres psql +``` # Software installations @@ -16,10 +28,10 @@ We've used apt repositories where possible and rest is "directly on the host" in Links to most of them: -mautrix-bridges: https://docs.mau.fi/bridges/index.html -mx-puppet-discord: https://github.com/matrix-discord/mx-puppet-discord -appservice-slack: https://matrix-appservice-slack.readthedocs.io/en/latest/getting_started/ -heisenbridge: https://github.com/hifi/heisenbridge +* mautrix-bridges: +* mx-puppet-discord: +* appservice-slack: +* heisenbridge: # SSH related