Deploy tinytraffic

Tiny cookie-free web analytics: one Go binary, one DuckDB file

Deploy tinytraffic

Just deployed

/data

Deploy and Host self hosted tinytraffic (Analytics) on Railway

This template deploys tinytraffic, a small cookie-free web analytics server, as one Railway service with a volume for its DuckDB file. It is independent community packaging of egoist/tinytraffic, not affiliated with or endorsed by the upstream author.

About Hosting tinytraffic open-source software on Railway (self hosted tinytraffic template)

Your analytics data stays with you. tinytraffic is AGPL-3.0 open-source software that stores its sites, events and settings in a single DuckDB file on a volume attached to your own service, so nothing is sent to a third-party analytics host. The generated TT_PASSWORD is applied on first start so nobody else can claim the setup screen, and a later password change belongs in the dashboard.

Why Deploy tinytraffic, the self-hosted cookie-free web analytics on Railway

Want analytics without cookie banners or a bill that grows with traffic? tinytraffic runs as one container with one DuckDB file on a volume, so there is less to maintain than a Plausible stack, and you keep your data.

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 tinytraffic 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.

Railway vs Other Hosting Providers and VPS for tinytraffic self hosting

Self-hosting tinytraffic means one container and one volume, so the choice is how much server work you want to do yourself.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanA one-click template with a public domain, a /data volume for the DuckDB file and a generated dashboard password.A Droplet you provision, where you install Docker, set up the volume, configure TLS and keep the OS patched.
AWSThe same template with no VPC, load balancer or volume setup to build by hand.Broad control over networking, storage and scaling, with the configuration that comes with it.
HetznerManaged deploys from the template, without logging in to run Docker or check the data directory.Low-cost bare servers where you handle the firewall, reverse proxy and backups yourself.

Common Use Cases for hosted tinytraffic

  • Personal blog or portfolio stats: Drop the roughly 1 KB tracker into your site and see pageviews, including single-page app navigation, without setting a cookie or showing a consent banner.
  • Tracking signups and clicks: Send custom events in a Plausible-compatible format, or let outbound link clicks be captured automatically, then review them as goals in the dashboard.
  • Sharing numbers with others: Make a site's stats public so visitors, sources, pages, locations, devices and goals can be viewed by anyone, with no sign-in needed.
  • Feeding stats into your own scripts: Use the API to read figures or manage sites from a server, so reports can live wherever you already work.
  • Privacy-minded analytics: Visitors are identified by a daily-salted hash of site, IP and user agent, the IP is never stored, and locations come from a bundled DB-IP Lite city database. Public dashboards are rate limited upstream.

Dependencies for tinytraffic Docker hosted on Railway

This template runs tinytraffic as one container with one persistent volume. Keep it to one replica, because the DuckDB file can only be opened by one process at a time.

Deployment Dependencies for Managed tinytraffic Service (one container with DuckDB on a volume)

The deployment has one service, the tinytraffic app, on port 8080 with a public Railway domain. It mounts a volume at /data, where the DuckDB file tinytraffic.duckdb lives.

Implementation Details for tinytraffic (unmodified tinytraffic 0.3.2 image with Railway volume and proxy defaults)

The image is ghcr.io/onepush-dev/tinytraffic:0.3.2, the unmodified upstream ghcr.io/egoist/tinytraffic:0.3.2 image, run as root so it can write to the Railway volume. TT_ADDR=:8080, TT_DATA_DIR=/data, TT_TRUST_PROXY=true and TT_MEMORY_LIMIT=512MB are baked in, so the app listens on the Railway port, stores data on the volume, and sees real visitor IPs behind the edge.

How does tinytraffic compare against other tools

tinytraffic vs Plausible (Plausible Alternative)

  • Footprint: tinytraffic is one Go binary with one DuckDB file and no cookies. Plausible is a fuller product with its own data stack, which suits teams wanting more features.
  • Event format: tinytraffic accepts Plausible's event format, so existing integrations can point at it with few changes.

tinytraffic vs Umami (Umami Alternative)

  • Storage: tinytraffic keeps data in one DuckDB file on a Railway volume, with optional ClickHouse. Umami is commonly run on a relational database such as PostgreSQL.
  • Privacy model: tinytraffic hashes a daily-rotating salt, site, IP and user agent, and never stores the IP. Umami is also privacy-friendly, so compare the details in each project's docs.

tinytraffic vs GoatCounter (GoatCounter Alternative)

  • Focus: GoatCounter is a lightweight, privacy-friendly counter. tinytraffic leans toward a fuller dashboard with sources, locations, devices and goals.
  • Hosting: both are small single-service deployments.

tinytraffic with Docker vs Railway (Self-Hosted Docker Alternative)

  • Setup: running the upstream image with Docker needs a volume, TT_PASSWORD and, behind a proxy, TT_TRUST_PROXY set by hand. The Railway template sets these defaults and provisions the volume.
  • Control: a plain Docker host gives full control over networking, backups and updates. Railway trades some of that for less operational work.
  • Scaling: keep one replica on Railway because DuckDB is a single file.

How to use tinytraffic on Railway?

  1. Open the public URL of your tinytraffic service. The first screen is the sign-in page.
  2. Sign in with the value of TT_PASSWORD from the tinytraffic service Variables tab. Change it later in the dashboard, since the variable only applies on first start.
  3. Add a site in the dashboard, then copy the tracker snippet it shows. It looks like script defer data-domain="example.com" src="https://your-railway-domain/js/script.js", with HTML brackets around it on your page.
  4. Paste the snippet into your site's head, set data-domain to your site's domain, and point src at your Railway domain path /js/script.js.
  5. Keep one replica, because DuckDB stores everything in a single file on the volume.
  6. Optionally set upstream TT_CLICKHOUSE_URL to store data in ClickHouse instead. ClickHouse is not included in this template.

Railway checks health at this path:

/healthz

How to self host tinytraffic on other VPS Services (tinytraffic self hosting guide)

You can run tinytraffic on any VPS with Docker or from source.

Clone the Repository

Clone the upstream repository and check out the release you want.

git clone https://github.com/egoist/tinytraffic.git
cd tinytraffic
git checkout v0.3.2

Install Dependencies

A source build needs Go 1.26 or later, Bun, and a C compiler, because DuckDB is a C++ library. Then run the build.

bun install
bun run build

Configure Environment Variables

Set TT_PASSWORD so nobody else can claim the setup screen. If you leave it unset, you choose the password on your first visit.

export TT_PASSWORD=your-password
export TT_TRUST_PROXY=true

Start the tinytraffic Application

With Docker, run the upstream image with a volume at /data and the password set.

docker run -d -p 8080:8080 -v tinytraffic:/data \
  -e TT_PASSWORD=your-password -e TT_TRUST_PROXY=true \
  ghcr.io/egoist/tinytraffic:0.3.2

From source, start ./bin/tinytraffic and open port 8080.

Pricing and License of tinytraffic (tinytraffic pricing)

tinytraffic is open-source software released under the AGPL-3.0 license, so you can self-host it without paying the upstream project anything.

tinytraffic hosted vs self hosted comparison (Pricing, features, costs, and more)

tinytraffic is free AGPL-3.0 software, and no hosted plan is described upstream.

Monthly cost of self hosting tinytraffic on Railway

Railway bills on usage, so the monthly cost depends on the RAM, CPU, volume size and services your deployment consumes.

System Requirements for Hosting tinytraffic on a VPS

On a VPS you choose the machine size and handle updates, backups and TLS yourself.

Frequently Asked Questions (FAQs)

How do I sign in to tinytraffic on Railway?

Open the public Railway URL for your tinytraffic service and enter the TT_PASSWORD value shown in the service's Variables tab.

Does the TT_PASSWORD variable keep working after I change the password in the dashboard?

TT_PASSWORD is applied on first start only, so changing the variable later does not reset an existing password. Make any later password changes in the dashboard itself.

Why do I need to keep one replica?

tinytraffic stores its data in DuckDB, which is a single-file database, so only one process should write to the file at a time. Keep the service at one replica to avoid conflicts.

Does tinytraffic use cookies?

No, tinytraffic does not use cookies or browser storage. Visitors are identified by a hash that includes a daily-rotating salt, and the visitor IP address is never stored.

Can I use ClickHouse with this template?

Yes, the upstream project supports ClickHouse through the TT_CLICKHOUSE_URL variable, but this Railway template does not include a ClickHouse service.

What should I back up?

Back up the /data volume, especially the tinytraffic.duckdb file, since it holds your sites and events.


Template Content

More templates in this category

View Template
Plausible WordPress
Cookie-free WordPress stats from your own Plausible

onepush
0
View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
3