Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
AI & KI NachrichtenKI-Firmenchefs warnen bei UN-Sicherheitsrat vor Risiken - ZDFheute(24.09.2026 um 09:59 Uhr)
•
Hacking & PentestingVibe Hacking: Hacker erpresst Unternehmen mit Claude Code(24.09.2026 um 10:01 Uhr)
••
Apple iOS & macOSApple plant offenbar größere Home-Offensive für Oktober(24.09.2026 um 09:33 Uhr)
•
Android Tipps & SecurityGoogle veröffentlicht Update, von dem alle Pixel-Handys profitieren(24.09.2026 um 09:08 Uhr)
•
Android Tipps & SecurityHuawei hat geschafft, womit niemand so schnell gerechnet hat(24.09.2026 um 09:40 Uhr)
••
AI & KI NachrichtenThe Wild West of A.I. Needs to End. Here’s How.(24.09.2026 um 08:55 Uhr)
•
YouTube Security VideosGolemDE: Leben als IT-Freiberufler – zwei Perspektiven(24.09.2026 um 07:03 Uhr)
••
AI & KI NachrichtenKI-Firmenchefs warnen bei UN-Sicherheitsrat vor Risiken - ZDFheute(24.09.2026 um 09:59 Uhr)
•
Hacking & PentestingVibe Hacking: Hacker erpresst Unternehmen mit Claude Code(24.09.2026 um 10:01 Uhr)
••
Apple iOS & macOSApple plant offenbar größere Home-Offensive für Oktober(24.09.2026 um 09:33 Uhr)
•
Android Tipps & SecurityGoogle veröffentlicht Update, von dem alle Pixel-Handys profitieren(24.09.2026 um 09:08 Uhr)
•
Android Tipps & SecurityHuawei hat geschafft, womit niemand so schnell gerechnet hat(24.09.2026 um 09:40 Uhr)
••
AI & KI NachrichtenThe Wild West of A.I. Needs to End. Here’s How.(24.09.2026 um 08:55 Uhr)
•
YouTube Security VideosGolemDE: Leben als IT-Freiberufler – zwei Perspektiven(24.09.2026 um 07:03 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Deploying a Rails + SQLite App to a Synology NAS

I built a small CRM for my consulting business using Avo on Rails 8. It tracks contacts, companies, deals, and follow-ups — nothing fancy, but shaped exactly to how I work. Single user. No team access needed. The question was where to run …

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I built a small CRM for my consulting business using Avo on Rails 8. It tracks contacts, companies, deals, and follow-ups — nothing fancy, but shaped exactly to how I work. Single user. No team access needed.



The question was where to run it. A $7/month VPS felt wrong for a tool only I use. I don't need uptime guarantees or global availability — I need it accessible from my laptop, phone, and tablet, wherever I am.



The answer was already sitting in my office: a Synology NAS on my Tailscale network. Rails 8's Solid stack (Cache, Queue, Cable — all SQLite-backed) means the entire app is one process with one database file. That's NAS-friendly. And Tailscale means every device I own can reach it without exposing anything to the public internet.



Here's how I set it up.






The Setup





  • Synology DS918+ — Intel Celeron J3455 (x86_64, quad-core 1.5GHz), 4GB RAM


  • DSM 7.2.2-72806 — Container Manager ships Docker daemon 24.0.2


  • Tailscale installed from Package Center

  • SSH access enabled (Control Panel → Terminal & SNMP)

  • A Rails app with a working Dockerfile (Rails 7.1+ generates one by default)



Rails + Ruby in a container typically consumes 200–400MB. DSM uses around 1–1.5GB. With 4GB total, there's plenty of headroom.






Part 1: Prepare the NAS






Create a deploy user



Create a dedicated user via Control Panel → User & Group → Create.




  • Add to the administrators group (required for SSH access on Synology)


  • Shared folders: Read/Write on docker only, No Access on everything else


  • Application permissions: Deny all — this user only needs SSH, which comes from the administrators group membership



Permissions for the  raw `docker` endraw  user






Set up SSH key authentication



Enable home directories first — without this, ssh-copy-id fails because there's nowhere to put authorized_keys. Go to Control Panel → User & Group → Advanced tab, check Enable user home service.




ssh-copy-id [email protected]
ssh [email protected] # verify passwordless login









Fix the Docker PATH problem



This is the single biggest Synology gotcha. Non-interactive SSH commands (how deployment scripts work) get a limited PATH: /usr/bin:/bin:/usr/sbin:/sbin. Docker lives at /usr/local/bin/docker. It won't be found.



SSH into your NAS interactively:




# Edit sshd_config
sudo vi /etc/ssh/sshd_config
# Find PermitUserEnvironment and set it to: PermitUserEnvironment PATH

# Save the full interactive PATH to your SSH environment file
env | grep PATH | tee ~/.ssh/environment






Reboot the NAS (simplest way to restart sshd cleanly), then verify from your local machine:




ssh [email protected] docker -v
# Should output: Docker version 24.0.2, build 610b8d0







Heads up: DSM updates can reset /etc/ssh/sshd_config. After any major update, re-verify with ssh [email protected] docker -v and re-apply if needed.







Create directories for your app






sudo mkdir -p /volume1/docker/myapp/db
sudo mkdir -p /volume1/docker/myapp/storage

# UID 1000 matches the rails user inside the container
sudo chown -R 1000:1000 /volume1/docker/myapp/db /volume1/docker/myapp/storage









Enable passwordless sudo for Docker commands



The deploy script runs Docker commands over non-interactive SSH, which can't prompt for a password:




ssh [email protected]
sudo sh -c 'echo "deploy ALL=(ALL) NOPASSWD: /usr/local/bin/docker-compose, /usr/local/bin/docker" > /etc/sudoers.d/deploy'
sudo chmod 440 /etc/sudoers.d/deploy
exit






This limits passwordless sudo to just Docker commands — no blanket access.






Set up a local Docker registry



A local registry means images never leave your network.




ssh [email protected] "sudo mkdir -p /volume1/docker/registry/data"






Create the compose file on the NAS:




ssh [email protected] "cat > /volume1/docker/registry/docker-compose.yml << 'EOF'
services:
registry:
image: registry:2
container_name: registry
ports:
-
\"5050:5000\"
volumes:
- /volume1/docker/registry/data:/var/lib/registry
restart: unless-stopped
EOF"







Port 5000 is used by DSM, so the registry maps to 5050. Start it:




ssh [email protected] "cd /volume1/docker/registry && sudo docker-compose up -d"






Verify:




curl http://<nas-tailscale-ip>:5050/v2/
# Should return: {}






Now configure your local Docker client to trust this HTTP registry. The registry runs plain HTTP, but Docker defaults to HTTPS.



OrbStack — edit ~/.orbstack/config/docker.json:




{
"insecure-registries": ["<nas-tailscale-ip>:5050"]
}






Docker Desktop — Settings → Docker Engine, add the same entry.



Restart after the change. This is safe — traffic runs over Tailscale, which is already encrypted.






Confirm Tailscale is working






tailscale status






Note your NAS's Tailscale IP. That's the address you'll use to access the app.






Part 2: Prepare Your Rails App






Configure the database for persistent storage



In config/database.yml, point the production database to a path that will be mounted from the host:




production:
<<: *default
database: /data/production.sqlite3






/data as an absolute path (not relative to /rails) ensures the database lives on the mounted volume and survives container replacements.






Update the Dockerfile



The Rails-generated Dockerfile needs a few modifications.



In the build stage, add Node.js and Yarn for asset compilation (skip this if you're not using Vite/esbuild):




RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential git libyaml-dev pkg-config nodejs npm && \
npm install -g yarn && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives






After COPY . ., install JS dependencies:




RUN yarn install --frozen-lockfile






In the final stage, create the /data directory before switching to the non-root user. This is the part that tripped me up — mkdir /data and chown must happen while still root:




RUN groupadd --system --gid 1000 rails && \
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
mkdir /data && \
chown rails:rails /data

# Copy built artifacts BEFORE switching user
COPY --chown=rails:rails --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
COPY --chown=rails:rails --from=build /rails /rails

USER 1000:1000






If USER 1000:1000 comes before mkdir /data, the non-root user won't have permission to create it.






Build and push the image






# Build for linux/amd64 (DS918+ uses Intel Celeron)
docker build --platform linux/amd64 -t <nas-tailscale-ip>:5050/myapp:latest .

# Push to the local registry
docker push <nas-tailscale-ip>:5050/myapp:latest






The --platform linux/amd64 flag is essential if you're building on Apple Silicon. Without it, you'll get an exec format error when the container starts on the NAS.






Part 3: Deploy to the NAS






The compose file



Create docker-compose.production.yml in your repo:




services:
web:
image: localhost:5050/myapp:latest
container_name: myapp
ports:
- "3000:8080"
environment:
RAILS_ENV: production
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
RAILS_SERVE_STATIC_FILES: "true"
HTTP_PORT: "8080"
volumes:
- /volume1/docker/myapp/db:/data
- /volume1/docker/myapp/storage:/rails/storage
restart: unless-stopped






The port mapping: Rails 8 includes Thruster, a small Go proxy that handles asset caching and gzip. Inside the container, Thruster listens on HTTP_PORT (8080) and proxies to Puma on 3000. Docker maps external 3000 to Thruster's 8080. Thruster can't use its default port 80 because the container runs as a non-root user.



The image address: localhost:5050 because the NAS pulls from its own registry. Your Mac pushes to the Tailscale IP — same registry, different address. Docker trusts localhost by default, so no insecure registry config is needed on the NAS side.






Create the .env file on the NAS



One-time setup — this file stays on the NAS and is never committed:




ssh [email protected] "echo 'RAILS_MASTER_KEY=<your-master-key>' > /volume1/docker/myapp/.env"









The deploy script



Add bin/deploy to your repo:




#!/usr/bin/env bash
set -e

NAS_HOST="[email protected]"
REGISTRY="<nas-tailscale-ip>:5050"
IMAGE="$REGISTRY/myapp:latest"
APP_DIR="/volume1/docker/myapp"

echo "==> Building image..."
docker build --platform linux/amd64 -t $IMAGE .

echo "==> Pushing to local registry..."
docker push $IMAGE

echo "==> Copying compose file to NAS..."
cat docker-compose.production.yml | ssh $NAS_HOST "cat > $APP_DIR/docker-compose.yml"

echo "==> Pulling image and restarting..."
ssh $NAS_HOST "cd $APP_DIR && sudo docker-compose pull && sudo docker-compose up -d"

echo "==> Done! App is live."









chmod +x bin/deploy
bin/deploy






On the first run, the Docker entrypoint runs db:prepare automatically — creates the database and runs migrations. Subsequent deploys run pending migrations on container startup.



Confirm that the container is up and running in Container Manager:



DSM Container Manager showing running Rails containers



Open http://<nas-tailscale-ip>:3000 from any device on your Tailscale network.






Backups



This is where running on a NAS pays off.






HyperBackup



The database lives at /volume1/docker/myapp/db/ as a regular file on the NAS filesystem. Include it in any HyperBackup task — to an external drive, another NAS, or a cloud destination.



This is a real advantage over Docker named volumes, which are hidden in /volume1/@docker/volumes/ and invisible to File Station and backup tools.



File Station showing the SQLite database file at /docker/myapp/db/ — visible and accessible like any regular file on the NAS, unlike Docker named volumes






Btrfs Snapshots



The DS918+ supports Btrfs. Use Snapshot Replication for point-in-time recovery — especially useful as a safeguard before running migrations.






Manual backup






sudo cp /volume1/docker/myapp/db/production.sqlite3 \
/volume1/docker/myapp/db/production.sqlite3.backup.$(date +%Y%m%d)









The whole deploy cycle is bin/deploy — build, push to the local registry, restart the container. No CI pipeline, no cloud provider, no monthly bill. The NAS handles backups through the same tools you're already using for everything else on it.



If you're building small Rails apps for yourself or a handful of users, this is a setup worth considering. The Solid stack made the architecture possible. The NAS makes the operations trivial.

CTI Threat Relationship Graph5 Knoten / 4 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - Deploying a Rails + SQLite App to a Synology NAS
id: 04274cd7-8374-4be3-9502-0a9e3d7f2371
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Deploying a Rails + SQLite App" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Deploying a Rails + SQLite App to a Syno.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Deploying a Rails + SQLite App to a Synology NAS

Thematisch verwandte Begriffe: Deploying, Rails, SQLite, Synology · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97056 | SigNoz versions from v0.98.0 up to (but not including) v0.143.0, when co…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger • Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick