Docs / Self-Hosted Applications / Setting Up Jellyfin Media Server

Setting Up Jellyfin Media Server

By Admin · Jan 30, 2026 · Updated Apr 23, 2026 · 5 views · 3 min read

In this article, we'll walk through the complete process of working with jellyfin in a server environment. Understanding media is essential for maintaining a reliable and performant infrastructure.

Prerequisites

  • Basic familiarity with the Linux command line
  • A registered domain name (for public-facing services)
  • Root or sudo access to the server

Docker Compose Setup

When scaling this setup, consider vertical scaling (adding more RAM/CPU) first, as it's simpler to implement. Horizontal scaling adds complexity but may be necessary for high-traffic applications.


# docker-compose.yml
version: '3.8'
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - jellyfin_data:/data
      - jellyfin_config:/config
    environment:
      - TZ=UTC
      - PUID=1000
      - PGID=1000
    depends_on:
      - db

  db:
    image: postgres:16-alpine
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=jellyfin
      - POSTGRES_USER=jellyfin
      - POSTGRES_PASSWORD=changeme

volumes:
  jellyfin_data:
  jellyfin_config:
  db_data:

The output should show the service running without errors. If you see any warning messages, address them before proceeding to the next step.

Initial Configuration

The media component plays a crucial role in the overall architecture. Understanding how it interacts with jellyfin will help you make better configuration decisions.


# Reverse proxy configuration
server {
    listen 443 ssl http2;
    server_name jellyfin.example.com;

    ssl_certificate /etc/letsencrypt/live/jellyfin.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/jellyfin.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        client_max_body_size 0;
    }
}

This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.

Configuration Options

Performance benchmarks show that properly tuned jellyfin can handle significantly more concurrent connections than the default configuration. The key improvements come from adjusting worker processes and connection pooling.

Common Issues and Solutions

  • Service won't start: Check the logs with journalctl -xe -u jellyfin. Common causes include port conflicts, missing configuration files, or insufficient permissions.
  • Slow performance: Check for disk I/O bottlenecks with iostat -x 1 and network issues with mtr. Review application logs for slow queries or requests.

Summary

You've successfully configured jellyfin on your VPS. Remember to monitor performance, keep your software updated, and maintain regular backups. If you run into issues, consult the official documentation or open a support ticket for assistance.

Was this article helpful?