Warning
- When you are coming from version 1 (most likely 1.0.15), you MUST read the Migration Instructions below!
- Note: A tag like
...-testing.1is a non-stable version and (obviously) used for testing. Please backup your data and help testing the new version 2 โค๏ธ The first stable release of version 2 will probably be published in a few weeks.
DailyTxT is an encrypted Diary/Journal WebApp with several features. It is written in Svelte and Go and meant to be run by Docker - supports AMD64 and ARM64.
๐ฃ๏ธ๐ You want to add new languages? See TRANSLATION.md for instructions.
โ๏ธ You have questions, new feature requests or want to report bugs? Please open a new issue.
- Features
- Usage Tips
- Installation
- Migration Instructions
- About encryption and data storage
- Changelog
- Start developing
- Encryption: Everything you write is encrypted before it's written to the server's storage. Even the admin can't read your private stuff!
- File-Upload: You can upload arbitrary files for each day (500 MB max each). They are stored encrypted on the server as well. Images are automatically recognized and added to the...
- Image Viewer: View all images of a day in a gallery view and in full screen.
- Markdown: You can write your entries in markdown and see a live preview.
- Tags: You can add tags to your entries for better organization.
- Search: You can search for any word, tag or filename in your entries.
- Custom Templates: You can create and use custom templates for your entries.
- Read Mode: A distraction-free mode for reading your entries of each month.
- Multi-Language: DailyTxT is currently available in German and English. New languages can be added easily, see TRANSLATION.md for instructions.
- Export to HTML: You can export your entries (including uploaded files) to HTML format.
- Mobile: Responsive design for easy use on mobile screen. Additionally: allows installation as a PWA (Progressive Web App) to your Homescreen.
- Multi-User: You can create multiple User Accounts. Each account uses its own encryption key.
- Admin Panel: You can (among other things) manage users and open registration for 5 minutes.
- Statistics Panel: Each user can see some statistics about his entries (among other things there is a GitHub-like statistic of your entry-distribution).
- Update Notification: You will be notified about new docker images.
- You can swipe left/right in the calendar to change months.
- You can swipe left/right in the date-area above the editor to switch between days.
- Use Alt + Left/Right (or Ctrl + Option + Left/Right on Mac) to switch between days.
- Drag'n'drop files into DailyTxT to upload them.
- The editor saves automatically. Green border means everything is saved, orange border means unsaved changes.
- You can change the order of files (and images!) by dragging them (at the left side) in the file list.
- A yellow dot in the calendar means, that there are uploaded files for this day.
- The orange button in the calendar can highlight the current day.
Simply use the docker-compose.yml file provided in this repository. Adjust it to your needs and run
docker compose up -dDaily is intended to be run with Docker and Docker Compose. You can use the provided docker-compose.yml file in this repository. Adjust the environment variables to your needs.
You see it here:
services:
dailytxt:
# choose the correct image tag
image: phitux/dailytxt:2.x.x
container_name: dailytxt
restart: unless-stopped
volumes:
# Change the left path to your needs
- ./data:/data
environment:
# Create a secret token by running: openssl rand -base64 32
- SECRET_TOKEN=...
# If you want to have the json-files pretty-printed, set some indent.
# (Otherwise just remove the line)
- INDENT=4
# Allow new user registrations.
# I strongly recommend to keep this disabled except for the first user.
# You can later temporarily enable it again in the admin panel.
- ALLOW_REGISTRATION=true
# Set the Admin-Password (for the admin-panel).
- ADMIN_PASSWORD=your_admin_password
# After how many days shall the login-cookie expire?
- LOGOUT_AFTER_DAYS=40
# Set the BASE_PATH if you are running DailyTxT under a subpath (e.g. /dailytxt).
# - BASE_PATH=/dailytxt
ports:
# Change the left port to your needs.
# You often would only see 8000:80. But this way, port 8000 is publicly accessible (without TLS!).
- 127.0.0.1:8000:80When coming from version 1 (most likely 1.0.15), please follow these instructions carefully!
โก TLDR:
- BACKUP YOUR DATA (the whole data directory you used for version 1).
- Use the new
docker-compose.ymlfile and adjust the environment variables accordingly. - Use the same data directory ('volume') as before. Start the new docker image.
- You will probably have to clear browser cache (only of the dailytxt-site) to be able to load the new version at all. You will also have to delete and reinstall the Apps on your mobile devices (if you used that).
- Migration starts automatically when an "old" user logs in for the first time.
๐ More details:
When coming from version 1, you will run into server-errors, if you're only updating the docker image tag. This is because version 2 is a full rewrite and exposes a different internal port (now 80).
Additionally, more or less all environment variables have changed.
Other than that, an automatic migration is implemented. When starting a docker-image of version 2, the server will check, if the data directory contains data from version 1. If so, all "old" data is moved into a subdirectory called "old". Whenever a user now logs in, the server checks, it the user is present in the new data. If not, it checks if the user is present in the "old" data. If so, the migration to the new format is automatically started. In this process, all "old" data is decrypted with the old algorithm and directly re-encrypted with the new one! This works pretty fast and should not take longer than a few seconds per user (heavily depending on the amount of uploaded files).
When all "old" users have logged in once (and it is ensured, that all data has been migrated successfully!), you can delete the "old" subdirectory in your data directory. This is either possible directly in your file system or via the Admin Panel in DailyTxT (there is a button to delete the "old" directory).
๐ For encryption ChaCha20-Poly1305 is used.
When a user logs in, a key is derived from his password with Argon2id, it is called the derived key. The derived key is stored in a http-only cookie and send on every API-call. This key is used to decrypt the user's encryption key (which is randomly generated when the user is created). The encryption key is used to encrypt/decrypt all data of this user (entries and uploaded files) and never leaves the server.
When a user changes his password, the encryption key is decrypted with the old derived key and re-encrypted with a new derived key (derived from the new password).
There is no E2E-encryption used on client-side, because the search-functionality would not work then. All data would have to be sent to client-side for searching.
There are also backup-keys available which can be used as a password-replacement. When they are created, they store the derived key encrypted with a random backup key. These backup keys are shown to the user only once and are to be stored safely by him. When a user loses his password, he can use this backup key to decrypt the derived key and from that the encryption key.
All data is stored in json-files. No database is used, because the main goal is to guarantee highest portability and longterm availability of the data.
Warning
Always backup your data before updating to a new version!
I use some sort of semver for versioning. But I do not guarantee any backward-compatibility! In Version A.B.C:
- A is a complete new major version
- B provides new features and languages
- C is for bug fixes.
Additionally there are tags like A.B.C-testing.1 (...testing.2 etc.) for non-stable versions. These versions are not meant to be used in production, but for testing new features and bug fixes before they are released in a stable version.
The old version 1 is moved to the v1 branch.
2.0.0-testing.7 (2025-11-02)
- Bugfix: Alt + Left/Right to switch days was not working correctly when switching months.
2.0.0-testing.6 (2025-10-24)
- Added TB as file-/disksize
- Update package dependencies
2.0.0-testing.5 (2025-10-22)
- Bugfix for wrong day-of-week in calendar
2.0.0-testing.4 (2025-10-22)
- Fixed a bug, that showed wrong weekdays in the calendar
- Added a feature to choose the first day of the week (Monday or Sunday) in the settings.
- When a date is selected, the cursor is now placed at the end of the text (not at the beginning).
- CSS fixes
- Changed Navbar-buttons to dropdown-menu
2.0.0-testing.3 (2025-10-13)
- Updated the migration process in the frontend. When migration fails on serverside, the user now gets notified.
2.0.0-testing.2 (2025-10-13)
- Trying to fix a bug in the migration process by removing unnecessary code (that should validate some data, but was probably harmful instead).
You need Go (at least version 1.24) and Node.js (at least version 24) installed.
cd backendgo mod tidy(orgo mod download)- Set the following environment variables (adjust values):
DATA_PATH=/path/to/dataSECRET_TOKEN=secretALLOWED_HOSTS='http://localhost:5173,http://127.0.0.1:5173,http://someotherhost:5173'INDENT=4DEVELOPMENT=trueALLOW_REGISTRATION=trueADMIN_PASSWORD=adminpasswordLOGOUT_AFTER_DAYS=40
go build && ./backend
cd frontendnpm install- Create the file
vite.config.local.jswith following content (if you need special hosts) - otherwise you have to change thenpm run devcommand inpackage.jsontovite dev(without--config ...):import baseConfig from './vite.config.js'; export default { ...baseConfig, server: { ...baseConfig.server, host: true, allowedHosts: ['somespecialhost'], }, }; npm run dev

