⚠️ Active Development NoticeNametag is under active development and may introduce breaking changes between releases. Please read the release notes carefully before updating to ensure a smooth upgrade process.

Are you tired of juggling multiple contacts across social media, phone books, and email? Do you struggle to keep track of important dates, relationships, and network connections? Look no further than Nametag, a mobile marketing solution that helps you manage your personal relationships with ease. With Nametag, you can create and manage detailed contact information, define custom relationship types, keep up-to-date information about the people you care about, organize contacts into groups, and even set reminders for important dates.

What sets Nametag apart is its ability to visualize your network as an interactive graph, making it easier than ever to stay connected with friends, family, colleagues, and more. Whether you're looking to strengthen your professional network or simply keep in touch with loved ones, Nametag has got you covered.

Benefits of Self-Hosting

Run Nametag on your own infrastructure for free and enjoy the benefits of:

  • No account limits – store unlimited contacts
  • No email service required – accounts are auto-verified
  • Complete data ownership and privacy
  • Free forever

Setting Up Nametag for Self-Hosting

To get started, create a directory for Nametag and create a docker-compose.yml file. Then, create an .env file with the required variables and start the services using Docker Compose.

Here's a step-by-step guide:

  1. Create a directory for Nametag: mkdir nametag && cd nametag
  2. Create a docker-compose.yml file:

`

services:

db:

image: postgres:16-alpine

restart: unless-stopped

environment:

POSTGRES_USER: ${DB_USER}

POSTGRES_PASSWORD: ${DB_PASSWORD}

POSTGRES_DB: ${DB_NAME}

volumes:

  • postgres_data:/var/lib/postgresql/data

app:

image: ghcr.io/mattogodoy/nametag:latest

restart: unless-stopped

ports:

  • "3000:3000"

env_file:

  • .env

depends_on:

  • db

cron:

image: alpine:3.19

restart: unless-stopped

command: >

sh -c "

echo '0 8 * wget -q -O - --header=\"Authorization: Bearer '\"$$CRON_SECRET\"'\" http://app:3000/api/cron/send-reminders > /proc/1/fd/1 2>&1

" > /etc/crontabs/root &&

echo '0 3 * wget -q -O - --header=\"Authorization: Bearer '\"$$CRON_SECRET\"'\" http://app:3000/api/cron/purge-deleted > /proc/1/fd/1 2>&1 >> /etc/crontabs/root &&

crond -f -l 2

"

environment:

  • CRON_SECRET=${CRON_SECRET}

depends_on:

  • app

volumes:

postgres_data:

`

  1. Create an .env file with the required variables:

`

# Generate secrets with: openssl rand -base64 32

# Database connection

DB_HOST=db

DB_PORT=5432

DB_NAME=nametag_db

DB_USER=nametag

DB_PASSWORD=your-secure-database-password

# Application URL

NEXTAUTH_URL=http://localhost:3000

# NextAuth (must be at least 32 characters)

NEXTAUTH_SECRET=your-nextauth-secret-minimum-32-characters

# Cron authentication

CRON_SECRET=your-cron-secret-minimum-16-characters

# Email (OPTIONAL - only needed for password resets and reminders)

# Self-hosted instances work without email - new accounts are auto-verified

# Option 1: Resend (recommended for simplicity)

# Sign up at https://resend.com if you want email functionality

#RESEND_API_KEY=re_your_api_key

#EMAIL_DOMAIN=yourdomain.com

# Option 2: SMTP (use your own email server)

# If both are configured, SMTP takes precedence over Resend

# Note: Gmail/Outlook will rewrite the "from" address to your authenticated email

#SMTP_HOST=smtp.gmail.com

#SMTP_PORT=587

#SMTP_SECURE=false

#SMTP_REQUIRE_TLS=true

#SMTP_USER=your-email@gmail.com

#SMTP_PASS=your-app-password

#EMAIL_DOMAIN=gmail.com

`

  1. Start the services: docker compose up -d

Once you've set up Nametag, access it at http://localhost:3000 and start managing your personal relationships with ease.

Key Variables for Self-Hosting

| Variable | Description | Default |

|---|---|---|

DB_HOST | PostgreSQL server hostname | db or localhost |

DB_PORT | PostgreSQL server port | 5432 |

DB_NAME | PostgreSQL database name | nametag_db |

DB_USER | PostgreSQL username | nametag |

DB_PASSWORD | PostgreSQL password | your-secure-password |

NEXTAUTH_URL | Application URL (for auth, emails, redirects) | https://yourdomain.com |

NEXTAUTH_SECRET | Secret for JWT encryption (min 32 chars) | Generate with openssl rand -base64 32 |

CRON_SECRET | Secret for cron job authentication | Generate with openssl rand -base64 16 |

By following these simple steps, you can unlock the power of mobile marketing and take control of your personal relationships. With Nametag, you'll never have to worry about keeping track of important dates or connections again.