# Unraid Installation Guide Two methods: **GUI** (Docker tab) and **CLI** (terminal). Both result in the same running container. --- ## Prerequisites - Unraid 6.10 or later - Docker enabled (Settings > Docker > Enable Docker: Yes) - The `memer` image available — either: - Built locally and transferred, **or** - Pushed to a registry (Docker Hub, GHCR, your own) and pulled by Unraid - A reverse proxy pointed at the container port if you want HTTPS (Nginx Proxy Manager, Swag, Traefik, etc.) ### Build and push the image (from your dev machine) ```bash docker build -t youruser/memer:latest . docker push youruser/memer:latest ``` Or load a local tarball directly on the Unraid terminal: ```bash # On dev machine docker save memer:latest | gzip > memer.tar.gz scp memer.tar.gz root@:/tmp/ # On Unraid terminal docker load -i /tmp/memer.tar.gz ``` --- ## Method 1 — Unraid GUI (Docker Tab) 1. Go to **Docker** tab → **Add Container** 2. Fill in the fields as follows: ### Basic | Field | Value | |---|---| | Name | `memer` | | Repository | `youruser/memer:latest` (or `memer:latest` if loaded locally) | | Network Type | `bridge` | | Restart Policy | `unless-stopped` | | Console shell | `sh` | ### Port Mappings Click **Add another Path, Port, Variable, Label or Device** → select **Port** | Config Type | Name | Container Port | Host Port | Connection Type | |---|---|---|---|---| | Port | Web UI | `3000` | `3000` | TCP | > Change the host port (e.g. `3001`) if 3000 is already in use on your server. ### Volume Mappings Add two path mappings (click **Add another Path** → select **Path** for each): | Config Type | Name | Container Path | Host Path | Access Mode | |---|---|---|---|---| | Path | Images | `/data/images` | `/mnt/user/appdata/memer/images` | Read/Write | | Path | Database | `/data/db` | `/mnt/user/appdata/memer/db` | Read/Write | > You can substitute `/mnt/user/appdata/` with any share path — just keep both sub-paths consistent. ### Environment Variables Add three variables (click **Add another Path** → select **Variable** for each): | Config Type | Name | Key | Value | |---|---|---|---| | Variable | Public URL | `PUBLIC_URL` | `https://meme.alwisp.com` | | Variable | Port | `PORT` | `3000` | | Variable | Data Dir | `DATA_DIR` | `/data` | > `PUBLIC_URL` is what gets embedded in share links (copy link, Telegram, SMS). Set it to your actual external URL. 3. Click **Apply**. Unraid will pull/start the container. 4. Check the container log (click the container name → **Log**) — you should see: ``` Memer running at http://0.0.0.0:3000 ``` 5. Navigate to `http://:3000` to confirm it's working. --- ## Method 2 — CLI (Unraid Terminal) SSH into your Unraid server or open a terminal via the web UI (Tools > Terminal). ### Create appdata directories ```bash mkdir -p /mnt/user/appdata/memer/images mkdir -p /mnt/user/appdata/memer/db ``` ### Run the container ```bash docker run -d \ --name memer \ --restart unless-stopped \ -p 3000:3000 \ -v /mnt/user/appdata/memer/images:/data/images \ -v /mnt/user/appdata/memer/db:/data/db \ -e PUBLIC_URL="https://meme.alwisp.com" \ -e PORT="3000" \ -e DATA_DIR="/data" \ memer:latest ``` ### Verify it started ```bash docker ps | grep memer docker logs memer ``` You should see the server startup line and no errors. ### Quick health check ```bash curl -s http://localhost:3000/api/tags # Should return: [] ``` --- ## Reverse Proxy (Nginx Proxy Manager) If you're using Nginx Proxy Manager to serve `meme.alwisp.com`: 1. **Proxy Hosts** → **Add Proxy Host** 2. Set: - **Domain Names:** `meme.alwisp.com` - **Scheme:** `http` - **Forward Hostname / IP:** your Unraid LAN IP (e.g. `192.168.1.100`) - **Forward Port:** `3000` - Enable **Block Common Exploits** 3. On the **SSL** tab, request a Let's Encrypt certificate. 4. Make sure `PUBLIC_URL` in the container matches `https://meme.alwisp.com` exactly — this is what share links are built from. --- ## Updating the Container ### GUI Docker tab → click the container → **Force Update** (or remove and re-add with the same settings). ### CLI ```bash # Pull or load the new image first, then: docker stop memer docker rm memer docker run -d \ --name memer \ --restart unless-stopped \ -p 3000:3000 \ -v /mnt/user/appdata/memer/images:/data/images \ -v /mnt/user/appdata/memer/db:/data/db \ -e PUBLIC_URL="https://meme.alwisp.com" \ -e PORT="3000" \ -e DATA_DIR="/data" \ memer:latest ``` Data is safe — it lives in the host paths, not in the container. --- ## Backup Everything is in two host directories: ```bash # Backup tar -czf memer-backup-$(date +%F).tar.gz \ /mnt/user/appdata/memer/images \ /mnt/user/appdata/memer/db # Restore tar -xzf memer-backup-.tar.gz -C / ``` The SQLite database file is `/mnt/user/appdata/memer/db/memer.db`. Image files are organized by upload month under `/mnt/user/appdata/memer/images/YYYY-MM/`. --- ## Variable Reference | Variable | Default | Description | |---|---|---| | `PUBLIC_URL` | `http://localhost:3000` | External URL embedded in share links — must match your domain | | `PORT` | `3000` | Port the Node server listens on inside the container | | `DATA_DIR` | `/data` | Root path for images and DB inside the container — do not change unless remapping volumes |