Deploy Monica
Open-source personal CRM: remember everything about the people you know
Just deployed
/var/www/html/storage
MariaDB
Just deployed
/var/lib/mysql
Deploy and Host Monica on Railway
Monica is an open-source personal relationship manager, a CRM for the people in your life. It keeps contacts, how they relate to each other, notes, activities, calls, reminders for birthdays and follow-ups, gifts, debts, a journal, documents and photos. It syncs contacts and dates over CardDAV and CalDAV and has an API.
About Hosting Monica
Monica is a Laravel (PHP) app that needs a MySQL or MariaDB database, a folder for uploads and its OAuth keys, and a scheduler for reminder emails. This template runs the official monica:4.1.2-apache image, pinned by digest, built from a public GitHub repo, next to MariaDB 11.8 on the private network. Both keep their data on Railway volumes. On the first start, the app runs its migrations and creates your account from the email you enter and a generated password, so nobody else can sign up on a fresh deploy. After deploy, open the domain, sign in with that email and the password from the Monica service's Variables tab, and change it.
Common Use Cases
- Remember birthdays, family members, kids' names and what you last talked about with friends and relatives
- Keep track of business relationships, calls, meetings and favours owed or given
- Keep a private journal and sync contacts and important dates to your phone over CardDAV and CalDAV
Dependencies for Monica Hosting
- MariaDB 11.8 (included, private network, own volume)
- A Railway volume for uploads, photos and Monica's OAuth keys (included)
Deployment Dependencies
- Monica source and releases: https://github.com/monicahq/monica (v4.1.2)
- Official Docker image: https://hub.docker.com/_/monica
- Template repo: https://github.com/aalfath/monica-railway-template
- Configuration reference: https://github.com/monicahq/monica/blob/v4.1.2/.env.example
Implementation Details
You enter one value at deploy, MONICA_ADMIN_EMAIL. The password (MONICA_ADMIN_PASSWORD), APP_KEY, HASH_SALT and the database passwords are generated. Public sign-up stays closed; invite more users from Monica's settings. Optional features are added as variables on the Monica service: email (MAIL_MAILER=smtp, MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_FROM_ADDRESS) for reminders and invitations, and weather (ENABLE_WEATHER=true plus your own WEATHERAPI_KEY). If you add a custom domain, set APP_URL to it. CardDAV and CalDAV live at https://YOUR-DOMAIN/dav/. Railway doesn't order service startup: if the very first Monica deploy starts while MariaDB is still initialising and the page shows an error, redeploy the Monica service once.
Updates: new Monica versions are merged into the template repo, and Railway then shows you an "update available" notice. You choose when to apply it, and migrations run on start. Back up both volumes first.
Why Deploy Monica on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Monica on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
MONICA_ADMIN_EMAIL
Login email of your Monica account, created on the first start.
MariaDB
mariadb:11.8.9