Skip to content

omiinaya/go-fast-cdn

 
 

Repository files navigation

Go-Fast CDN - Fast and simple Open Source CDN

Go-Fast CDN

"The PocketBase of CDNs" - Me

A fast and easy-to-use CDN, built with Go.

Utilizing an SQLite database with GORM and the Gin web framework. UI built with Vite + React and wouter.

How to use

See our documentation at kevinanielsen.github.io/go-fast-cdn/

Community

Join the discord to talk to fellow users and contributors!

Development

Clone the Repository

git clone git@github.com:kevinanielsen/go-fast-cdn or git clone https://github.com/kevinanielsen/go-fast-cdn

Add env variables

This project uses dotenv and I recommend that you do the same.
Read more about the usage on their page.

If you do not wish to use this, you can just rename .example.env to .env and fill in the fields.

Building the binary

  1. Run make prep
  2. Run make clean
  3. Run make test
  4. Run make build

Your binary should now be tested, built, and you can run it with bin/go-fast-cdn-linux or bin/go-fast-cdn-windows or bin/go-fast-cdn-darwin

Quick start with Docker

git clone git@github.com:kevinanielsen/go-fast-cdn or git clone https://github.com/kevinanielsen/go-fast-cdn

docker-compose up -d

Subdomain Separation (Optional)

For production deployments, you can separate admin UI from public CDN serving using subdomains.

Nginx: See nginx/example.conf for a basic configuration.

Nginx Proxy Manager:

  1. Create proxy host for admin.cdn.example.comhttp://your-cdn:8080 (full access)
  2. Create proxy host for cdn.example.comhttp://your-cdn:8080
  3. Edit the cdn.example.com proxy host → Custom Locations tab → Add:
    • Location: /api/cdn/download/images/ → Forward to http://your-cdn:8080
    • Location: /api/cdn/download/docs/ → Forward to http://your-cdn:8080
  4. Click the gear icon ⚙️ (top-right) → In Custom Nginx Configuration, add:
    location / {
        return 403;
    }
    
  5. Save. This blocks admin UI access on cdn.example.com

About

A fast and easy-to-use CDN, built with Go.

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 66.6%
  • Go 30.8%
  • CSS 1.7%
  • Makefile 0.3%
  • JavaScript 0.3%
  • HTML 0.2%
  • Dockerfile 0.1%