docker.recipes

Standard Notes Server

advanced

End-to-end encrypted notes application server.

Overview

Standard Notes is an open-source, end-to-end encrypted notes application that prioritizes privacy and data ownership. Originally launched in 2016 by Mo Bitar, Standard Notes has become a leading privacy-focused note-taking platform that ensures even the server operators cannot read user data, as all encryption and decryption happens client-side. The application supports rich text editing, tagging, nested folders, and an extensive ecosystem of themes and extensions while maintaining zero-knowledge architecture. This self-hosted deployment combines the Standard Notes syncing server with MySQL 8 for robust relational data storage and Redis 7 for high-performance caching and session management. MySQL handles the encrypted note data, user accounts, and metadata with ACID compliance, while Redis provides sub-millisecond response times for real-time synchronization across multiple devices and caches frequently accessed encrypted payloads. This architecture is ideal for privacy-conscious organizations, security professionals, and individuals who want complete control over their note data without sacrificing the convenience of cloud synchronization. The stack offers enterprise-grade reliability with the Standard Notes syncing server handling client authentication and data synchronization, MySQL ensuring data integrity and backup capabilities, and Redis optimizing performance for multiple concurrent users accessing their encrypted notes simultaneously.

Key Features

  • Zero-knowledge architecture where encrypted notes are stored in MySQL but never decrypted server-side
  • Real-time synchronization across devices using Redis for session management and caching
  • MySQL 8 InnoDB storage engine with ACID compliance for reliable encrypted data persistence
  • Redis pub/sub messaging for instant note synchronization between multiple client sessions
  • Standard Notes Extensions API support for custom themes, editors, and productivity tools
  • MySQL full-text search capabilities on encrypted metadata and tags
  • Redis-powered rate limiting and authentication throttling for enhanced security
  • Support for Standard Notes subscription features including encrypted file attachments when configured with appropriate licensing

Common Use Cases

  • 1Privacy-focused teams needing secure collaborative note-taking with complete data ownership
  • 2Healthcare organizations requiring HIPAA-compliant note storage with end-to-end encryption
  • 3Legal firms managing confidential case notes and client information with zero-knowledge architecture
  • 4Security researchers and penetration testers documenting sensitive findings in encrypted notebooks
  • 5Educational institutions providing students with private, encrypted study notes and research storage
  • 6Journalists and activists in restrictive regions needing secure, censorship-resistant note synchronization
  • 7Personal knowledge management for individuals wanting Google Keep or Notion alternatives without data mining

Prerequisites

  • Minimum 2GB RAM (1GB+ for MySQL, 512MB+ for Redis, remainder for Standard Notes syncing server)
  • Docker Engine 20.10+ and Docker Compose V2 for proper container orchestration
  • Port 3001 available for Standard Notes web interface external access
  • Strong database password configured in environment variables for MySQL security
  • Understanding of Standard Notes client app configuration to connect to self-hosted server
  • SSL/TLS termination setup (reverse proxy) recommended for production deployments with HTTPS

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 web:
3 image: standardnotes/web:latest
4 container_name: standardnotes-web
5 restart: unless-stopped
6 ports:
7 - "3001:3001"
8 environment:
9 PORT: 3001
10
11 syncing-server:
12 image: standardnotes/syncing-server-js:latest
13 container_name: standardnotes-sync
14 restart: unless-stopped
15 environment:
16 LOG_LEVEL: info
17 NODE_ENV: production
18 AUTH_SERVER_URL: http://auth:3000
19 REDIS_URL: redis://redis:6379
20 DB_HOST: db
21 DB_PORT: 3306
22 DB_DATABASE: standardnotes
23 DB_USERNAME: standardnotes
24 DB_PASSWORD: ${DB_PASSWORD}
25 depends_on:
26 - db
27 - redis
28
29 db:
30 image: mysql:8
31 container_name: standardnotes-db
32 restart: unless-stopped
33 environment:
34 MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
35 MYSQL_DATABASE: standardnotes
36 MYSQL_USER: standardnotes
37 MYSQL_PASSWORD: ${DB_PASSWORD}
38 volumes:
39 - standardnotes_db:/var/lib/mysql
40
41 redis:
42 image: redis:7-alpine
43 container_name: standardnotes-redis
44
45volumes:
46 standardnotes_db:

.env Template

.env
1DB_PASSWORD=changeme
2# Use official Standard Notes server setup for production

Usage Notes

  1. 1Docs: https://docs.standardnotes.com/self-hosting/
  2. 2Use with Standard Notes client apps (desktop, mobile, web)
  3. 3End-to-end encryption - server never sees unencrypted data
  4. 4Simplified setup shown - see official Docker Compose for production
  5. 5Files subscription required for attachments and some extensions
  6. 6Free tier: unlimited notes, 30-day revision history

Individual Services(4 services)

Copy individual services to mix and match with your existing compose files.

web
web:
  image: standardnotes/web:latest
  container_name: standardnotes-web
  restart: unless-stopped
  ports:
    - "3001:3001"
  environment:
    PORT: 3001
syncing-server
syncing-server:
  image: standardnotes/syncing-server-js:latest
  container_name: standardnotes-sync
  restart: unless-stopped
  environment:
    LOG_LEVEL: info
    NODE_ENV: production
    AUTH_SERVER_URL: http://auth:3000
    REDIS_URL: redis://redis:6379
    DB_HOST: db
    DB_PORT: 3306
    DB_DATABASE: standardnotes
    DB_USERNAME: standardnotes
    DB_PASSWORD: ${DB_PASSWORD}
  depends_on:
    - db
    - redis
db
db:
  image: mysql:8
  container_name: standardnotes-db
  restart: unless-stopped
  environment:
    MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
    MYSQL_DATABASE: standardnotes
    MYSQL_USER: standardnotes
    MYSQL_PASSWORD: ${DB_PASSWORD}
  volumes:
    - standardnotes_db:/var/lib/mysql
redis
redis:
  image: redis:7-alpine
  container_name: standardnotes-redis

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 web:
5 image: standardnotes/web:latest
6 container_name: standardnotes-web
7 restart: unless-stopped
8 ports:
9 - "3001:3001"
10 environment:
11 PORT: 3001
12
13 syncing-server:
14 image: standardnotes/syncing-server-js:latest
15 container_name: standardnotes-sync
16 restart: unless-stopped
17 environment:
18 LOG_LEVEL: info
19 NODE_ENV: production
20 AUTH_SERVER_URL: http://auth:3000
21 REDIS_URL: redis://redis:6379
22 DB_HOST: db
23 DB_PORT: 3306
24 DB_DATABASE: standardnotes
25 DB_USERNAME: standardnotes
26 DB_PASSWORD: ${DB_PASSWORD}
27 depends_on:
28 - db
29 - redis
30
31 db:
32 image: mysql:8
33 container_name: standardnotes-db
34 restart: unless-stopped
35 environment:
36 MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
37 MYSQL_DATABASE: standardnotes
38 MYSQL_USER: standardnotes
39 MYSQL_PASSWORD: ${DB_PASSWORD}
40 volumes:
41 - standardnotes_db:/var/lib/mysql
42
43 redis:
44 image: redis:7-alpine
45 container_name: standardnotes-redis
46
47volumes:
48 standardnotes_db:
49EOF
50
51# 2. Create the .env file
52cat > .env << 'EOF'
53DB_PASSWORD=changeme
54# Use official Standard Notes server setup for production
55EOF
56
57# 3. Start the services
58docker compose up -d
59
60# 4. View logs
61docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/standard-notes/run | bash

Troubleshooting

  • Error 'Connection refused' on port 3001: Ensure syncing-server container has started after database initialization completes
  • MySQL 'Access denied for user' errors: Verify DB_PASSWORD environment variable matches MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD values
  • Standard Notes client sync failures: Check that AUTH_SERVER_URL points to correct syncing-server container and Redis connection is established
  • Redis connection timeouts: Increase Redis memory limits if handling large numbers of concurrent encrypted note synchronizations
  • Database migration errors on startup: Allow extra time for MySQL 8 initialization and Standard Notes schema creation on first run
  • Performance issues with multiple users: Monitor Redis memory usage and consider increasing MySQL innodb_buffer_pool_size for better encrypted data caching

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space