-
Notifications
You must be signed in to change notification settings - Fork 8
How to self host
Don't want our public instance! Don't worry, the folks at ClaraDev would help you how to get through your crippling depression a instance of this bot up and running on your own PC or a Hoster.
You need a Discord Application so the bot can ineract on Discord, you can make a app interface on Discord here.
After that, you need to prepare your computer for selfhosting.
We would recommend :
- a really decent connection.
- at least a dual-core Processor. 1.5-2+ GHz should fit well. However for VPSes, a single core would suffice.
- at least 1GB RAM.
- 10GB of Free Disk space.
You would need the following for the bot to work properly:
-
imagemagick
-
Node v6.10.0 LTS or Above
-
build-essentialfor Linux / Visual Studio 2015/2017 or Higher with C++ Tools and Build Tools Installed for Windows (needed bynode-gyp) -
Python 2.7.11 or Python 3.4 (or both) for
node-gyp -
Git (Optional)
-
PM2 or NodeMon
-
RethinkDB
You can grab the dependencies on the following websites:
after getting what we need, we can now proceed getting the bot source
- Via Releases head over to the Clara Releases and pick your version. Usually you would pick the latest release but if you like living on the edge, the beta releases are there for you.
After getting the source via a ZIP or TAR, extract it to whatever you want it to be then cd through your folder, and run npm install:
cd yourfolder
npm i --saveAfter Node.js has finally finished, we need to grab a watchdog, a watchdog is a a task manager for your backend apps.
We would use PM2 for this instance.
npm i -g pm2Note: The -g argument installs a package globally. useful if your package has a CLI Interface.
- via Git
Git clone the repository on wherever you like it to be
git clone https://github.com/awau/Clarathen grab your dependencies as usual
npm i --saveAfter Node.js has finally finished, we need to grab a watchdog, a watchdog is a a task manager for your backend apps.
We would use PM2 for this instance.
npm i -g pm2Note: The -g argument installs a package globally. useful if your package has a CLI Interface.
Of course, the bot would error out because you don't have the configuration but have no fear, each copy of Clara includes a config.json.example file which includes all of the entries tat you need to make a bot run
(NOTE:Don't include the "comment_xy" fields).
{
"_comment_debug": "Boolean. True if Debug Stack is needed for Errors. False if simplified is only needed",
"debug": true,
"_comment_ibKey": "ibsearch key, used by ibsearch",
"ibKey": "",
"_comment_mainPrefix": "Main Prefix",
"mainPrefix": "?",
"_comment_osuApiKey": "API key for osu!Related Requests",
"osuApiKey": "",
"_comment_ownerID": "your own ID. Needed if you need exclusive access",
"ownerID": "",
"_comment_maxShards" : "sets the bots maximum shards(default 1)",
"maxShards": 1,
"_comment_ytSearchKey": "Key to use youtube search in music.",
"ytSearchKey": "",
"_comment_token": "your Bot token",
"token": ""
}Of course, you need to save it as JSON so grab your favorite text editor, and Save it as config.json (without the .example)
then put it inside your src folder (However, the config can be detected as long as it is inside the same folder the core files is in, no need to keep the original directory structure)
after that, we run the bot!
The non-PM2 way : node ./src/bot
The PM2 way : pm2 start -n appname ./src/pm2.json
yes, if you're hackerman and if you feel Windblows Windows is too moe for this app, you can use Linux to operate it.
Of course, depending on distro, you have all of the other dependencies installed, mostly Python and GCC but if you want to make sure, check if you have build-essential, if no, grab it using your favourite package manager. Do not also forget to install ffmpeg since you need it for music.
- Via Releases head over to the Clara Releases and pick your version. Usually you would pick the latest release but if you like living on the edge, the beta releases are there for you.
After getting the source via a ZIP or TAR, extract it to whatever you want it to be then cd through your folder, and run npm install:
cd yourfolder
npm i --saveAfter Node.js has finally finished, we need to grab a watchdog, a watchdog is a a task manager for your backend apps.
We would use PM2 for this instance.
npm i -g pm2Note: The -g argument installs a package globally. useful if your package has a CLI Interface.
Of course, the bot would error out because you don't have the configuration but have no fear, each copy of Clara includes a config.json.example file which includes all of the entries tat you need to make a bot run
(NOTE:Don't include the "comment_xy" fields).
{
"_comment_debug": "Boolean. True if Debug Stack is needed for Errors. False if simplified is only needed",
"debug": true,
"_comment_ibKey": "ibsearch key, used by ibsearch",
"ibKey": "",
"_comment_mainPrefix": "Main Prefix",
"mainPrefix": "?",
"_comment_osuApiKey": "API key for osu!Related Requests",
"osuApiKey": "",
"_comment_ownerID": "your own ID. Needed if you need exclusive access",
"ownerID": "",
"_comment_maxShards" : "sets the bots maximum shards(default 1)",
"maxShards": 1,
"_comment_ytSearchKey": "Key to use youtube search in music.",
"ytSearchKey": "",
"_comment_token": "your Bot token",
"token": ""
}Of course, you need to save it as JSON so grab your favorite text editor, and Save it as config.json (without the .example)
then put it inside your src folder (However, the config can be detected as long as it is inside the same folder the core files is in, no need to keep the original directory structure)
after that, we run the bot!
The non-PM2 way : node ./src/bot
The PM2 way : pm2 start -n appname ./src/pm2.json
- via Git
Git clone the repository on wherever you like it to be
git clone https://github.com/awau/Clarathen grab your dependencies as usual
npm i --saveAfter Node.js has finally finished, we need to grab a watchdog, a watchdog is a a task manager for your backend apps.
We would use PM2 for this instance.
npm i -g pm2Note: The -g argument installs a package globally. useful if your package has a CLI Interface.
Of course, the bot would error out because you don't have the configuration but have no fear, each copy of Clara includes a config.json.example file which includes all of the entries tat you need to make a bot run
(NOTE:Don't include the "comment_xy" fields).
{
"_comment_debug": "Boolean. True if Debug Stack is needed for Errors. False if simplified is only needed",
"debug": true,
"_comment_ibKey": "ibsearch key, used by ibsearch",
"ibKey": "",
"_comment_mainPrefix": "Main Prefix",
"mainPrefix": "?",
"_comment_osuApiKey": "API key for osu!Related Requests",
"osuApiKey": "",
"_comment_ownerID": "your own ID. Needed if you need exclusive access",
"ownerID": "",
"_comment_maxShards" : "sets the bots maximum shards(default 1)",
"maxShards": 1,
"_comment_ytSearchKey": "Key to use youtube search in music.",
"ytSearchKey": "",
"_comment_token": "your Bot token",
"token": ""
}Of course, you need to save it as JSON so grab your favorite text editor, and Save it as config.json (without the .example)
then put it inside your src folder (However, the config can be detected as long as it is inside the same folder the core files is in, no need to keep the original directory structure)
after that, we run the bot!
The non-PM2 way : node ./src/bot
The PM2 way : pm2 start -n appname ./src/pm2.json
Oh, if you feel your PC is too shit or your net would hit ratelimits by just using this, you can use a hoster
Typically, the most used hosters are DigitalOcean , Microsoft Azure or Scaleway. Most of them offer Windows or Linux Servers.
peppynote: if you picked DigitalOcean from the links below, you're in luck because the link includes a 10$ referral link, so basically you're supporting our hosting efforts and also you get free monies.
Support us by donating to Capuccino's Patreon