# Self-host Athens

> A Go module proxy that caches modules from upstream so builds stay fast and repeatable. Point GOPROXY at it from your CI or developer machines.

- Page: https://levelrail.com/templates/athens/
- JSON: https://levelrail.com/templates/athens.json
- Category: Developer Tools
- Licence: MIT (Permissive license)
- Source: https://github.com/gomods/athens
- Upstream docs: https://docs.gomods.io/

## Requirements
- Memory: about 128 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: v0.20.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| athens | gomods/athens | v0.20.0 | 3000 | storage -> /var/lib/athens |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| athens | ATHENS_DISK_STORAGE_ROOT | preset |
| athens | ATHENS_PORT | preset |
| athens | ATHENS_STORAGE_TYPE | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy athens --name my-athens
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/athens/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Set GOPROXY to the public address of this app, then run go build. Modules are cached on first request.

## Questions

### Can I deploy Athens on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Athens, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image gomods/athens:v0.20.0 is what you deploy there.

Self-host Athens, Athens docker compose file, deploy Athens on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
