[{"data":1,"prerenderedAt":312},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fself-hosting\u002Fdocker":3,"github-stars":309},{"id":4,"title":5,"body":6,"description":300,"extension":301,"meta":302,"navigation":303,"order":58,"path":304,"section":305,"seo":306,"stem":307,"__hash__":308},"docs\u002Fdocs\u002Fself-hosting\u002Fdocker.md","Docker",{"type":7,"value":8,"toc":293},"minimark",[9,13,22,33,42,47,137,146,150,200,208,212,219,223,229,246,250,268,289],[10,11,5],"h1",{"id":12},"docker",[14,15,16,17,21],"p",{},"Clerq publishes a ready-to-run image to the GitHub Container Registry, so you\ndo not have to build anything. Point it at a PostgreSQL database, set three\nenvironment variables, and it runs. The image ",[18,19,20],"strong",{},"applies its own database\nmigrations on startup",", which is what lets it run as a single container on\nany platform.",[23,24,30],"pre",{"className":25,"code":27,"language":28,"meta":29},[26],"language-text","ghcr.io\u002Fpunterdigital\u002Fclerq:latest\n","text","",[31,32,27],"code",{"__ignoreMap":29},[14,34,35,36,41],{},"If you want the database managed for you too, the\n",[37,38,40],"a",{"href":39},"\u002Fdocs\u002Fself-hosting\u002Fdocker-compose","Docker Compose"," setup bundles Postgres in\none command - start there. This page is for running the single app container\nagainst a Postgres you already have.",[43,44,46],"h2",{"id":45},"run-it","Run it",[23,48,52],{"className":49,"code":50,"language":51,"meta":29,"style":29},"language-bash shiki shiki-themes github-dark","docker run -d --name clerq -p 3000:3000 \\\n  -e DATABASE_URL=\"postgresql:\u002F\u002Fuser:password@your-db-host:5432\u002Fclerq\" \\\n  -e BETTER_AUTH_SECRET=\"$(openssl rand -base64 32)\" \\\n  -e BETTER_AUTH_URL=\"http:\u002F\u002Flocalhost:3000\" \\\n  ghcr.io\u002Fpunterdigital\u002Fclerq:latest\n","bash",[31,53,54,85,96,121,131],{"__ignoreMap":29},[55,56,59,62,66,70,73,76,79,82],"span",{"class":57,"line":58},"line",1,[55,60,12],{"class":61},"svObZ",[55,63,65],{"class":64},"sU2Wk"," run",[55,67,69],{"class":68},"sDLfK"," -d",[55,71,72],{"class":68}," --name",[55,74,75],{"class":64}," clerq",[55,77,78],{"class":68}," -p",[55,80,81],{"class":64}," 3000:3000",[55,83,84],{"class":68}," \\\n",[55,86,88,91,94],{"class":57,"line":87},2,[55,89,90],{"class":68},"  -e",[55,92,93],{"class":64}," DATABASE_URL=\"postgresql:\u002F\u002Fuser:password@your-db-host:5432\u002Fclerq\"",[55,95,84],{"class":68},[55,97,99,101,104,107,110,113,116,119],{"class":57,"line":98},3,[55,100,90],{"class":68},[55,102,103],{"class":64}," BETTER_AUTH_SECRET=\"$(",[55,105,106],{"class":61},"openssl",[55,108,109],{"class":64}," rand ",[55,111,112],{"class":68},"-base64",[55,114,115],{"class":68}," 32",[55,117,118],{"class":64},")\"",[55,120,84],{"class":68},[55,122,124,126,129],{"class":57,"line":123},4,[55,125,90],{"class":68},[55,127,128],{"class":64}," BETTER_AUTH_URL=\"http:\u002F\u002Flocalhost:3000\"",[55,130,84],{"class":68},[55,132,134],{"class":57,"line":133},5,[55,135,136],{"class":64},"  ghcr.io\u002Fpunterdigital\u002Fclerq:latest\n",[14,138,139,140,145],{},"On boot the container runs any pending migrations, then starts the app on port\n3000. Open ",[37,141,142],{"href":142,"rel":143},"http:\u002F\u002Flocalhost:3000",[144],"nofollow"," and create your\naccount.",[43,147,149],{"id":148},"required-environment","Required environment",[151,152,153,166],"table",{},[154,155,156],"thead",{},[157,158,159,163],"tr",{},[160,161,162],"th",{},"Variable",[160,164,165],{},"What it is",[167,168,169,180,190],"tbody",{},[157,170,171,177],{},[172,173,174],"td",{},[31,175,176],{},"DATABASE_URL",[172,178,179],{},"Connection string for your PostgreSQL database",[157,181,182,187],{},[172,183,184],{},[31,185,186],{},"BETTER_AUTH_SECRET",[172,188,189],{},"A 32+ character random secret - signs sessions and PDF links",[157,191,192,197],{},[172,193,194],{},[31,195,196],{},"BETTER_AUTH_URL",[172,198,199],{},"The public URL users reach the instance on",[14,201,202,203,207],{},"See ",[37,204,206],{"href":205},"\u002Fdocs\u002Fself-hosting\u002Fenvironment-variables","Environment variables"," for the\nfull reference, including optional Google sign-in.",[43,209,211],{"id":210},"migrations","Migrations",[14,213,214,215,218],{},"Migrations run automatically each time the container starts, using the same\nDrizzle migrations the project ships - they are forward-only and safe to run\nrepeatedly (already-applied migrations are skipped). If you prefer to manage\nmigrations yourself, set ",[31,216,217],{},"CLERQ_SKIP_MIGRATIONS=1"," and the container will boot\nwithout touching the schema.",[43,220,222],{"id":221},"pinning-a-version","Pinning a version",[14,224,225,228],{},[31,226,227],{},"latest"," follows the newest stable release. For production, pin a specific\nversion so upgrades are deliberate:",[23,230,232],{"className":49,"code":231,"language":51,"meta":29,"style":29},"docker run ... ghcr.io\u002Fpunterdigital\u002Fclerq:0.1.0\n",[31,233,234],{"__ignoreMap":29},[55,235,236,238,240,243],{"class":57,"line":58},[55,237,12],{"class":61},[55,239,65],{"class":64},[55,241,242],{"class":64}," ...",[55,244,245],{"class":64}," ghcr.io\u002Fpunterdigital\u002Fclerq:0.1.0\n",[43,247,249],{"id":248},"next-steps","Next steps",[251,252,253,261],"ul",{},[254,255,256,260],"li",{},[37,257,259],{"href":258},"\u002Fdocs\u002Fself-hosting\u002Fproduction","Going to production"," - HTTPS, a reverse\nproxy, and a pre-flight checklist",[254,262,263,267],{},[37,264,266],{"href":265},"\u002Fdocs\u002Fself-hosting\u002Fbackups-and-upgrades","Backups & upgrades"," - keep your\ndata safe and move between versions",[269,270,271],"blockquote",{},[14,272,273,274,278,279,283,284,288],{},"Deploying on a platform with a UI? See the\n",[37,275,277],{"href":276},"\u002Fdocs\u002Fself-hosting\u002Feasypanel","EasyPanel",",\n",[37,280,282],{"href":281},"\u002Fdocs\u002Fself-hosting\u002Fcoolify","Coolify"," and\n",[37,285,287],{"href":286},"\u002Fdocs\u002Fself-hosting\u002Frailway","Railway"," guides - they use this same image.",[290,291,292],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":29,"searchDepth":98,"depth":98,"links":294},[295,296,297,298,299],{"id":45,"depth":87,"text":46},{"id":148,"depth":87,"text":149},{"id":210,"depth":87,"text":211},{"id":221,"depth":87,"text":222},{"id":248,"depth":87,"text":249},"Run Clerq from the published image with a single docker run, pointed at any PostgreSQL database. The image applies its own migrations on startup.","md",{},true,"\u002Fdocs\u002Fself-hosting\u002Fdocker","Self-hosting",{"title":5,"description":300},"docs\u002Fself-hosting\u002Fdocker","rUXzADZGbcagYHnALbUHTXFlZRxeme8v46dsXN4t2LY",{"stars":310,"repo":311},0,"PunterDigital\u002Fclerq",1781535397976]