{"id":27375108,"url":"https://github.com/katharostech/docker_ooye","last_synced_at":"2025-04-13T12:14:29.691Z","repository":{"id":227175694,"uuid":"770663198","full_name":"katharostech/docker_ooye","owner":"katharostech","description":"A docker container for the Out Of Your Element ( OOYE ) Matrix-to-Discord bridge.","archived":false,"fork":false,"pushed_at":"2024-09-11T15:15:39.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T12:14:25.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katharostech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-11T23:54:51.000Z","updated_at":"2025-02-16T01:09:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c4947a5-6950-4b88-bc92-27db6a98931a","html_url":"https://github.com/katharostech/docker_ooye","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"063a7079c49cfa708f2166c70150ea3e65ceb66e"},"previous_names":["katharostech/docker_ooye"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdocker_ooye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdocker_ooye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdocker_ooye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katharostech%2Fdocker_ooye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katharostech","download_url":"https://codeload.github.com/katharostech/docker_ooye/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710448,"owners_count":21149191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-13T12:14:29.006Z","updated_at":"2025-04-13T12:14:29.669Z","avatar_url":"https://github.com/katharostech.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker_ooye\n\nA docker container for the [Out Of Your Element][ooye] ( OOYE ) Matrix-to-Discord bridge. OOYE makes it\n_super_ easy to bridge your Discord server to matrix, and this container makes it easy to deploy.\n\n[ooye]: https://gitdab.com/cadence/out-of-your-element\n\n## Usage\n\n### Create Discord Bot\n\nThe first step is to create a Discord bot that can be invited to the discord servers that you want\nto bridge to matrix.\n\n1. Go to the [Discord Developer Applications page](https://discord.com/developers/applications).\n2. Click \"New Application\".\n3. Give it a name like \"My Bridge Bot\" and click \"Create\".\n4. Go to the \"Bot\" tab in the left sidebar.\n5. Scroll down and click the \"Reset Token\" button.\n6. Confirm with \"Yes, do it!\" button.\n7. There will now be a token displayed.\n8. Click \"Copy\" below the token, and save that for future reference.\n9. Scroll down and make sure that the \"MESSAGE CONTENT INTENT\" toggle is enabled.\n\n### Setup OOYE\n\nNow we can run our OOYE bridge.\n\n1. Run the following command on your server **twice**, to generate two random 64 character hex keys,\n  and save the keys for future reference.\n  ```\n  dd if=/dev/urandom bs=32 count=1 2\u003e /dev/null | basenc --base16 | dd conv=lcase 2\u003e /dev/null\n  ```\n2. Create a blank database file for ooye:\n```bash\ntouch ooye.db\n# OOYE runs as user 1001 in the container\n# so we make sure the database owner matches.\nsudo chown 1001:1001 ooye.db\n```\n2. Create a `docker-compose.yml` like the one below, but with your server info and tokens substituted\n  in the `environment` section.\n  Note the `ADMIN_INVITE` section, in which you should specify the matrix ID of the user that you want\n  to have admin access on the matrix spaces and channels that the bot creates and bridges.\n```yaml\nservices:\n  ooye:\n    image: ghcr.io/katharostech/ooye:master\n    environment:\n      SERVER_NAME: your.server.name\n      SERVER_ORIGIN: https://your.server.name\n      ADMIN_INVITE: \"@your_admin_user:some.matrix.server.that.could.be.your.server.name.or.not\"\n      URL: http://address_of_ooye_from_your.server.name:6693\n      HS_TOKEN: your_first_random_token\n      AS_TOKEN: your_second_random_token\n      DISCORD_TOKEN: your_discord_bot_token\n    ports:\n      - 6693:6693\n    volumes:\n      - ooye-data:/data\n\nvolumes:\n  ooye-data:\n```\n3. In the same folder as your `docker-compose.yml` run `docker compose up -d`.\n4. You'll see the container download and start up. It will exit immediately after startup, that is\n  expected.\n5. Run `docker compose logs --no-log-prefix`.\n6. You will see the startup logs printed, and at the top you will see `Here is your registration YAML:`.\n  Take the YAML section, which is separated from the rest of the logs by a blank line above and below it,\n  and use that to register an Application Service with your matrix server. You can see the [Synapse docs][sd]\n  or the [Conduit docs][cd] for how to register the app service with your matrix server.\n7. Run `docker compose up -d` again.\n8. Run `docker compose logs -f` to follow the logs while the container starts up. A successful startup looks\n  like this:\n  ```\nooye-1  | Here is your registration YAML:\nooye-1  |\nooye-1  | id: de8c56117637cb5d9f4ac216f612dc2adb1de4c09ae8d13553f28c33a28147c7\nooye-1  | hs_token: 55d271cc660bd2c887408d3f218fdd93cf61be37936948ca15ca180757c1b152\nooye-1  | as_token: cff051af6ae69851fb8b928d9c91da20e17cb7bca437d7fd40b0c9ac2166c332\nooye-1  | url: http://localhost:6693\nooye-1  | sender_localpart: _ooye_bot\nooye-1  | protocols:\nooye-1  |   - discord\nooye-1  | namespaces:\nooye-1  |   users:\nooye-1  |     - exclusive: true\nooye-1  |       regex: '@_ooye_.*'\nooye-1  |   aliases:\nooye-1  |     - exclusive: true\nooye-1  |       regex: '#_ooye_.*'\nooye-1  | rate_limited: false\nooye-1  | ooye:\nooye-1  |   namespace_prefix: _ooye_\nooye-1  |   max_file_size: 5000000\nooye-1  |   server_name: my.matrix.server\nooye-1  |   server_origin: https://my.matrix.server\nooye-1  |   content_length_workaround: false\nooye-1  |   invite:\nooye-1  |     - '@my_username:matrix.org'\nooye-1  |\nooye-1  | Setting up / seeding database if necessary\nooye-1  | This could take up to 30 seconds. Please be patient.\nooye-1  | ✅ Configuration looks good...\nooye-1  | ✅ Database is ready...\nooye-1  | [api] register: _ooye_bot\nooye-1  | ✅ Matrix appservice login works...\nooye-1  | ✅ Emojis are ready...\nooye-1  | ✅ Discord profile updated...\nooye-1  | ✅ Matrix profile updated...\nooye-1  | Good to go. I hope you enjoy Out Of Your Element.\nooye-1  | Starting server\nooye-1  | Discord gateway started\nooye-1  | Discord logged in as My Bridge Bot#2400 (1245678910111213141)\nooye-1  | [2024-03-16T00:16:50 Client Ready]\n  ```\n9. Press `ctrl+C` to exit stop following the logs once it's ready.\n\n[sd]: https://matrix-org.github.io/synapse/latest/application_services.html\n[cd]: https://gitlab.com/famedly/conduit/-/blob/next/APPSERVICES.md\n\n### Invite the Bot To Your Server\n\nNow that we've got our bridge running, we can invite the bot to our Discord guild! OOYE is cool\nand allows you to easily bridge multiple Discord guilds without having to run multiple bridges,\nso you can follow these steps once for each guild you want to bridge.\n\n1. Run `docker compose exec ooye node addbot.js`.\n2. Click the link that is printed out by that command.\n3. Select the Discord guild that you want to bridge from the dropdown, and click \"Continue\".\n4. It will show the required permissions. Click \"Authorize\".\n5. Visit your Discord guild and go through every channel and post something like _connecting matrix bridge_.\n  Posting in a Discord channel will cause the bridge to create a corresponding matrix channel that matrix\n  users will be able to join.\n\n### Configuring Your Matrix Rooms\n\nYour `ADMIN_INVITE` user should receive an invite to any bridge discord spaces. This allows you\nto, for instance, make the space public, so that other users can join. Otherwise, you can keep\nthe space private, and invite whomever you wish.\n\nThat's the last step, your matrix bridge is finished!\n\n## Troubleshooting\n\n### `MatrixServerError: User ID already taken.`\n\nIf you start an OOYE bridge and connected it to your matrix server, and then you start a new OOYE\nbridge, and connect that to the _same_ matrix server, you may get errors from OOYE complaining\nthat a user ID is already taken. This seems to be because OOYE will create users in matrix that correspond\nwith the Discord users, but they will have their user ID prefixed with a namespace like `_ooye_`.\nIf you start a new OOYE bridge and connect it to the same server, it will try to create those\ncorresponding users with the same ID.\n\nYou might be able to fix this by setting the `NAMESPACE_PREFIX` environment\nvariable in the `environment:` section of your `docker-compose.yaml`, for example:\n\n```yaml\n# ...\n    environment:\n      NAMESPACE_PREFIX: _ooye2_\n# ...\n```\n\nThis seems to resolve some errors, but not all of them, so we're still investigating this.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fdocker_ooye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatharostech%2Fdocker_ooye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatharostech%2Fdocker_ooye/lists"}