Self-Host NotiFansly Bot
Run your own instance of NotiFansly and customize it for your community.
Prerequisites
Before you begin, make sure you have the following:
- A Discord account
- Basic familiarity with command line interfaces
- A Fansly account with active login credentials
- A server or computer to host the bot (available 24/7 for best results)
Discord Bot Setup
You’ll need to create your own Discord bot application:
- Go to the Discord Developer Portal
- Click “New Application” and give it a name (e.g., “MyNotiFansly”)
- Navigate to the “Bot” tab
- Here you can customize your bot’s username and avatar if desired
- Copy your bot token by clicking “Reset Token” and then “Copy” (keep this secure!)
- Under the “Authorization Flow” section:
- Keep “Public Bot” checked (so anyone can add your bot to servers)
- Leave “Requires OAuth2 Code Grant” unchecked (not needed for this bot)
- Under the “Privileged Gateway Intents” section, enable:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Go to the “General Information” tab and copy your Application ID and Public Key (you’ll need these for your configuration)
- Go to the “Installation” → uncheck user install and use discord’s provided install link.
- Select the following scopes:
- bot
- applications.commands
- Select the following bot permissions:
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Use External Emojis
- Add Reactions
- Manage Roles
- Mention Everyone
- Copy the generated URL – this is what you’ll use to add your bot to servers
Note: By self-hosting, each server owner will add their own instance of the bot, which means you won’t hit the 100-server limit that requires verification.
Installation
NotiFansly is written in Go with pre-built executables available:
Download the latest release (current version: v0.3.4) from our GitHub repository
# Linux (64-bit) wget https://github.com/fvckgrimm/discord-fansly-notify/releases/download/v0.3.4/discord-fansly-notify_0.3.4_linux_amd64.tar.gz tar -xzf discord-fansly-notify_0.3.4_linux_amd64.tar.gz # macOS wget https://github.com/fvckgrimm/discord-fansly-notify/releases/download/v0.3.4/discord-fansly-notify_0.3.4_darwin_amd64.tar.gz tar -xzf discord-fansly-notify_0.3.4_darwin_amd64.tar.gz # Windows # Download the discord-fansly-notify_0.3.4_windows_amd64.zip file and extract it
Create a directory for the bot and extract the executable there
Configuration
Create a .env
file in the same directory as the executable.
# --- Required Settings ---
APP_ID=YOUR_APP_ID
DISCORD_TOKEN=YOUR_BOT_TOKEN
PUBLIC_KEY=YOUR_PUBLIC_KEY
FANSLY_TOKEN=YOUR_FANSLY_TOKEN
USER_AGENT=YOUR_BROWSER_USER_AGENT
# --- Optional Settings (for customization) ---
# The channel ID where the bot should log when new creators are added.
LOG_CHANNEL_ID=
# The maximum number of creators a single Discord server can monitor.
# Set to 0 or a negative number to disable the limit entirely.
MAX_MONITORED_USERS_PER_GUILD=0
# How often (in seconds) the bot checks for new posts and streams.
# Default is 120 (2 minutes).
MONITOR_INTERVAL_SECONDS=120
# Database type. Can be "sqlite" or "postgres". Defaults to "sqlite".
DB_TYPE=sqlite
# Path for the SQLite database file (if DB_TYPE is sqlite).
SQLITE_PATH=bot.db
# Connection string for PostgreSQL (if DB_TYPE is postgres).
# POSTGRES_URL=postgres://user:password@host:port/dbname
Required Settings
You must provide these values for the bot to run:
- APP_ID: Your application ID from the Discord Developer Portal.
- DISCORD_TOKEN: The bot token you copied earlier.
- PUBLIC_KEY: Found in the Discord Developer Portal under your application’s “General Information”.
- FANSLY_TOKEN: Your Fansly authentication token (see below).
- USER_AGENT: Your browser’s user agent (can be found by searching “what is my user agent” in a search engine).
Optional Settings
These settings have default values and can be changed to customize your bot’s behavior:
- LOG_CHANNEL_ID: The ID of a channel where you want the bot to log when creators are added.
- MAX_MONITORED_USERS_PER_GUILD: Sets a limit on how many creators can be monitored in one server. A value of
0
disables the limit, allowing unlimited creators per server. This is the recommended setting for self-hosting. - MONITOR_INTERVAL_SECONDS: Controls how frequently the bot checks Fansly for updates. The default is 120 seconds.
- DB_TYPE / SQLITE_PATH / POSTGRES_URL: Advanced settings for database configuration. The bot defaults to a simple
sqlite
file database, which is sufficient for most users.
How to Get Your Fansly Token & User Agent (Easy Method)
This is the fastest and most reliable way to get your credentials.
- Go to fansly.com, log in, and open your browser’s developer tools (usually by pressing F12, or Ctrl+Shift+I).
- Click on the “Console” tab.
- Copy and paste the entire code block below into the console, then press Enter.
console.clear();
const activeSession = localStorage.getItem("session_active_session");
const { token } = JSON.parse(activeSession);
console.log('%c➡️ Authorization_Token:', 'font-size: 14px; color: #8B5CF6; font-weight: bold;', token);
console.log('%c➡️ User_Agent:', 'font-size: 14px; color: #F59E0B; font-weight: bold;', navigator.userAgent);
The console will print out your Authorization_Token and your User_Agent. Copy these values and paste them into your .env file.
Warning: Your Authorization Token provides full access to your account. Never share it with anyone.
Running the Bot
Now you’re ready to start your NotiFansly instance:
# Linux/macOS
chmod +x ./discord-fansly-notify
./discord-fansly-notify
# Windows
# or double click the exe
.discord-fansly-notify.exe
Running as a Systemd Service
For reliable 24/7 operation on Linux systems using systemd, create a service file:
# Create a systemd service file
sudo nano /etc/systemd/system/notifansly.service
Add the following content to the file (replace paths and username with your own):
[Unit]
Description=Notifansly
After=network.target
[Service]
Type=simple
User=YOUR_USERNAME
Group=YOUR_GROUP
WorkingDirectory=/path/to/bot/directory
ExecStart=/path/to/bot/directory/discord-fansly-notify
Restart=always
RestartSec=1
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Enable and start the service:
# Reload systemd to recognize the new service
sudo systemctl daemon-reload
# Enable the service to start on boot
sudo systemctl enable notifansly.service
# Start the service
sudo systemctl start notifansly.service
# Check the status
sudo systemctl status notifansly.service
Alternatively, you can use PM2 as a process manager:
# Using PM2
npm install -g pm2
pm2 start ./discord-fansly-notify --name "notifansly"
pm2 save
pm2 startup
Once your bot is running, use the OAuth2 URL you generated earlier to add it to your Discord server.
Frequently Asked Questions
Why self-host instead of using the public bot?
Self-hosting gives you full control. Key benefits include:
- No Limits: Monitor an unlimited number of creators per server.
- Privacy & Control: Your Fansly token and bot data stay on your own hardware.
- Customization: Advanced users can modify the source code to change bot behavior.
How often does the bot check for new posts/streams?
By default, the bot checks every 2 minutes (120 seconds). You can change this with the MONITOR_INTERVAL_SECONDS
setting in your .env
file.
Will my Fansly login stay active?
The token may expire after some time. If the bot stops working, you might need to obtain a new token using the method described in the Configuration section.
Is this against Fansly’s terms of service?
The bot uses your own credentials and doesn’t distribute content, but automated access may not be explicitly allowed. Use at your own discretion.
How can I customize the notification messages?
For basic users, the notifications have a standard format. Advanced users can modify the source code from our GitHub repository to customize message formats exactly to their preferences.
Need Help?
If you encounter any issues or have questions, join our support server: https://discord.gg/WXr8Zd2Js7