Nomploy Nomad Packs

← All packs

gokapi v0.1.0

Files & sync

Gokapi — a lightweight self-hosted file-sharing server (a WeTransfer / Firefox Send alternative): upload a file, get a shareable link with expiry and download limits. Deployed as a single host-networked Nomad service with SQLite storage.

nomad-pack run gokapi --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- gokapi

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 53842 2 volumes image f0rc3/gokapi:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run gokapi -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "gokapi"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Gokapi container image. Pin a tag in production.
image = "f0rc3/gokapi:latest"

# Host port for the Gokapi web UI.
port = 53842

# Named volume for uploaded files and the SQLite database.
data_volume = "gokapi_data"

# Named volume for Gokapi configuration.
config_volume = "gokapi_config"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Gokapi task.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"gokapi"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"f0rc3/gokapi:latest"
The Gokapi container image. Pin a tag in production.
port number
53842
Host port for the Gokapi web UI.
data_volume string
"gokapi_data"
Named volume for uploaded files and the SQLite database.
config_volume string
"gokapi_config"
Named volume for Gokapi configuration.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
Resources for the Gokapi task.
Back up this pack

This pack stores data in 2 Docker named volumes: gokapi_datagokapi_config

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/gokapi_data/_data \
  /var/lib/docker/volumes/gokapi_config/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/gokapi_data/_data backup:<bucket>/gokapi_data
rclone sync /var/lib/docker/volumes/gokapi_config/_data backup:<bucket>/gokapi_config

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

gokapi

Gokapi is a lightweight self-hosted file-sharing server — a WeTransfer / Firefox Send alternative. Upload a file and get a shareable link with an expiry time and a download limit; optionally end-to-end encrypt uploads.

This pack runs Gokapi as a single host-networked Nomad job. It stores uploads and its SQLite database in the gokapi_data volume and config in gokapi_config — no external database is required.

Quick start

nomad-pack run gokapi --registry=nomploy

Then open http://<node-ip>:53842/setup and follow the setup wizard to create the admin account and pick the encryption level.

Configuration

Variable Default Notes
port 53842 Web UI host port
data_volume gokapi_data Uploads + SQLite database
config_volume gokapi_config Gokapi config

The admin account and encryption settings are created in the one-time setup wizard. Keep Gokapi behind your VPN or an authenticating reverse proxy if the upload UI shouldn't be publicly reachable.