{"id":29859195,"url":"https://github.com/evansims/mastodon.evansims.com","last_synced_at":"2026-05-03T23:34:56.628Z","repository":{"id":306707553,"uuid":"1026982466","full_name":"evansims/mastodon.evansims.com","owner":"evansims","description":"My personal Mastodon instance configuration","archived":false,"fork":false,"pushed_at":"2025-07-27T05:26:59.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T05:38:58.017Z","etag":null,"topics":["docker","docker-compose","dokploy","mastodon"],"latest_commit_sha":null,"homepage":"https://mastodon.evansims.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evansims.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-27T03:54:53.000Z","updated_at":"2025-08-05T06:18:01.000Z","dependencies_parsed_at":"2025-07-27T06:29:49.583Z","dependency_job_id":"e59a4d1a-25fe-4f0f-90b8-a60ce88e3d40","html_url":"https://github.com/evansims/mastodon.evansims.com","commit_stats":null,"previous_names":["evansims/mastodon.evansims.com"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evansims/mastodon.evansims.com","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fmastodon.evansims.com","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fmastodon.evansims.com/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fmastodon.evansims.com/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fmastodon.evansims.com/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evansims","download_url":"https://codeload.github.com/evansims/mastodon.evansims.com/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fmastodon.evansims.com/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","dokploy","mastodon"],"created_at":"2025-07-30T02:10:53.333Z","updated_at":"2026-05-03T23:34:56.614Z","avatar_url":"https://github.com/evansims.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# mastodon.evansims.com\n\nThis repository contains the Docker Compose configuration for my personal Mastodon instance at [mastodon.evansims.com](https://mastodon.evansims.com), supporting multiple accounts under the [evansims.com](https://evansims.com) domain.\n\n## Features\n\n- Multi-account support (hello@evansims.com, photos@evansims.com, etc.)\n- Deployed via [Dokploy](https://dokploy.com)\n- Automated dependency updates via Dependabot\n- Dedicated admin container for maintenance tasks\n- PostgreSQL 14 for data storage\n- Redis for caching and queues\n\n## Prerequisites\n\n- Dokploy instance running\n- Domain configured (mastodon.evansims.com)\n- SSL certificates configured in Dokploy\n- SMTP service for email delivery (e.g., Mailgun)\n\n## Deployment Steps\n\n### 1. Create New Application in Dokploy\n\n1. Go to your Dokploy dashboard\n2. Create a new application\n3. Select \"Docker Compose\" as the deployment type\n4. Connect your Git repository\n\n### 2. Environment Variables\n\nIn Dokploy's environment variables section, add all variables from `.env.production.example`:\n\n**Critical Variables to Set:**\n\n- `LOCAL_DOMAIN=evansims.com`\n- `WEB_DOMAIN=mastodon.evansims.com`\n- `SECRET_KEY_BASE` - Generate with: `openssl rand -base64 64`\n- `OTP_SECRET` - Generate with: `openssl rand -base64 64`\n- `VAPID_PRIVATE_KEY` \u0026 `VAPID_PUBLIC_KEY` - See generation instructions below\n- `ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY` - See generation instructions below\n- `ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT` - See generation instructions below\n- `ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY` - See generation instructions below\n- `DB_HOST=db`\n- `DB_USER=postgres`\n- `DB_NAME=postgres`\n- `DB_PASS` - Leave empty (trust authentication)\n- `DB_PORT=5432`\n- `REDIS_HOST=redis`\n- `REDIS_PORT=6379`\n- `SINGLE_USER_MODE=false`\n- `RAILS_ENV=production`\n- `NODE_ENV=production`\n- SMTP credentials for your email provider\n\n**Rate Limiting (recommended values for personal use):**\n- `THROTTLE_API_LIMIT=10000` - API requests per period (very permissive)\n- `THROTTLE_API_PERIOD=300` - Period in seconds (5 minutes)\n- `THROTTLE_MEDIA_LIMIT=1000` - Media uploads per period (essentially unlimited)\n- `THROTTLE_MEDIA_PERIOD=300` - Media period in seconds (5 minutes)\n- `THROTTLE_FOLLOW_LIMIT=10000` - Follows per day (essentially unlimited)\n- `THROTTLE_FOLLOW_PERIOD=86400` - Follow period (24 hours)\n\n**Generating Required Keys:**\n\n1. First, deploy with minimal config to get containers running\n2. Generate encryption keys:\n\n   ```bash\n   docker exec -it [web_container_name] bin/rails db:encryption:init\n   ```\n\n   Copy the three encryption keys to Dokploy environment variables\n\n3. Generate VAPID keys:\n\n   ```bash\n   docker exec -it [web_container_name] bundle exec rake mastodon:webpush:generate_vapid_key\n   ```\n\n   Copy both keys to Dokploy environment variables\n\n4. Redeploy to apply all environment variables\n\n### 3. Initial Setup Commands\n\nThe docker-compose includes an **admin** container specifically for running maintenance commands. This container stays running and won't crash even if the database isn't initialized.\n\n1. In Dokploy's dashboard, go to your Mastodon application\n2. Find the **admin** container\n3. Click on \"Terminal\" to open a shell\n4. Run these commands:\n\n```bash\n# Initialize the database (first time only)\nbundle exec rake db:setup\n\n# Create your admin account\nbin/tootctl accounts create hello --email hello@evansims.com --confirmed --role Owner\nbin/tootctl accounts approve hello\n\n# Create additional accounts as needed\nbin/tootctl accounts create photos --email photos@evansims.com --confirmed --role Moderator\n```\n\nAfter running `db:setup`, your web container should start successfully.\n\n### 4. Domain Configuration\n\nConfigure your Dokploy proxy/reverse proxy to:\n- Route HTTPS traffic to port 3000\n- Route `/api/v1/streaming` to port 4000\n\nEnsure Dokploy is configured to:\n- Serve the app at https://mastodon.evansims.com\n- Handle SSL termination\n- Pass proper headers (X-Forwarded-For, X-Forwarded-Proto)\n\n## Maintenance\n\n### Using the Admin Container\n\nThe admin container is available for all maintenance tasks:\n\n- Database migrations: `bundle exec rake db:migrate`\n- Clear cache: `bin/tootctl cache clear`\n- Media cleanup: `bin/tootctl media remove`\n- Account management: `bin/tootctl accounts`\n\n### Viewing Logs\n\nUse Dokploy's log viewer or:\n\n```bash\n# Find container name first\ndocker ps | grep mastodon\n# Then view logs\ndocker logs -f [container-name]\n```\n\n### Updating Mastodon\n\n1. Update the image version in docker-compose.yml\n2. Push to your repository\n3. Trigger deployment in Dokploy\n4. Run migrations if needed via the admin container:\n   ```bash\n   bundle exec rake db:migrate\n   ```\n\n### Managing Accounts\n\n**Creating New Accounts:**\n```bash\nbin/tootctl accounts create USERNAME --email EMAIL@evansims.com --confirmed\n```\n\n**Account Roles:**\n- **Owner**: Full admin access (use for your main account)\n- **Admin**: Administrative access\n- **Moderator**: Can moderate content\n- **User**: Regular user (default)\n\n**Reset Password:**\n```bash\nbin/tootctl accounts modify USERNAME --reset-password\n```\n\n**List All Accounts:**\n```bash\nbin/tootctl accounts list\n```\n\n### Backup\n\nConfigure Dokploy's backup feature to regularly backup the volumes:\n- `postgres_data` (critical)\n- `public_system` (user uploads)\n- `redis_data` (optional, just cache)\n\n## Architecture\n\n- **web**: Main Rails application serving the Mastodon UI\n- **streaming**: Node.js server for real-time updates\n- **sidekiq**: Background job processor\n- **admin**: Maintenance container for administrative tasks\n- **db**: PostgreSQL 14 database\n- **redis**: Redis cache and queue\n\n## Security Notes\n\n- Environment variables are managed through Dokploy UI\n- The `.gitignore` prevents committing secrets\n- Public registrations are disabled by default\n- All secrets are stored in Dokploy, not in the repository\n\n## License\n\nThis configuration is provided as-is for reference purposes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fmastodon.evansims.com","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevansims%2Fmastodon.evansims.com","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fmastodon.evansims.com/lists"}