A lightweight simple CDN to serve static assets. Easy to selfhost, just create a Slack app using the provided manifest and use the Dockerfile to deploy on your service of choice and set the necessary environment variables looking at .env.sample.
- Python (3.13 or later)
- uv
- A Slack workspace where you have permissions to install apps
- Go to https://api.slack.com/apps and click "Create New App".
- Choose "From an app manifest" and select your workspace.
- Copy and paste the manifest in
manifest.yml - Review and create the app.
- In the "Basic Information" section, note down the
App Id,Client Id,Client Secret,Signing Secret. - Go to "OAuth & Permissions" and install the app to your workspace. Note down the "Bot User OAuth Token".
-
Clone the repository:
git clone https://github.com/transcental/cdn.git cd cdn -
Rename the
appfolder to your app. You should also update this inpyproject.tomland do a find and replace forapp.tofoldername.. -
Install dependencies:
uv sync source .venv/bin/activate # for bash/zsh source .venv/bin/activate.fish # for fish source .venv/bin/activate.csh # for csh source .venv/bin/activate.ps1 # for powershell -
Copy the
.env.samplefile to.env:cp .env.sample .env -
Edit the
.envfile and fill in the values.
-
Start your tunneling tool and expose the local server. (Not needed in socket mode with
SLACK_APP_TOKENset)Note the HTTPS URL you get.
-
Update your Slack app's request URLs:
- Go to your Slack app's settings.
- In "Event Subscriptions" and "Interactivity & Shortcuts", update the request URL to your HTTPS URL followed by
/slack/events. - In "OAuth & Permissions", update
Redirect URLsto your HTTPS URL followed by/slack/oauth_redirect.
-
Start the application:
app
Your Slack app should now be running and connected to your Slack workspace!
If you're adding commands, your commands in development will be prefixed with /dev-COMMAND. When deploying your app, you must set the ENVIRONMENT env var to production.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.