---
title: "Deploy Fiber"
description: "Go + Fiber web server with Zap logging, .env config, and health route"
category: "Starters"
url: https://railway.com/deploy/go-fiber
---

# Deploy Fiber

Go + Fiber web server with Zap logging, .env config, and health route

**[Deploy Fiber on Railway](https://railway.com/template/go-fiber)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/go-fiber/manifest.json

- **Creator:** PollyWolly's Projects
- **Category:** Starters
- **Total deploys:** 4

## Template content

### go-fiber

- **Source:** railtools/go-fiber
- **Public domain:** Yes

## Documentation

# Deploy and Host Go + Fiber on Railway

Go + Fiber is a fast, minimalist web framework built on top of Go’s fasthttp package. It’s designed to be expressive like Express.js while leveraging Go’s performance and concurrency. Ideal for building high-speed APIs and microservices with minimal overhead.

## About Hosting Go + Fiber

Railway deploys Go + Fiber apps using Nixpacks. Just include a go.mod file and expose your Fiber server on os.Getenv("PORT"). Railway automatically detects and builds your project without needing a Dockerfile. You can define custom build steps with nixpacks.toml, and Railway handles port binding, logs, and environment variables out of the box.

## Common Use Cases

- Building REST APIs and microservices
- Rapid prototyping with Go performance
- Lightweight web apps or backends

## Dependencies for Go + Fiber Hosting

- [github.com/gofiber/fiber](https://github.com/gofiber/fiber)
- `go.mod` to define module and dependencies

### Deployment Dependencies

- [Fiber Documentation](https:\\docs.gofiber.io)
- [Nixpacks Go Buildpack](https://nixpacks.com/docs/providers/go)

### Implementation Details

```go
package main

import (
	"github.com/gofiber/fiber/v2"
	"go.uber.org/zap"
	"main/logger"
	"main/shared"
	"time"
)

func main() {
	logger.Info("Starting application", zap.String("version", "1.0.0"))
	shared.InitialiseAppSettings(".")
	logger.Info("Application initialized successfully")

	app := fiber.New()

	app.Get(
		"/", func(c *fiber.Ctx) error {
			return c.JSON(
				fiber.Map{
					"status": "ok",
					"slogan": "Wow, so this is what it's like to be on the internet!",
					"date":   time.Now().Format("2006-01-02 15:04:05"),
				},
			)
		},
	)

	app.Get(
		"/health", func(c *fiber.Ctx) error {
			logger.Info("/health called")
			return c.JSON(
				fiber.Map{
					"status": "ok",
					"slogan": "All aboard the railway express!",
					"date":   time.Now().Format("2006-01-02 15:04:05"),
				},
			)
		},
	)

	logger.Info("Starting server on port 8080")
	logger.Fatal("Server failed to start", zap.Error(app.Listen(":8080")))
}
```

## Why Deploy Go + Fiber on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Go + Fiber on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Openfront Gym](https://railway.com/deploy/openfront-gym) — Opensource Mindbody alternative based on Next.js and Keystone.js
- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [Next.js + Prisma + PostgreSQL Starter](https://railway.com/deploy/nextjs-prisma-postgres) — Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

Open this page in a browser: https://railway.com/deploy/go-fiber
