self-hosted/advanced/railway/README.md
Instructions for railway self-hosting is community maintained. For help, please join the community discord. Thanks to orenaksakal for the work in putting the instructions together.
You can view the ready to deploy template here
or use one click deploy buttons below:
Convex + SQLite
Convex + Postgres
Convex + Mysql
The template comes with pre-configured env-variables and you need to follow some setup steps to make it fully work.
Steps:
Deploying the template
Just deploy the template and enjoy. đ
âšī¸ (Optional): If you would like to separete api and http domains follow steps below:
convex-backend servicePublic Networking sectionGenerate Domain for auto generated one or Custom Domain if you
want to setup custom domain3210 and add your domain for convex (api) url
and select port 3211 for http (action) routesconvex-dashboard and convex-backend servicesGenerating admin key with railway ssh
Follow these instructions to setup railway SSH on your machine
railway ssh and select convex-backend when promptedls and then ./generate_admin_key.shNote that HTTP actions run on your railway app url under the /http path. For
example:
https://self-hosted-backend.railway.app/sendEmailhttps://self-hosted-backend.railway.app/http/sendEmailIf you deployed SQLite template, your data is stored in local SQLite file and
your files are stored in the Railway volume. You can see them in the data
folder if you run:
railway ssh
ls
To store your data in a SQL database of your choice, see these instructions.
The dashboard allows you to see logs, read/write data, run functions, and more. You can run the dashboard locally with Docker, or deploy it to Railway.
convex-dashboarddocker run -e 'NEXT_PUBLIC_DEPLOYMENT_URL=<backend-url>' -p '6791:6791' 'ghcr.io/get-convex/convex-dashboard:latest'
See these instructions.
convex_data volume where your SQLite database and storage lives. If
you run out of space, you can increase the volume to 50GB by upgrading plan.