231 lines
5.7 KiB
Markdown
231 lines
5.7 KiB
Markdown
# Mastodon
|
|
|
|
**🔴 Communication Service**
|
|
|
|
## 📋 Service Overview
|
|
|
|
| Property | Value |
|
|
|----------|-------|
|
|
| **Service Name** | mastodon |
|
|
| **Host** | Atlantis |
|
|
| **Category** | Communication |
|
|
| **Difficulty** | 🔴 |
|
|
| **Docker Image** | `lscr.io/linuxserver/mastodon:latest` |
|
|
| **Compose File** | `Atlantis/mastodon.yml` |
|
|
| **Directory** | `Atlantis` |
|
|
|
|
## 🎯 Purpose
|
|
|
|
Mastodon is a free and open-source self-hosted social networking service.
|
|
|
|
## 🚀 Quick Start
|
|
|
|
### Prerequisites
|
|
- Docker and Docker Compose installed
|
|
- Basic understanding of REDACTED_APP_PASSWORD
|
|
- Access to the host system (Atlantis)
|
|
|
|
### Deployment
|
|
```bash
|
|
# Navigate to service directory
|
|
cd Atlantis
|
|
|
|
# Start the service
|
|
docker-compose up -d
|
|
|
|
# Check service status
|
|
docker-compose ps
|
|
|
|
# View logs
|
|
docker-compose logs -f mastodon
|
|
```
|
|
|
|
## 🔧 Configuration
|
|
|
|
### Docker Compose Configuration
|
|
```yaml
|
|
container_name: Mastodon
|
|
depends_on:
|
|
mastodon-db:
|
|
condition: service_started
|
|
mastodon-redis:
|
|
condition: service_healthy
|
|
environment:
|
|
- PUID=1026
|
|
- PGID=100
|
|
- TZ=America/Los_Angeles
|
|
- DEFAULT_LOCALE=en
|
|
- LOCAL_DOMAIN=mastodon.vish.gg
|
|
- WEB_DOMAIN=mastodon.vish.gg
|
|
- REDIS_HOST=mastodon-redis
|
|
- REDIS_PORT=6379
|
|
- DB_HOST=mastodon-db
|
|
- DB_USER=mastodonuser
|
|
- DB_NAME=mastodon
|
|
- DB_PASS="REDACTED_PASSWORD"
|
|
- DB_PORT=5432
|
|
- ES_ENABLED=false
|
|
- ES_HOST=es
|
|
- ES_PORT=9200
|
|
- ES_USER=elastic
|
|
- ES_PASS="REDACTED_PASSWORD"
|
|
- SECRET_KEY_BASE=REDACTED_SECRET_KEY_BASE
|
|
- OTP_SECRET=REDACTED_OTP_SECRET
|
|
- S3_ENABLED=false
|
|
hostname: mastodon
|
|
image: lscr.io/linuxserver/mastodon:latest
|
|
ports:
|
|
- 8562:443
|
|
restart: always
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- /volume1/docker/mastodon/config:/config
|
|
|
|
```
|
|
|
|
### Environment Variables
|
|
| Variable | Value | Description |
|
|
|----------|-------|-------------|
|
|
| `PUID` | `1026` | User ID for file permissions |
|
|
| `PGID` | `100` | Group ID for file permissions |
|
|
| `TZ` | `America/Los_Angeles` | Timezone setting |
|
|
| `DEFAULT_LOCALE` | `en` | Configuration variable |
|
|
| `LOCAL_DOMAIN` | `mastodon.vish.gg` | Service domain name |
|
|
| `WEB_DOMAIN` | `mastodon.vish.gg` | Service domain name |
|
|
| `REDIS_HOST` | `mastodon-redis` | Configuration variable |
|
|
| `REDIS_PORT` | `6379` | Configuration variable |
|
|
| `DB_HOST` | `mastodon-db` | Configuration variable |
|
|
| `DB_USER` | `mastodonuser` | Configuration variable |
|
|
| `DB_NAME` | `mastodon` | Configuration variable |
|
|
| `DB_PASS` | `mastodonpw` | Configuration variable |
|
|
| `DB_PORT` | `5432` | Configuration variable |
|
|
| `ES_ENABLED` | `false` | Configuration variable |
|
|
| `ES_HOST` | `es` | Configuration variable |
|
|
| `ES_PORT` | `9200` | Configuration variable |
|
|
| `ES_USER` | `elastic` | Configuration variable |
|
|
| `ES_PASS` | `elastic` | Configuration variable |
|
|
| `SECRET_KEY_BASE` | `***MASKED***` | Application secret key |
|
|
| `OTP_SECRET` | `***MASKED***` | Configuration variable |
|
|
| `S3_ENABLED` | `false` | Configuration variable |
|
|
|
|
|
|
### Port Mappings
|
|
| Host Port | Container Port | Protocol | Purpose |
|
|
|-----------|----------------|----------|----------|
|
|
| 8562 | 443 | TCP | HTTPS web interface |
|
|
|
|
|
|
### Volume Mappings
|
|
| Host Path | Container Path | Type | Purpose |
|
|
|-----------|----------------|------|----------|
|
|
| `/volume1/docker/mastodon/config` | `/config` | bind | Configuration files |
|
|
|
|
|
|
## 🌐 Access Information
|
|
|
|
### Web Interface
|
|
- **HTTP**: `http://Atlantis:8562`
|
|
|
|
### Default Credentials
|
|
Create admin account via command line
|
|
|
|
## 🔒 Security Considerations
|
|
|
|
- ✅ Security options configured
|
|
- ⚠️ Consider running as non-root user
|
|
|
|
## 📊 Resource Requirements
|
|
|
|
No resource limits configured
|
|
|
|
### Recommended Resources
|
|
- **Minimum RAM**: 512MB
|
|
- **Recommended RAM**: 1GB+
|
|
- **CPU**: 1 core minimum
|
|
- **Storage**: Varies by usage
|
|
|
|
### Resource Monitoring
|
|
Monitor resource usage with:
|
|
```bash
|
|
docker stats
|
|
```
|
|
|
|
## 🔍 Health Monitoring
|
|
|
|
⚠️ No health check configured
|
|
Consider adding a health check:
|
|
```yaml
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:PORT/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
```
|
|
|
|
### Manual Health Checks
|
|
```bash
|
|
# Check container health
|
|
docker inspect --format='{{.State.Health.Status}}' CONTAINER_NAME
|
|
|
|
# View health check logs
|
|
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' CONTAINER_NAME
|
|
```
|
|
|
|
## 🚨 Troubleshooting
|
|
|
|
### Common Issues
|
|
**Service won't start**
|
|
- Check Docker logs: `docker-compose logs service-name`
|
|
- Verify port availability: `netstat -tulpn | grep PORT`
|
|
- Check file permissions on mounted volumes
|
|
|
|
**Can't access web interface**
|
|
- Verify service is running: `docker-compose ps`
|
|
- Check firewall settings
|
|
- Confirm correct port mapping
|
|
|
|
**Performance issues**
|
|
- Monitor resource usage: `docker stats`
|
|
- Check available disk space: `df -h`
|
|
- Review service logs for errors
|
|
|
|
### Useful Commands
|
|
```bash
|
|
# Check service status
|
|
docker-compose ps
|
|
|
|
# View real-time logs
|
|
docker-compose logs -f mastodon
|
|
|
|
# Restart service
|
|
docker-compose restart mastodon
|
|
|
|
# Update service
|
|
docker-compose pull mastodon
|
|
docker-compose up -d mastodon
|
|
|
|
# Access service shell
|
|
docker-compose exec mastodon /bin/bash
|
|
# or
|
|
docker-compose exec mastodon /bin/sh
|
|
```
|
|
|
|
## 📚 Additional Resources
|
|
|
|
- **Official Documentation**: Check the official docs for mastodon
|
|
- **Docker Hub**: [lscr.io/linuxserver/mastodon:latest](https://hub.docker.com/r/lscr.io/linuxserver/mastodon:latest)
|
|
- **Community Forums**: Search for community discussions and solutions
|
|
- **GitHub Issues**: Check the project's GitHub for known issues
|
|
|
|
## 🔗 Related Services
|
|
|
|
Other services in the communication category on Atlantis
|
|
|
|
---
|
|
|
|
*This documentation is auto-generated from the Docker Compose configuration. For the most up-to-date information, refer to the official documentation and the actual compose file.*
|
|
|
|
**Last Updated**: 2025-11-17
|
|
**Configuration Source**: `Atlantis/mastodon.yml`
|