Where to Begin
Platform Support
RailsGoat works on Linux, Mac OS, and Windows. For Windows users, we recommend using WSL2 (Windows Subsystem for Linux) for the best Rails development experience.
Ruby Version Management
RailsGoat is built with Ruby on Rails 8.0 and requires Ruby 3.3.6. We recommend using rbenv to manage your Ruby versions, though RVM is also supported.
Installation Steps
1) Install rbenv and Ruby
Install rbenv and ruby-build:
On macOS (using Homebrew):
On Linux or WSL2:
Add rbenv to your shell (add to ~/.bashrc or ~/.zshrc):
Install Ruby 3.3.6:
Verify installation:
If you prefer RVM, you can install it with:
curl -sSL https://get.rvm.io | bash -s stableThen install Ruby:
rvm install 3.3.6 && rvm use 3.3.6 --default
2) Clone the repository
Clone RailsGoat from GitHub:
3) Install Bundler and dependencies
Install the Bundler gem if you don't have it:
Install all application dependencies:
4) Setup the database
Initialize the database with seed data:
5) Start the application
Launch the Rails server:
6) Browse to the application
Open your browser and navigate to: http://localhost:3000
bin/rails instead of just rails to ensure you're running the correct version bundled with your application!
/mnt/c/. You can also access your WSL files from Windows Explorer by typing \\wsl$ in the address bar!
Running the Server
Rails 8.0 comes with Puma as the default web server, which is production-ready and handles concurrent requests efficiently.
Start the server
Start on a different port
Run in the background
Stop a background server
Database Commands
Here are the essential database commands for managing RailsGoat's database:
Delete the entire database
Create the database
Run migrations
Seed the database with data
Completely rebuild the database (drop/create/migrate/seed)
Reset and re-seed (keeps structure, reloads data)
Development Console
Access the Rails console to interact with your application directly:
Run database queries, test models, and debug issues interactively:
Updating Code
Keep your local copy up-to-date with the latest changes from the repository.
Pull latest changes from the main branch
Update dependencies
Apply any new database migrations
Restart the server
How to Use the Application
The application is designed in a "choose your own adventure" style. Once the application is up and running, navigate to the tutorials homepage and it will walk you through it.
Essentially, you can either go straight into attacking the application and identifying weaknesses or you can look at each tutorial to get an idea how each vulnerability is introduced, how to fix it, and how to attack it. For those who just want a hint, each tutorial comes with one!
Ready to Start?
Launch the application and navigate to the tutorials section to begin your security training journey!
Open Application