Installation
Get started with Fiber by installing the framework and setting up your development environment.Prerequisites
Fiber requires Go version 1.25 or higher to run.
Installation steps
Initialize Go modules
Initialize your project with Go modules by running:Replace
github.com/your/repo with your actual module path. This creates a go.mod file that tracks your project’s dependencies.To learn more about Go modules and how they work, check out the Using Go Modules blog post.
Install Fiber
Install Fiber using the This command fetches the Fiber package and adds it to your project’s dependencies in
go get command:go.mod.Project structure
After installation, your project structure should look like this:- go.mod: Defines your module path and lists dependencies
- go.sum: Contains checksums for dependency verification
- main.go: Your application entry point
Installing additional packages
Fiber has a rich ecosystem of middleware and utilities. Here are some commonly used packages:Version compatibility
Check the installed Fiber version in your code:Development tools
For a better development experience, consider installing these tools:Air (Live reload)
Air provides live reloading for Go applications:.air.toml configuration file and run:
golangci-lint (Code linting)
Install the comprehensive Go linter:Troubleshooting
Module not found
If you encounter “module not found” errors, ensure you’ve run:Import errors
Make sure you’re importing the correct Fiber version:Port already in use
If port 3000 is already in use, specify a different port:Next steps
Quick start guide
Build your first complete Fiber application
Routing
Learn about Fiber’s powerful routing system
Middleware
Explore built-in and custom middleware
API reference
Dive into the complete API documentation