Pterodactyl (generic egg)¶
Warning
If you are going to host Discord Tickets with a third-party hosting provider rather than on your own server:
- You are more likely to encounter rate limits due to sharing an IP address with other Discord bots.
- If the hosting provider does not offer a reverse proxy service, you won't be able to use a domain name with SSL/TLS, which is strongly recommended.
Discord Tickets can be run with Pterodactyl using a generic Node.js egg.
Note that although the bot may use under 100-150MB of RAM (depending on the server size etc), NPM may crash when installing dependencies if less than 500MB is allocated.
Installation¶
Start by creating a new Node.js v18 server.
- Set the git repository to
https://github.com/discord-tickets/bot
- Set the branch to the latest tag, e.g.
v4.0.0
. You can find the latest tag at the top right corner of this page or here. - Enable auto-updating so the startup script will download the code for you
- Change the file to
src/index.js
After starting the server for the first time, should see something like this. Don't worry about the environment variable error yet.
Environment variables¶
Go to the Files tab and open the .env
file (start the server if it doesn't exist).
Creating the Discord application¶
Database¶
If your host doesn't offer a MySQL/MariaDB database, set DB_PROVIDER
to sqlite
.
Otherwise, go to the Databases tab, create a new database, and copy the connection string.
If it starts with jdbc:
, remove it.
Example | |
---|---|
1 2 |
|
Web server¶
Find your server's port under "Address" on the Console page.
Example | |
---|---|
1 2 3 |
|
Or, if you are using a reverse proxy:
Example | |
---|---|
1 2 3 |
|
Other environment variables¶
The only other required non-default environment variables are DB_PROVIDER
,
and DB_CONNECTION_URL
if you are not using SQLite as your database.
Tip
You can middle-click on links to open them in a new tab so you can easily come back to the documentation!
Refer to the configuration documentation for more information about the available environment variables, and return to this page when you have finished.
Publishing the commands¶
Start the server and wait until you see "Connected to Discord" in green.
Then type commands publish
into the bot's console to publish the commands to Discord.
Reverse proxy¶
If you have a domain name, you should set up a reverse proxy with SSL/TLS
and set the HTTP_TRUST_PROXY
environment variable to true
.
Next steps¶
If your bot is running, congratulations, you have successfully installed Discord Tickets, and now it's time to set it up in your Discord server.
Join the community on Discord and get notified when updates (with new features and fixes) are released.
Refer to the configuration guide for a step-by-step guide on how to add and configure the bot in your server.
Having trouble?
If you haven't got the bot running yet and need help, you can ask for help on Discord or on GitHub.