diff --git a/docs/bot/.gitbook/assets/DockerDownloadPageMarkedUp.png b/docs/bot/.gitbook/assets/DockerDownloadPageMarkedUp.png
new file mode 100644
index 0000000..4929f7e
Binary files /dev/null and b/docs/bot/.gitbook/assets/DockerDownloadPageMarkedUp.png differ
diff --git a/docs/bot/.gitbook/assets/DockerDownloadPageWindows.png b/docs/bot/.gitbook/assets/DockerDownloadPageWindows.png
new file mode 100644
index 0000000..b2fd66a
Binary files /dev/null and b/docs/bot/.gitbook/assets/DockerDownloadPageWindows.png differ
diff --git a/docs/bot/.gitbook/assets/GitWindowsDownloadPage.png b/docs/bot/.gitbook/assets/GitWindowsDownloadPage.png
new file mode 100644
index 0000000..9d344dc
Binary files /dev/null and b/docs/bot/.gitbook/assets/GitWindowsDownloadPage.png differ
diff --git a/docs/bot/.gitbook/assets/GitWindowsDownloadPageMarkedUp.png b/docs/bot/.gitbook/assets/GitWindowsDownloadPageMarkedUp.png
new file mode 100644
index 0000000..9f6af90
Binary files /dev/null and b/docs/bot/.gitbook/assets/GitWindowsDownloadPageMarkedUp.png differ
diff --git a/docs/bot/SUMMARY.md b/docs/bot/SUMMARY.md
index 4dd66db..4d78b18 100644
--- a/docs/bot/SUMMARY.md
+++ b/docs/bot/SUMMARY.md
@@ -7,10 +7,11 @@
* [Quickstart](getting-started/quickstart/README.md)
* [Self-Hosting](getting-started/quickstart/self-hosting.md)
* [Using a Cloud Provider](getting-started/quickstart/using-a-cloud-provider.md)
-* [Basic Configuration](getting-started/publish-your-docs.md)
+* [Basic Configuration](getting-started/basic-configuration.md)
## Basics
+* [Updating the Bot](basics/updating-the-bot.md)
* [Configuration Options](basics/configuration-options.md)
## Developers
diff --git a/docs/bot/basics/updating-the-bot.md b/docs/bot/basics/updating-the-bot.md
new file mode 100644
index 0000000..e5db6f5
--- /dev/null
+++ b/docs/bot/basics/updating-the-bot.md
@@ -0,0 +1,6 @@
+---
+icon: pen-to-square
+---
+
+# Updating the Bot
+
diff --git a/docs/bot/getting-started/publish-your-docs.md b/docs/bot/getting-started/basic-configuration.md
similarity index 100%
rename from docs/bot/getting-started/publish-your-docs.md
rename to docs/bot/getting-started/basic-configuration.md
diff --git a/docs/bot/getting-started/quickstart/README.md b/docs/bot/getting-started/quickstart/README.md
index 18fda89..7a07812 100644
--- a/docs/bot/getting-started/quickstart/README.md
+++ b/docs/bot/getting-started/quickstart/README.md
@@ -7,7 +7,7 @@ icon: bullseye-arrow
## Requirements
-* **A Database & Cache**: Use **Valkey** or **Redis** for caching. The main database must be **PostgreSQL**.
+* **A Database & Cache**: Use **Valkey** or **Redis** for caching (we use Valkey in this guide). The main database must be **PostgreSQL**.
* **Server**: A server or computer to host the bot, preferably running Linux.
* **Skills**: Basic knowledge of the command line and managing servers.
* **Permissions**: The **Manage Server** permission in the Discord server where you want to add the bot.
diff --git a/docs/bot/getting-started/quickstart/self-hosting.md b/docs/bot/getting-started/quickstart/self-hosting.md
index fbec60f..c487fa4 100644
--- a/docs/bot/getting-started/quickstart/self-hosting.md
+++ b/docs/bot/getting-started/quickstart/self-hosting.md
@@ -1,6 +1,655 @@
---
+description: Host the bot and its services yourself on a machine you own
icon: server
---
# Self-Hosting
+## Step 2: Prepare your server
+
+To set up the bot and its services, we first need to prepare our server. The steps may vary slightly depending on your server's operating system. Choose the instructions that match your OS. This guide assumes you have basic command line and server-managing skills.
+
+ Git Download Page Git Download Page Docker Download Page for Windows Docker Download Page for WindowsMacOS/Linux Instructions
+
+## For Debian based Linux distributions using the x86-64 architecture
+
+First, let's update our package lists and upgrade our existing packages.
+
+{% code fullWidth="false" %}
+```bash
+# Update package lists:
+sudo apt-get update
+
+# Upgrade existing packages:
+sudo apt-get upgrade -y
+```
+{% endcode %}
+
+Next, let's install Node.js and the Yarn package manager (this is mostly copied and pasted from [https://nodejs.org/en/download](https://nodejs.org/en/download)).
+
+```bash
+# Download and install fnm:
+curl -o- https://fnm.vercel.app/install | bash
+
+# Activate fnm in our current shell:
+source ~/.bashrc
+
+# Download and install Node.js:
+fnm install 22
+
+# Verify the Node.js version:
+node -v # Should print "v22.14.0".
+
+# Download and install Yarn:
+corepack enable yarn
+
+# Verify Yarn version:
+yarn -v
+```
+
+Now, let's install git. This will make it so that we can clone the GitHub repository to our local machine (taken from [https://git-scm.com/downloads/linux](https://git-scm.com/downloads/linux)).
+
+```bash
+# Install git using built-in package manager:
+sudo apt-get install git
+
+# Verify git version:
+git --version
+```
+
+Let's also install OpenSSL as we'll need it to generate SSL certificates for our PostgreSQL and caching databases:
+
+```bash
+# Install OpenSSL:
+sudo apt install openssl
+
+# Verify OpenSSL version:
+openssl version
+```
+
+Next, let's install the pm2 process manager. This is how we'll run the Discord bot in a production environment (instructions from [https://pm2.keymetrics.io/docs/usage/quick-start/](https://pm2.keymetrics.io/docs/usage/quick-start/)).
+
+```bash
+# Install pm2 using npm
+npm install pm2@latest -g
+
+# or install pm2 using yarn:
+yarn global add pm2
+
+# Verify pm2 version:
+pm2 -v
+```
+
+Finally, let's install Docker and Docker Compose. These tools enable us to efficiently manage our PostgreSQL and caching databases with added flexibility, reducing complex configurations and simplifying overall management. Instructions are taken from here: [https://docs.docker.com/engine/install/debian/](https://docs.docker.com/engine/install/debian/) (if you're using Ubuntu, you can go straight to here: [https://docs.docker.com/engine/install/ubuntu/](https://docs.docker.com/engine/install/ubuntu/)) and here: [https://docs.docker.com/engine/install/linux-postinstall/](https://docs.docker.com/engine/install/linux-postinstall/).
+
+```bash
+# Uninstall conflicting packages:
+for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
+
+# Clean up unused packages:
+sudo apt autoremove
+
+# Add Docker's official GPG key:
+sudo apt-get update
+sudo apt-get install ca-certificates curl
+sudo install -m 0755 -d /etc/apt/keyrings
+sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
+sudo chmod a+r /etc/apt/keyrings/docker.asc
+
+# Add the repository to Apt sources (if you get errors on this step, check the official Docker documentation):
+echo \
+ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
+ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
+ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+sudo apt-get update
+
+# Install the latest version of Docker and its tools:
+sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
+
+# Start Docker (if it's not already running):
+sudo systemctl start docker
+
+# Configure Docker to start on boot:
+sudo systemctl enable docker.service
+sudo systemctl enable containerd.service
+
+# Make it so we don't have to use sudo to use Docker:
+sudo groupadd docker
+sudo usermod -aG docker $USER
+# Either log out and log back into your user account or run this command:
+newgrp docker
+
+# If you get this error:
+# WARNING: Error loading config file: /home/user/.docker/config.json -
+# stat /home/user/.docker/config.json: permission denied
+# Run these commands:
+sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
+sudo chmod g+rwx "$HOME/.docker" -R
+
+# Verify Docker version:
+docker version
+
+# Verify Docker Compose Version:
+docker compose version
+
+# Run an example Docker container to ensure it's working (this should print a whole bunch of information):
+docker run hello-world
+```
+
+With all necessary tools installed and configured, we're ready to run the bot and its services.
+
+Windows Instructions
+
+First, let's install Node.js and the Yarn package manager on our machine. Open PowerShell and type in the following commands (instructions taken from [https://nodejs.org/en/download](https://nodejs.org/en/download)):
+
+```powershell
+# Download and install fnm (you might have to restart your terminal to use fnm):
+winget install Schniz.fnm
+
+# Download and install Node.js:
+fnm install 22
+
+# Verify the Node.js version:
+node -v # Should print "v22.14.0".
+
+# Download and install Yarn:
+corepack enable yarn
+
+# Verify Yarn version:
+yarn -v
+```
+
+Next, let's install git. This will enable us to clone the GitHub repository to our local machine.
+
+Open a web browser and head to [https://git-scm.com/downloads/win](https://git-scm.com/downloads/win). You should see a page like this:
+
+
# Stop the containers WITHOUT deleting and removing them:
+docker compose stop
+
+# Stop the containers and DELETE/REMOVE THEM. Note your DATA WILL BE SAFE. This just deletes the actual Docker containers:
+docker compose down
+
+
+Lastly, to restart the containers and view their logs, you can run the following commands:
+
+```bash
+# Restart the Docker containers:
+docker compose restart
+
+# View Docker container logs:
+docker compose logs
+```
+
+Once all the bot's resources are operational, let's complete the configuration and start it up.
+{% endstep %}
+{% endstepper %}
+
+## Step 5: Finish bot configuration
+
+Now that we have the bot's resources up and running, let's finish configuring it. Open the `config.json` file again and scroll to the section that look like this:
+
+"database": {
+ "dbConnectionString": "POSTGRESQL_CONNECTION_STRING",
+ "maxRetryAttempts": "MAX_RETRY_ATTEMPTS",
+ "retryDelay": "RETRY_DELAY_IN_MS"
+},
+
+
+You can use the following template to obtain the PostgreSQL connection string: `postgresql://username:password@localhost/database`.
+
+Since the bot and the Postgres instance run on the same server, the format should be: `postgresql://username:password@localhost/database`.
+
+Fill out the format as follows:
+
+1. Replace `username` with the value from the `POSTGRES_USER` environment variable.
+2. Replace `password` with the value from the `POSTGRES_PASSWORD` environment variable.
+3. Replace `database` with the value from the `POSTGRES_DB` environment variable.
+
+Once updated, it should look like this example: `postgresql://bot-user:password@localhost/bot-db`. Replace `POSTGRESQL_CONNECTION_STRING` with this value.
+
+Lastly, replace `MAX_RETRY_ATTEMPTS` with the desired maximum number of connection attempts. Then, change `RETRY_DELAY_IN_MS` to specify the wait time in milliseconds between retries. You should now have something that look like this:
+
+```json
+"database": {
+ "dbConnectionString": "postgresql://bot-user:password@localhost/bot-db",
+ "maxRetryAttempts": "5",
+ "retryDelay": "2000"
+},
+```
+
+Next, scroll down to the section that looks like this:
+
+```json
+"redis": {
+ "redisConnectionString": "REDIS_CONNECTION_STRING",
+ "retryAttempts": "RETRY_ATTEMPTS",
+ "initialRetryDelay": "INITIAL_RETRY_DELAY_IN_MS"
+},
+```
+
+You can use the following template to obtain the Redis (in our case, Valkey since they're compatible with each other) connection string: `redis://username:password@host:port`.
+
+In our case, this is the format we'll be using: `redis://default:password@localhost:6379`. All you have to do is replace `password` with the value you set for the `VALKEY_PASSWORD` environment variable. Replace `REDIS_CONNECTION_STRING` with this value.
+
+Lastly, replace `RETRY_ATTEMPTS` with the desired maximum number of connection attempts. Then, change `INITIAL_RETRY_DELAY_IN_MS` to specify the wait time in milliseconds between retries. You should now have something that look like this:
+
+```json
+"redis": {
+ "redisConnectionString": "redis://default:password@localhost:6379",
+ "retryAttempts": "3",
+ "initialRetryDelay": "3000"
+},
+```
+
+Now, let's proceed to set up the tables in our database and start the bot.
+
+## Step 6: Set up database tables
+
+To set up the database tables, all you have to do is run the following commands:
+
+```bash
+# Generate SQL migration file:
+npx drizzle-kit generate
+
+# Apply SQL migration to database:
+npx drizzle-kit migrate
+```
+
+Now, we can finally start the bot.
+
+## Step 7: Start the bot
+
+To start the bot, simply run the following:
+
+```bash
+# Start the bot in production mode:
+yarn start:prod
+```
+
+To view the bot's logs, type in this command:
+
+```bash
+# To view bot logs:
+pm2 logs
+```
+
+To stop the bot, run this command:
+
+```bash
+# To stop the bot:
+pm2 stop poixpixel-discord-bot
+```
+
+Finally, go to your Discord server and test out the bot's commands to make sure that it's working. Once you have verified that it is working, you can move onto reading about some of the bot's basic configuration options linked below.
+
+{% content-ref url="../basic-configuration.md" %}
+[basic-configuration.md](../basic-configuration.md)
+{% endcontent-ref %}