mirror of
https://github.com/spacebarchat/docs.git
synced 2024-11-25 11:42:58 +01:00
Merge pull request #24 from AToska21/patch-2
All around merging all existing PRs into one. (CREDIT GIVEN, IF YOU WOULD LIKE YOUR PR TO BE REMOVED FROM HERE LEAVE A COMMENT)
This commit is contained in:
commit
b419abdb81
52
docs/client/connect.md
Normal file
52
docs/client/connect.md
Normal file
@ -0,0 +1,52 @@
|
||||
# Client
|
||||
|
||||
## Use your discord client for your instance.
|
||||
|
||||
In order to set your **ENDPOINT** follow these simple steps
|
||||
|
||||
- Go to this folder (`%appdata%/yourdiscord_client | Example: %appdata%/discordptb`)
|
||||
|
||||
- There is a file called (`settings.json`) the contents of this file are (`They can be different depending on your discord's client settings`) :
|
||||
|
||||
|
||||
```js
|
||||
{
|
||||
"IS_MAXIMIZED": true,
|
||||
"IS_MINIMIZED": false,
|
||||
"WINDOW_BOUNDS": {
|
||||
"x": 335,
|
||||
"y": 86,
|
||||
"width": 940,
|
||||
"height": 600
|
||||
},
|
||||
"BACKGROUND_COLOR": "#202225"
|
||||
}
|
||||
```
|
||||
|
||||
- Add this line to ( `settings.json` )
|
||||
|
||||
```js
|
||||
"WEBAPP_ENDPOINT" : "https://your_fosscord_instace_url"
|
||||
```
|
||||
|
||||
- It should look like this after you add the line:
|
||||
|
||||
```js
|
||||
{
|
||||
"IS_MAXIMIZED": true,
|
||||
"IS_MINIMIZED": false,
|
||||
"WINDOW_BOUNDS": {
|
||||
"x": 335,
|
||||
"y": 86,
|
||||
"width": 940,
|
||||
"height": 600
|
||||
},
|
||||
"BACKGROUND_COLOR": "#202225",
|
||||
"WEBAPP_ENDPOINT" : "https://your_fosscord_instace_url"
|
||||
}
|
||||
```
|
||||
|
||||
- After this close your discord client and reopen it and you are all done!
|
||||
|
||||
// Made by ImAaronFR
|
||||
// Added to PR and specific folder by AToska21
|
@ -43,7 +43,7 @@ In order to have your questions resolved more quickly and efficiently, see also:
|
||||
- If you are a moderator or otherwise have permissions above those of normal users: abusing your permissions for personal motives not compatible with this code of conduct.
|
||||
- Continued harassment of other users.
|
||||
- Posting explicit imagery (sexual content, displays of violence, etc.) or unwanted sexual or romantic advances towards other users.
|
||||
- Posting content that is illegal to publish or illegal to distribute without permission in Germany. The reason is that in certain cases, especially when it comes to copyright, the service provider (who might be me), may be held liable, and I do not wish to get into legal trouble.
|
||||
- Posting content that is illegal to publish or illegal to distribute without permission in Germany. The reason is that in certain cases, especially when it comes to copyright, the service provider (who might be us, the fosscord founders), may be held liable, and we do not wish to get into legal trouble.
|
||||
- Abusing loopholes in this code of conduct, for example doing something that is not explicitly covered by the prohibited behavior, yet is in conflict with the general idea of desirable behavior.
|
||||
|
||||
### Consequences of violation
|
||||
@ -53,10 +53,11 @@ In order to have your questions resolved more quickly and efficiently, see also:
|
||||
- Any kind of violation can lead to removal of the offending content.
|
||||
- Kicks and bans apply to all communities administrated by Fosscord maintainers group.
|
||||
|
||||
If a moderator violates the code of conduct, make sure to point it out to me. This can lead to warnings and demotion of the moderator.
|
||||
If a moderator violates the code of conduct, make sure to point it out to us. This can lead to warnings and demotion of the moderator.
|
||||
|
||||
If I myself violate the code of conduct, no such possibility exists. Thus, it is important to call me out, or make one of my friends or moderators call me out. Further steps will then be discussed ad hoc.
|
||||
If we violate the code of conduct, no such possibility exists. Thus, it is important to call us out, or make one of our friends call us out. Further steps will then be discussed ad hoc.
|
||||
|
||||
### Changes to this code of conduct
|
||||
|
||||
This code of conduct may be changed in order to enhance clarity and precision at any time, typically without notification.
|
||||
// edited by Xenorio and AToska21
|
||||
|
@ -11,7 +11,7 @@ A reverse proxy is the most efficient way to setup HTTPS on your instance.
|
||||
|
||||
To do this, you need a basic understanding of setting up a web server.
|
||||
|
||||
### Without HTTPS (you can remove the "location = api/register" part of the website, it's there to stop people from raiding your instance)
|
||||
### Without HTTPS
|
||||
|
||||
```
|
||||
limit_req_zone $binary_remote_addr zone=registerzone:10m rate=1r/m;
|
||||
|
41
docs/setup/MARIADB.md
Normal file
41
docs/setup/MARIADB.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Using MariaDB/MySQL
|
||||
|
||||
## Setup
|
||||
|
||||
### Explaination
|
||||
|
||||
A database server is a kind of server that hosts so called databases with "tables" in them. MariaDB is a way of hosting
|
||||
them. It is much more efficient than SQLite, because it isn't just a file which can be easily hacked and amplified.
|
||||
|
||||
To do this, you need a basix understanding of linux and SQL.
|
||||
|
||||
### Setting up MariaDB/MySQL
|
||||
|
||||
This section presumes you know how to login into MariaDB. If you don't, search it up.
|
||||
|
||||
Go into MariaDB and type these:
|
||||
```
|
||||
CREATE DATABASE fosscord;
|
||||
CREATE USER 'fosscord'@'localhost' IDENTIFIED BY 'password1';
|
||||
GRANT ALL PRIVILEGES ON fosscord.* TO 'fosscord'@'localhost' IDENTIFIED BY 'password1' WITH GRANT OPTION;
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
After that, go to your fosscord directory, and open (if it's not created, create it) a file named ".env" WITH THE DOT.
|
||||
The file should contain this:
|
||||
```
|
||||
THREADS=1
|
||||
DATABASE=mariadb://[youruser]:[yourpassword]@localhost/[yourdatabase]
|
||||
```
|
||||
|
||||
So for us that would be:
|
||||
```
|
||||
THREADS=1
|
||||
DATABASE=mariadb://fosscord:password1@localhost/fosscord
|
||||
```
|
||||
If you set it up correctly, you should be able to run ``systemctl start fosscord`` or ``npm run start:bundle`` if you didn't setup systemd
|
||||
(which you should do, checkout the "Setup" section) and, your fosscord works! It may say "TABLE NOT SETUP" or something. Ignore these, because
|
||||
they are just there because the database is uninitialized.
|
||||
|
||||
If you get an error that says ``DriverPackageNotInstalledError: Mysql package has not been found installed.``, run ``npm install mysql --save``.
|
||||
|
||||
// by AToska21
|
64
docs/setup/POSTGRESQL.md
Normal file
64
docs/setup/POSTGRESQL.md
Normal file
@ -0,0 +1,64 @@
|
||||
## PostgreSQL Setup with terminal
|
||||
|
||||
1. Lets setup our database. We will be using postgresql for this setup.
|
||||
```
|
||||
su postgres -c psql
|
||||
```
|
||||
|
||||
2. Now that postgresql is installed lets setup a new user and a database:
|
||||
```
|
||||
CREATE USER fosscord WITH CREATEDB PASSWORD 'your.password';
|
||||
create database fosscord with owner fosscord;
|
||||
```
|
||||
Note: Change the 'your.password' with the password you would like to keep for your database. You will need this password for accessing your DB.
|
||||
|
||||
3. We will now create a env file to configure fosscord server to use the custom DB instead of the default one.
|
||||
```
|
||||
nano .env
|
||||
```
|
||||
4. Paste the following in the env file that was just created:
|
||||
```
|
||||
DATABASE=postgres://fosscord:Beastcord@localhost/fosscord
|
||||
THREADS=1
|
||||
```
|
||||
After pasting the above lines do ctrl + x followed by Y then press the Enter key on your keyboard to save the file. (Windows)
|
||||
|
||||
If the output is working fine then you are good to go. If not you have done some mistakes go up and look what mistake you have done and fix it to proceed.
|
||||
|
||||
## How to setup Captcha in your instance?
|
||||
|
||||
To setup captcha for your server you will have to open your database. To view your DB we suggest you use [DBeaver](https://dbeaver.io/download/).
|
||||
Follow these steps to reach your config file
|
||||
|
||||
1. Connect DBeaver to your database. After connecting you will see something like this ![image](https://user-images.githubusercontent.com/84021897/148377042-1884dd4e-a0f4-4c3f-aaa3-c144b6737244.png)
|
||||
|
||||
2. Open the database folder by clicking the small arrow located to the left side of the folder name, then proceed to schemas followed by public then tables.
|
||||
3. You will now see a list of tables. Among them is a table named config. Open that and you will see ![image](https://user-images.githubusercontent.com/84021897/148377619-8e3d16da-87f1-4991-b0b7-d6fb8badf6e1.png)
|
||||
|
||||
Make sure to click the data folder to edit the config.
|
||||
4. You will now have to edit the following rows in the database
|
||||
|
||||
| **Service Name** | **Value** | **Description** |
|
||||
|--------------------------|---------------------------|-------------------------------------------------------|
|
||||
| register_requireCaptcha | true | Enables captcha when you register |
|
||||
| security_captcha_enabled | true | Enables Captcha if set to true |
|
||||
| security_captcha_sitekey | "sitekey" | The site key which can be accessed from the site only |
|
||||
| security_captcha_service | "hcaptcha" or "reacptcha" | If you are using hcaptcha put "hcaptcha" |
|
||||
| security_captcha_secret | "secret" | Will be provided by the service you register to |
|
||||
| login_requireCaptcha | true | Enables Captcha when you login |
|
||||
|
||||
5. Save the file and restart your server.
|
||||
|
||||
## How to setup CDN to enable uploading attachments
|
||||
|
||||
1. Open your DB
|
||||
2. Go to your config
|
||||
3. Edit the rows as follows:
|
||||
|
||||
| **Service Name** | **Value** | **Example for servers with SSL** | **Example for servers without SSL** |
|
||||
|------------------------|------------------------------|----------------------------------|-------------------------------------|
|
||||
| cdn_endpointPublic | "http(s)://your.domain.name" | "https://your.domain.name" | "http://your.domain.name" |
|
||||
| gateway_endpointPublic | "ws(s)://your.domain.name" | "wss://your.domain.name" | "ws://your.domain.name" |
|
||||
|
||||
// made by GamerZ14
|
||||
// adapted by AToska21
|
137
docs/setup/SQLITE.md
Normal file
137
docs/setup/SQLITE.md
Normal file
@ -0,0 +1,137 @@
|
||||
# 1. How to use SQLite database
|
||||
database.db is a file that makes your fosscord instance customizable. Fosscord curently uses SQLite Database to store it's data, you can allways change it.
|
||||
|
||||
I will be found in `#/bundle/database.db` where `# is the dir name example fosscord-server`
|
||||
For example this path for git cloned fosscord-server will be `fosscord-server/bundle/database.db`
|
||||
|
||||
# Basic stuff that will be included in this Documentation page
|
||||
| Number | Description |
|
||||
|---|---|
|
||||
| 1. | What is database.db/it's path |
|
||||
| 2. | What will we be discussing today? |
|
||||
| 3. | The number of tables you can edit |
|
||||
| 4. | Description of each editable table's |
|
||||
| 5. | What each sub tables do? |
|
||||
| 6. | Other Fun Tricks with database.db (Coming Soon) |
|
||||
|
||||
# 2. What will be discussing today?
|
||||
We will be discussing how to edit `database.db` file which is a database used for your fosscord client/server, it's used to save people's data and also allows you to edit your instance in many ways!, you can edit your info, edit passwords, emails, usernames you can give badges... etc, we will be discussing to how to edit them and do it correctly so you don't get too many errors..., let's get a explanation on the tables.
|
||||
|
||||
# 3. The number of tables you can edit
|
||||
|
||||
Number of total tables you can edit (this does not include the sub tables, sub tables are tables inside tables): `35-34`
|
||||
|
||||
**Names of the tables you can edit**
|
||||
<details>
|
||||
<summary>Names of the table you can edit (it's really big)</summary>
|
||||
<br>
|
||||
1. applications<br/>
|
||||
2. attachments<br/>
|
||||
3. audit_logs<br/>
|
||||
4. bans<br/>
|
||||
5. channels<br/>
|
||||
6. config<br/>
|
||||
7. connected_accounts<br/>
|
||||
8. emojis<br/>
|
||||
9. guilds<br/>
|
||||
10. invites<br/>
|
||||
11. member_roles<br/>
|
||||
12. members<br/>
|
||||
13. message_channel_mentions<br/>
|
||||
14. message_role_mentions<br/>
|
||||
15. message_stickers<br/>
|
||||
16. message_user_mentions<br/>
|
||||
17. messages<br/>
|
||||
18. migrations<br/>
|
||||
19. query-result-cache<br/>
|
||||
20. rate_limits<br/>
|
||||
21. read_states<br/>
|
||||
22. recipients<br/>
|
||||
23. relationship<br/>
|
||||
24. roles<br/>
|
||||
25. sessions<br/>
|
||||
26. sqlite_sequence<br/>
|
||||
27. sticker_packs<br/>
|
||||
28. stickers<br/>
|
||||
29. team_members<br/>
|
||||
30. teams<br/>
|
||||
31. templates<br/>
|
||||
32. users<br/>
|
||||
33. voice_states<br/>
|
||||
34. webhooks<br/>
|
||||
</summary>
|
||||
</details>
|
||||
|
||||
# 4. What does each table do?
|
||||
`applications`: Bot Applications, TOS applications, RPC applications ETC
|
||||
|
||||
`attachments`: attachments are photos and videos you send on your fosscord instance
|
||||
|
||||
`audit_logs`: this are logs where the logs of bans, deleting channels, creating channels, making roles,updating roles.. ETC
|
||||
|
||||
`bans`: bans are the users that are banned from a server.
|
||||
|
||||
`channel`: channel's created on your fosscord instance
|
||||
|
||||
`config`: config table is the most important table of all the DB, that's where the real **magic** happens, it has all the things to update instance name, instance description, config's,URL's ETC
|
||||
|
||||
`connected_accounts`: this us the list of the accounts that are online on your instances
|
||||
|
||||
`emojis`: this are emojis that are stored on your instance
|
||||
|
||||
`guilds`: this are guilds that are made/on your instances
|
||||
|
||||
`invites`: this are invites created on your instance
|
||||
|
||||
`member_roles`: the roles that are made on your fosscord instance
|
||||
|
||||
`members`: list's members that are in your instance but it also has server is which the members are in
|
||||
|
||||
`message_role_mentions`: roles mentioned in a message
|
||||
|
||||
`message_channel_mentions`: channels mentioned in a message
|
||||
|
||||
`message_stickers`: stickers that are sent or made
|
||||
|
||||
`message_user_mentions`: user mention that is sent using a message `example: @OmxproYT#7508`
|
||||
|
||||
`messages`: messages sent on your fosscord instance
|
||||
|
||||
`migrations`: migrations that happened on your instance
|
||||
|
||||
`query-result-cache`: result cache of query, it makes searching faster
|
||||
|
||||
`rate_limits`: rate limits that are placed on a account
|
||||
|
||||
`read_states`: read states of messages (I think not sure)
|
||||
|
||||
`recipients`: recipients of your instances
|
||||
|
||||
`relationships`: (really don't know what this means I really don't know if this is even important)
|
||||
|
||||
`roles`: roles made on your instances
|
||||
|
||||
`sessions`: sessions that are online OR sessions that are made on your instance
|
||||
|
||||
`sqlite_sequenses`: sequences on sqlite DB
|
||||
|
||||
`sticker_packs`: sticker packs made on your fosscord instances (you can make more)
|
||||
|
||||
`stickers`: stickers that are on your instance
|
||||
|
||||
`team_members`: team members of teams
|
||||
|
||||
`teams`: team's made on your instance
|
||||
|
||||
`templates`: server templates made on your instance
|
||||
|
||||
`users`: user accounts made on your fosscord instances
|
||||
|
||||
`voice_states`: states of Voice Chat
|
||||
|
||||
`webhooks`: webhooks made on your fosscord instances
|
||||
|
||||
You can edit this with a program called DBeaver.
|
||||
|
||||
// made my omxpro
|
||||
// adapted by AToska21
|
41
docs/setup/SYSTEMD.md
Normal file
41
docs/setup/SYSTEMD.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Using systemd
|
||||
|
||||
## Setup
|
||||
|
||||
### Explaination
|
||||
|
||||
A systemd service, otherwise known as a daemon, is when you use the incuded systemd/systemctl package with your distro
|
||||
to make the computer run your program on it's own, without you having to use screen or anything else.
|
||||
|
||||
To do this, you need a medium understanding of linux.
|
||||
|
||||
### Using systemd (Debian based distros, Arch Linux etc.)
|
||||
Whatever you call it.
|
||||
|
||||
!!! failure "THIS IS JUST AN EXAMPLE"
|
||||
Only use this config as a base. DO NOT USE ROOT.
|
||||
|
||||
The directory this file should go in is ``/etc/systemd/system/fosscord.service`` or whatever your system uses.
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=<your description here>
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
WorkingDirectory=<fosscord directory>
|
||||
ExecStart=npm run start:bundle
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
If you set it up correctly, you should be able to run ``systemctl enable --now fosscord`` and, your fosscord works! (and will start everytime your system boots!)
|
||||
|
||||
### Distros without "systemd"
|
||||
|
||||
!!! failure "Not supported"
|
||||
I haven't had any experience with Gentoo or any other distros. Sorry guys. There are ways in other linux distros to install systemctl/systemd. I would highly reccomend it.
|
||||
If there is enough demand, I will figure out how sysvinit works.
|
||||
|
||||
// by AToska21
|
@ -6,4 +6,12 @@
|
||||
|
||||
## [Hosting](hosting/)
|
||||
|
||||
## [Reverse Proxy/HTTPS (NGINX)](HTTPS/)
|
||||
## [Reverse Proxy/HTTPS (NGINX)](HTTPS/)
|
||||
|
||||
## Database Setups
|
||||
|
||||
## [MariaDB](MARIADB/)
|
||||
|
||||
## [SQLite](SQLITE/)
|
||||
|
||||
## [PostgreSQL](POSTGRESQL/)
|
||||
|
Loading…
Reference in New Issue
Block a user