---
title: "Serve small with Fly.io and GoStatic"
description: "The post shows how to deploy a tiny static signpost site on Fly.io using GoStatic, with the aim of keeping the application’s footprint and running cost low. GoStatic is a self-contained web server that can run in a bare Docker image; the described image is 6MB, while the completed deployment reports 7.7MB. The setup uses fly init examplegostatic -p 8043, a two-line Dockerfile based on pierrezemb/gostatic, and an index.html copied to /srv/http/index.html; Fly routes ports 80 and 443 to GoStatic’s port 8043 and provides HTTPS. After deployment reaches one healthy instance, the post reduces the default micro-2x VM from 512MB RAM to micro-1x, which provides 128MB. This matches the small workload and is presented as a way to reduce running costs."
---

# Serve small with Fly.io and GoStatic

[Fly.io](https://yomu.fyi/company/fly-io) · Jul 27, 2020

**Type:** Tutorial

## Summary

The post shows how to deploy a tiny static signpost site on Fly.io using GoStatic, with the aim of keeping the application’s footprint and running cost low. GoStatic is a self-contained web server that can run in a bare Docker image; the described image is 6MB, while the completed deployment reports 7.7MB. The setup uses fly init examplegostatic -p 8043, a two-line Dockerfile based on pierrezemb/gostatic, and an index.html copied to /srv/http/index.html; Fly routes ports 80 and 443 to GoStatic’s port 8043 and provides HTTPS. After deployment reaches one healthy instance, the post reduces the default micro-2x VM from 512MB RAM to micro-1x, which provides 128MB. This matches the small workload and is presented as a way to reduce running costs.

## Context

The site is a static signpost page for a recently rebranded Maker organization. The deployment is intended to have a tiny footprint so it will never cost anything to deploy, avoiding the layers and size associated with conventional Docker images that include an operating system and application server.

## Approach / What changed

Create a Fly.io app configured to route ports 80 and 443 to GoStatic’s default port 8043, use a two-line Dockerfile based on pierrezemb/gostatic, copy index.html into /srv/http, and deploy with flyctl deploy. After deployment, reduce the VM from the default micro-2x size to micro-1x.

## Takeaways

- GoStatic runs in a bare Docker image with no operating-system layer; the post describes the image as 6MB and the completed Fly deployment as 7.7MB.
- Fly.io routes public ports 80 and 443 to GoStatic’s port 8043, while Fly handles HTTPS after deployment.
- The default micro-2x VM can be changed to micro-1x, reducing memory from 512MB to 128MB for this small static workload.

**Tags:** [Docker](https://yomu.fyi/topic/docker), [Fly.io](https://yomu.fyi/topic/fly-io), [GoStatic](https://yomu.fyi/topic/gostatic)

- Source: [Fly.io](https://fly.io/blog/serve-small-with-fly-io-and-gostatic)
- Source URL: https://fly.io/blog/serve-small-with-fly-io-and-gostatic
- Ingested by Yomu: 2026-09-03T01:24:15.695Z

[Read original post](https://fly.io/blog/serve-small-with-fly-io-and-gostatic)
