Watch
0
0
Fork
You've already forked bunny-ircv3-filehost
0
Simple PHP implementation of IRCv3 draft/FILEHOST using bunny.net
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-27 23:18:04 -06:00
.env.example env example 2026-09-13 03:19:49 -06:00
README.md update the readme 2026-09-13 03:18:05 -06:00
uploads.php more file types 2026-09-27 23:18:04 -06:00

bunny-ircv3-filehost

Simple PHP implementation of IRCv3 draft/FILEHOST feature using bunny.net. Allows drag and drop, and paste from clipboard, uploads to Bunny Storage. Served over BunnyCDN and authenticated via SASL automatically so uploads are sorted into user folders

This assumes Ergo as the server, and Halloy as the client for testing (what I use). It also assumes the script and IRC sever are on the same box

env

This utilises a .env file for secretys. File lives outside of the webroot in the project root. Secrets should never be in a publicly accessible directory

Ergo

You need to add/uncomment this line in your ircd.yaml file. Use your actual domain + path for the upload script.

server:
  additional-isupport:
    "soju.im/FILEHOST": "https://irc.domain.net/uploads"

nginx

I use nginx as a reverse proxy on my server, so here's how I route the things. You can tweak it for your setup.

client_max_body_size 25M;

location = /uploads {
    include fastcgi_params;
    fastcgi_pass unix:/run/php/php8.4-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root/uploads.php;
    fastcgi_param SCRIPT_NAME /uploads.php;
    fastcgi_param HTTP_AUTHORIZATION $http_authorization;
}

location = /uploads.php {
    return 404;
}