Prepare Hub guided self-hosting docs for the next release (#3342)
* docs(hub): drop the manual auth secret from self-hosting setup Hub generates its authentication secret on first start and stores it in the database it is already using, so self-hosters no longer run openssl or carry PASEO_HUB_AUTH_SECRET between restarts. The variable stays as an override for deployments that must supply the secret from a platform secret store; Hub uses it without persisting it, so removing it resumes the stored value. Also corrects a claim that predates this change: rotating the secret does not invalidate execution credentials already issued. Hub verifies those against persisted hashes rather than the secret, so only browser sessions end. Documentation companion to https://github.com/getpaseo/hub/pull/50. * docs(hub): lead with the local guided setup * docs(hub): document XDG data directory * docs: make Hub self-hosting the quickstart
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Discord for Hub
|
||||
description: Create the Discord application your Hub uses, connect a guild, and write Discord triggers.
|
||||
description: Create the Discord application your Hub uses and connect a server.
|
||||
nav: Discord app
|
||||
order: 77
|
||||
category: Hub
|
||||
@@ -8,42 +8,26 @@ category: Hub
|
||||
|
||||
# Discord for Hub
|
||||
|
||||
Hub connects to Discord over the gateway with a bot you own. Unlike GitHub and Slack, Discord does not post to your Hub. Hub holds an outbound connection, so it needs no public webhook beyond the OAuth callback.
|
||||
Hub connects out to Discord through the gateway. Discord does not send event webhooks to Hub, so the bot does not need a public inbound endpoint.
|
||||
|
||||
## Create the application
|
||||
Open **Apps → Discord**. Hub gives you the redirect URL and the exact steps to create the application, enable its bot, and copy the Application ID, Client Secret, and Bot token.
|
||||
|
||||
Go to the [Discord developer portal](https://discord.com/developers/applications) → **New Application**.
|
||||
Under **Bot → Privileged Gateway Intents**, enable **Message Content Intent**. Without it, the bot receives empty messages and no trigger can match. Server Members Intent is not needed.
|
||||
|
||||
Under **Bot**:
|
||||
Paste the credentials into Hub and choose **Verify and save**. Then choose **Add to a Discord server** and authorize the server. Start the authorization from Hub so the server is bound to the active Hub organization.
|
||||
|
||||
- Add a bot and copy its token.
|
||||
- Enable **Message Content Intent**. Without it the bot receives empty messages and no trigger can match.
|
||||
- Server Members Intent is not needed.
|
||||
One Discord application and gateway connection serves every organization and server connected to this Hub. Keep the Hub process running; events that arrive while it is stopped are missed.
|
||||
|
||||
Under **OAuth2**, add the redirect URL:
|
||||
Now write a [Discord trigger](/docs/hub/triggers/discord).
|
||||
|
||||
```text
|
||||
https://hub.example.com/api/integrations/discord/callback
|
||||
## Configure from environment
|
||||
|
||||
Deployments that keep app secrets outside Hub can set:
|
||||
|
||||
```dotenv
|
||||
DISCORD_CLIENT_ID=
|
||||
DISCORD_CLIENT_SECRET=
|
||||
DISCORD_BOT_TOKEN=
|
||||
```
|
||||
|
||||
Replace `hub.example.com` with your `PASEO_HUB_APP_URL`.
|
||||
|
||||
## Configure Hub
|
||||
|
||||
| Value | Environment variable |
|
||||
| -------------- | ----------------------- |
|
||||
| Application ID | `DISCORD_CLIENT_ID` |
|
||||
| Client Secret | `DISCORD_CLIENT_SECRET` |
|
||||
| Bot token | `DISCORD_BOT_TOKEN` |
|
||||
|
||||
Restart Hub. Discord shows as **Ready** in Connections.
|
||||
|
||||
## Connect
|
||||
|
||||
Open **Connections → Discord → Connect**, choose the server, and authorize. Hub builds the invite with the permissions the bot needs, so you do not construct an invite URL yourself.
|
||||
|
||||
The connection appears with a slug derived from the guild name.
|
||||
|
||||
Because Hub holds one gateway connection for the whole deployment, one bot serves every organization and guild you connect.
|
||||
|
||||
Now write a trigger: [Discord triggers](/docs/hub/triggers/discord).
|
||||
`DISCORD_CLIENT_ID` is the Application ID shown under **General Information**. Environment configuration takes precedence over a saved Discord application and appears as **Managed by environment** under **Apps**.
|
||||
|
||||
Reference in New Issue
Block a user