Deploying on Railway

Railway is a modern PaaS platform that lets you run LockMyCal in the cloud without having to manage your own virtual server or Linux packages.


Step-by-step deployment

  1. Sign up or sign in at Railway.app.
  2. Create a new project (New Project) -> choose Deploy from GitHub repo and select your copy (fork) of the repository github.com/lockmycal/lockmycal (the public repository is being prepared). In the service settings, use Dockerfile.railway as the Dockerfile.
  3. Add a PostgreSQL database by clicking + New -> Database -> Add PostgreSQL.
  4. In the settings of the application service (the Variables tab), define the following variables:
    • DATABASE_URL: $ (the connection to the created DB)
    • PHX_HOST: Your domain generated in Railway (e.g. lockmycal-production.up.railway.app) or your own domain
    • SECRET_KEY_BASE: A generated 64-character key
    • DATA_ENCRYPTION_KEY: A generated 48-character key for encrypting tokens to calendars
    • PORT: 4000 (or $ according to Railway)
  5. In the Settings -> Networking tab, generate a public domain (Generate Domain).
  6. Start the deployment (Deploy).

Tip

Railway automatically provides SSL certificates, run monitoring and an automatic restart in case of an outage.