October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Host Red-DiscordBot With Docker Compose

A practical Docker Compose guide for Red-DiscordBot: choose a compatible community image, configure TOKEN and PREFIX, persist /data, invite the bot, survive reboots, troubleshoot logs, and assess Raspberry Pi support.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The practical way to run Red-DiscordBot with Docker Compose is to use a community image, pass the bot token and command prefix as environment variables, and mount Red’s data directory on the host. The container can then be recreated without losing configuration, while restart: unless-stopped brings it back after routine host or Docker restarts.

This is a community deployment rather than an officially supported Red installation. Red’s hosting documentation currently warns that “Docker support found in GitHub is also a work in progress and not ready for daily use.” Treat the image, tag, architecture, and update procedure as part of your deployment—not as interchangeable Docker details.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before creating the Compose project

Prepare these items before writing compose.yaml:

  • A host running Docker Engine and the Docker Compose plugin.
  • A Discord application with a bot user and its private token.
  • A directory where Red’s persistent data will live.
  • An image whose documented architecture matches the host.
  • A plan for backups and for updating the selected image.

Docker Compose defines and runs an application stack from a YAML file. In this case the stack is intentionally small: one Red-DiscordBot service, one persistent data mount, and a handful of environment variables.

Do not treat every Red image as equivalent. The PhasecoreX image documents x86-64 and ARM64 support, including Raspberry Pi devices. The rHomelab instructions document a similar Compose workflow but also state that their deployment method is unsupported by Red developers. Red’s own hosting guidance says unsupported platforms may not receive support when problems occur.

Choose and record the image before you deploy

Pick one maintained image and read its current README before creating the service. Record the full image name and the tag you actually deploy. The representative PhasecoreX configuration below uses phasecorex/red-discordbot without an explicit tag; Docker will therefore use that image’s default tag. Pinning a documented tag or digest can make later troubleshooting more reproducible, but the valid tag must come from the image’s own documentation.

Decision point PhasecoreX image rHomelab image instructions
Architecture statement README says it runs on most servers, including normal x86-64 servers and ARM64 devices such as Raspberry Pi. Check the image’s current documentation for the architecture of your host; the supplied instructions do not establish a broader compatibility promise.
Persistent-data location in the representative setup Container path is /data, mounted from a host directory. Use the path declared by the image’s current Compose example; do not assume it is identical without checking.
Environment contract TOKEN supplies the Discord bot token and PREFIX supplies the command prefix. Follow that image’s documented variable names and defaults.
Update behavior README documents Red updating on restart and mentions an optional UpdateNotify cog. Re-read the README before changing tags or restart procedures; the deployment method is described as unsupported by Red developers.
Support status Community image; Red’s official Docker warning still applies. Community image; the rHomelab documentation explicitly warns that its method is unsupported by Red developers.

The table is a deployment decision aid, not an endorsement. If you switch images later, re-check the data path, variables, user permissions, architecture, and update process before reusing the same directory.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a minimal project directory

Choose a directory that will remain on the host even if the container is deleted. For example, create a project directory and a subdirectory for Red’s data:

mkdir -p redbot/redbot
cd redbot

The first directory is the Compose project. The second becomes the host-side bind mount. You can choose another location, but keep the path easy to back up and restrict access because it will contain bot configuration and possibly credentials or cog data.

Write compose.yaml

Create compose.yaml with the following representative PhasecoreX configuration:

services:
  redbot:
    container_name: redbot
    image: phasecorex/red-discordbot
    restart: unless-stopped
    volumes:
      - ./redbot:/data
    environment:
      - TOKEN=replace_with_your_discord_bot_token
      - PREFIX=.
      - TZ=UTC
      - PUID=1000

Each line has a specific operational purpose:

  • services.redbot: Names the Compose service. Use this name with Compose commands such as docker compose logs redbot.
  • container_name: redbot: Gives the container a predictable name for ordinary Docker commands.
  • image: Selects the community image. Add a documented tag if you need a fixed release reference.
  • restart: unless-stopped: Asks Docker to restart the service after routine daemon or host restarts, unless you deliberately stopped it.
  • ./redbot:/data: Maps the host directory into the container’s data directory. This is the line that protects configuration from container replacement.
  • TOKEN: Supplies the token generated for the Discord bot user.
  • PREFIX: Sets the command prefix. The example uses a period, so commands begin with ..
  • TZ=UTC: Sets the container timezone to UTC in the documented example.
  • PUID=1000: Passes the user ID value shown by the image’s example. Change it only according to that image’s permission guidance and the ownership of the mounted directory.

YAML indentation is significant. Keep the two spaces shown under each mapping, and quote values if your chosen token or prefix contains YAML-significant characters. Never commit a file containing a real token to a public repository.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
SANOOV Raspberry Pi 5 4GB Kit, 4GB RAM Single Board Computer with Active Cooler and ABS Case, Complete Raspberry Pi 5 Starter Kit for IoT Robotics Retro Gaming
  • All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
  • Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
  • Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
  • Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
  • Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online

Put the Discord token in place safely

Replace replace_with_your_discord_bot_token with the token generated in Discord’s developer portal. The token is equivalent to a password for the bot: anyone who obtains it can attempt to operate the bot as your application.

  • Keep compose.yaml readable only by the account that administers the service when practical.
  • Do not paste the token into issue reports, screenshots, shell history, or public repositories.
  • If the token is exposed, regenerate it in the developer portal and update the Compose configuration immediately.
  • After changing the token, recreate or restart the service so the container receives the new environment value.

The sample places the token directly in YAML because that is the image’s documented contract. You may instead use an environment-file mechanism supported by your Compose setup, but make sure the resulting variable is still named TOKEN and that the secret file is excluded from version control.

Start Red and verify the first launch

  1. From the directory containing compose.yaml, validate that the file is saved with the intended image, token variable, prefix, and mount path.
  2. Start the service in the background:
docker compose up -d
  1. Check the service state:
docker compose ps
  1. Read the startup output:
docker compose logs -f redbot

The rHomelab instructions use docker compose logs RedBot and direct operators to inspect the output for the invitation URL. Service-name matching depends on the names in that image’s Compose example; with the configuration in this article, redbot is the service name. If the logs show an invitation URL, open it, select the Discord server where you have permission to add bots, and authorize the requested scopes and permissions.

Red’s normal interaction and configuration take place through Discord after installation. Once the bot joins the server, use the prefix configured in PREFIX and follow Red’s in-Discord setup flow. If the bot appears offline, keep the log stream open while checking the token, network access, and Discord application settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why the bind mount is non-negotiable

A container’s writable layer belongs to that particular container. If you remove and recreate the container, data stored only in that layer does not survive. The ./redbot:/data bind mount places Red’s data on the host instead, so replacing the container does not erase the mounted files.

Back up the host directory, not merely the running container. Stop Red first when you want a consistent filesystem-level backup:

Rank #3
Raspberry Pi 4 Computer Model B 8GB Single Board Computer Suitable for Building Mini PC/Smart Robot/Game Console/Workstation/Media Center/Etc.
  • powful cputhe cpu of the raspberry pi 4 model b adopts the latest arm cortex-a72 architecture, which is also used in high-performance smartphones, and has evolved into a real pc.the operating clock has been changed from pi3's 1.2ghz to 1.5ghz, and the speed has become a different dimension with the updated architecture.
  • video output/gputhe on-board gpu of the raspberry pi 4 supports 4kp@60 and newly supports h.265 decoding, opengl es 3.0, etc.as for the video output, two micro hdmis with smaller connectors are installed, and the raspberry pi 4 also supports dual screen output.
  • usb 3.0with a new soc, the speed of the raspberry pi 4 around i/o has been improved, and finally usb 3.0 is supported.usb boot is faster and more convenient.
  • network&bluetoothgigabit ethernet (wired lan) has also been significantly speeded up from 300mbps of pi 3b + to 1000mbps (logical value).in addition, bluetooth supported version has been upgraded to 5.0, and the transfer speed of pi 4 has been doubled.
  • power input connectorthe power input connector of the raspberry pi 4 has been changed to usb type c. it is easier to use than micro usb and can supply a larger current reliably.the power requirement of raspberry pi 4 model b is 5v 3.0a, which is higher than the previous model.
docker compose stop redbot
cp -a ./redbot ./redbot-backup-$(date +%Y-%m-%d)
docker compose start redbot

The copy command is an example for a Unix-like host. Store backups on separate media and periodically test that you can read them. A backup that has never been restored is only an assumption. Include the Compose file (with the token removed or stored separately) and a note identifying the image and tag used at the time of the backup.

Named volumes are another valid persistence mechanism, but the documented example uses a bind mount. If you choose a named volume, identify its name and mount target clearly and use Docker’s volume-backup procedure; do not assume a volume can be recovered by copying the project directory.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep Red online across reboots

restart: unless-stopped is the key setting for routine recovery. When Docker starts after a host reboot, Docker can start the container again. The exception is an intentional stop: if you run docker compose stop, Docker should not immediately undo that decision.

After a reboot, verify both Docker and the project:

docker compose ps
docker compose logs --tail=100 redbot

A restart policy does not repair an invalid token, a broken image, a full disk, or a failed migration. It can repeatedly restart a process that exits, so logs remain the first diagnostic tool rather than evidence that the bot is healthy.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Updating without losing configuration

Image update behavior is image-specific. The PhasecoreX README documents Red updating on restart and describes an optional UpdateNotify cog. That does not make every image’s update process identical.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
  • Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
  • Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
  • CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
  • CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
  • CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)
  1. Read the selected image’s current README and Red’s current hosting guidance.
  2. Back up the host directory mounted at /data.
  3. Record the current image tag and running container state.
  4. Pull or select the documented replacement image according to that README.
  5. Recreate the service with Compose:
docker compose pull
docker compose up -d
  1. Watch the logs for startup errors, database or configuration migration messages, and a successful connection:
docker compose logs -f redbot

If the new image fails, stop it, preserve the logs, and follow the selected image’s rollback instructions. Do not delete the mounted data directory while troubleshooting; that directory is the part you need to recover or restore.

Troubleshooting by symptom

The container exits immediately

  • Run docker compose logs redbot and read the first error, not only the final restart message.
  • Check that TOKEN is present, has no surrounding quotation marks accidentally included in the value, and belongs to the intended bot application.
  • Confirm that the image architecture matches the host.
  • Check that the host directory exists and that the container can write to the mounted /data path.

The bot is online but does not answer commands

  • Use the exact prefix configured in PREFIX; the sample uses ..
  • Confirm that the bot was invited to the correct server and has permission to view and send messages in the channel.
  • Keep the logs open while sending a test command from Discord.
  • Check whether the bot is connected to the intended Discord application and token.

Configuration disappears after recreation

Inspect the mount with docker inspect redbot and confirm that the host directory is mapped to /data. If the service was ever run without the mount, data may be inside the old container’s writable layer; recover it before removing that container and then correct compose.yaml.

The service does not return after a reboot

  • Confirm Docker itself started.
  • Run docker compose ps from the project directory.
  • Check that the service still contains restart: unless-stopped.
  • Review logs for a failed startup, missing mount, permission problem, or invalid token.

The host reports an architecture or executable error

Verify the host architecture and the image’s documented platforms. The PhasecoreX statement covers x86-64 and ARM64, including Raspberry Pi, but that statement does not guarantee compatibility for every other Red image or every add-on. An image that lacks a suitable ARM64 build will not become compatible merely because Docker is installed on a Raspberry Pi.

Running Red on a Raspberry Pi

A Raspberry Pi can be a low-power, always-on Red host when the specific device, operating system, Docker installation, storage, and workload meet the image’s requirements. The PhasecoreX README explicitly lists ARM64 devices, including Raspberry Pi, as supported architectures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check these points before migrating:

  • Use a 64-bit ARM operating system when the image documentation requires ARM64.
  • Install a Docker Engine and Compose plugin that support the Pi’s operating system and architecture.
  • Confirm that the exact image tag publishes an ARM64 variant; do not infer this from another tag or another image.
  • Use reliable storage for the bind-mounted data directory and back it up separately.
  • Allow for the Pi’s CPU, memory, and storage limits when enabling cogs or other workload-heavy features.
  • Test a complete stop, start, and restore procedure before relying on the Pi as the only host.

Compatibility is image-specific. If the selected image documents only x86-64, choose a different documented image or use an x86-64 host rather than forcing an unsupported build.

Operational checklist

  • Record the image name, tag or digest, Compose file, host architecture, and data path.
  • Keep the bot token private and outside public source control.
  • Verify that ./redbot (or your chosen host path) is mounted to /data.
  • Run docker compose up -d from the project directory after host maintenance.
  • Use docker compose logs as the first troubleshooting step.
  • Back up the mounted data before image changes.
  • Read the selected image’s README before updates, migrations, or changing tags.
  • Remember that Red’s official documentation currently classifies Docker support as work in progress and not ready for daily use.

For a small self-hosted installation, this Compose layout is straightforward and recoverable: the container runs the bot, the host directory preserves its state, and the restart policy handles ordinary reboots. The trade-off is support and maintenance responsibility. You must validate the community image, protect the token, monitor logs, maintain backups, and be prepared to troubleshoot outside Red’s officially supported installation path.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.