Self-Hosting LinkStack with Docker Compose
What Is LinkStack?
LinkStack is a self-hosted alternative to Linktree, Lnk.Bio, and similar link-in-bio services. It creates a customizable page where you list your social profiles, websites, and other links in one place. Multi-user support means you can host link pages for an entire team or organization. Custom themes, built-in analytics, and no monthly fees. If you’re paying Linktree $5-24/month for a page of links, LinkStack replaces it with a single Docker container.
Official site: linkstack.org | GitHub
Prerequisites
- A Linux server or Raspberry Pi
- Docker and Docker Compose installed (guide)
- 200 MB of free disk space
- 128 MB of RAM minimum
- A domain name (recommended — link pages need a public URL)
Docker Compose Configuration
services:
linkstack:
image: linkstackorg/linkstack:v4.8.6
container_name: linkstack
restart: unless-stopped
ports:
- "8090:80"
environment:
- [email protected]
- HTTP_SERVER_NAME=links.example.com
- HTTPS_SERVER_NAME=links.example.com
- TZ=UTC
- PHP_MEMORY_LIMIT=256M
- UPLOAD_MAX_FILESIZE=8M
volumes:
- linkstack-data:/htdocs
networks:
- linkstack-net
volumes:
linkstack-data:
networks:
linkstack-net:
LinkStack uses SQLite internally — no external database needed.
Start the stack:
docker compose up -d
Initial Setup
Access LinkStack at http://your-server-ip:8090. The setup wizard walks you through:
- Application settings — site name, language, theme
- Admin account — create your administrator login
- Done — start adding links
Creating Your Link Page
- Log in to the admin panel
- Click Add Link to add social profiles, websites, or custom URLs
- Drag and drop to reorder links
- Choose a theme from the built-in collection or customize with CSS
- Your page is live at
http://your-server-ip:8090/@username
Configuration
Custom Themes
LinkStack includes multiple built-in themes. To switch themes: Admin Panel → Appearance → Select theme. For custom CSS, use the built-in style editor to modify colors, fonts, and layout without touching files.
Multi-User Mode
Enable registration in Admin Panel → Config → Allow Registration. Each user gets their own link page at /@username. Useful for teams or organizations where everyone needs a link page.
| Setting | Description |
|---|---|
| Allow registration | Open or closed signups |
| User role | Regular user or admin |
| Custom domains | Per-user custom domains (via reverse proxy) |
| Analytics | Per-link click tracking |
| Social icons | Auto-detected from URL |
Analytics
LinkStack tracks clicks per link. View analytics in the admin panel — total clicks, clicks per link, and click trends. No external analytics service needed.
Custom Buttons
Beyond standard links, LinkStack supports custom button styles:
- Standard links with icons
- Social media buttons (auto-detects platform from URL)
- Email links
- Phone links
- Custom HTML blocks
- Heading dividers for organizing sections
Reverse Proxy
Set HTTP_SERVER_NAME and HTTPS_SERVER_NAME to your domain. For proxy configuration, see Reverse Proxy Setup.
Backup
Back up the linkstack-data volume — it contains the SQLite database, user uploads, and configuration:
docker compose cp linkstack:/htdocs ./linkstack-backup-$(date +%Y%m%d)
For a full backup strategy, see Backup Strategy.
Troubleshooting
Links Not Saving
Symptom: Added links disappear after saving.
Fix: The SQLite database may be read-only. Check volume permissions:
docker compose exec linkstack ls -la /htdocs/database/
Ensure the database file is writable by the container user.
Custom Domain Not Working
Symptom: Accessing via custom domain shows default Apache page.
Fix: Set HTTP_SERVER_NAME and HTTPS_SERVER_NAME to match your domain exactly. Restart the container after changing environment variables.
Theme Not Applying
Symptom: Selected theme doesn’t render correctly.
Fix: Clear your browser cache. If using a reverse proxy, ensure CSS and JS assets aren’t being cached with stale headers.
Resource Requirements
- RAM: ~30 MB (Apache + PHP + SQLite)
- CPU: Minimal — static page rendering
- Disk: ~100 MB for the application, grows slowly with user avatars
Verdict
LinkStack is the best self-hosted Linktree replacement. One container, SQLite database, under 30 MB RAM, and it does everything Linktree does — custom themes, analytics, social icons, multi-user support. The built-in theme collection looks professional out of the box. For a minimal alternative with fewer features but even simpler setup, see LittleLink. If you just need a personal page and don’t care about multi-user or analytics, LittleLink is lighter. For anything beyond that, LinkStack wins.
Related
Get self-hosting tips in your inbox
Get the Docker Compose configs, hardware picks, and setup shortcuts we don't put in articles. Weekly. No spam.
Comments