Meta tags:
description= Instructions on how to start developing for Mastodon.;
Headings (most frequently used words):
with, development, setting, up, dev, environment, quick, start, vagrant, manual, install, from, source, working, emails, in, preparing, to, run, tests, useful, commands, for, testing, updating, your, instance, sponsored, by, setup, running,
Text of the page (most frequently used words):
the (36), mastodon (21), your (20), and (20), you (20), admin (18), for (15), #install (14), development (13), with (13), run (11), #environment (11), can (11), vagrant (11), instance (8), emails (8), will (8), bin (7), test (7), server (7), setting (7), new (6), running (6), dev (6), user (6), using (6), source (5), database (5), rails (5), use (5), start (5), api (5), account (5), machine (5), this (4), rails_env (4), any (4), code (4), setup (4), set (4), http (4), processes (4), foreman (4), have (4), from (4), started (4), profile (4), oauth (4), update (3), yarn (3), ruby (3), commands (3), assets (3), preparing (3), developing (3), need (3), postgresql (3), localhost (3), 3000 (3), browser (3), without (3), that (3), default (3), launch (3), create (3), manual (3), once (3), access (3), local (3), search (3), preferences (3), apps (3), reports (3), accounts (3), javascript (2), dependencies (2), bundle (2), updating (2), suite (2), useful (2), testing (2), mode (2), tests (2), sidekiq (2), then (2), gem (2), which (2), working (2), defined (2), streaming (2), are (2), full (2), them (2), port (2), well (2), now (2), log (2), mastodonadmin (2), load (2), into (2), data (2), mastodon_development (2), signed (2), directory (2), own (2), has (2), been (2), certbot (2), nginx (2), instructions (2), guide (2), destroy (2), state (2), virtual (2), plugin (2), convenience (2), hosts (2), file (2), yourself (2), quick (2), notificationpolicy (2), filter (2), report (2), quote (2), domainblock (2), notifications (2), trends (2), collections (2), domain_blocks (2), tokens (2), security (2), implementing (2), posts (2), installing (2), features (2), configuring (2), imprint, view, blog, join, sponsored, last, updated, november, 2025, improve, page, migrations, migrate, packages, gems, check, conformance, our, style, rubocop, rspec, precompile, generate, precompiled, docker, variable, remote_dev, true, order, work, redis, viewed, visiting, letter_opener, called, sending, allows, debug, actually, having, send, via, smtp, letter, opener, give, web, vite, background, jobs, course, those, things, stand, alone, depending, needs, procfile, document, there, multiple, functionality, although, they, selectively, omitted, all, just, one, command, configure, different, generated, number, databases, schema, seed, seeds, mastodon_test, sudo, postgres, createuser, createdb, your_username_here, currently, linux, method, ensure, created, current, ident, following, project, follow, but, not, also, don, brings, its, webserver, proven, successful, over, wsl2, windows, python, pre, requisites, production, reset, fresh, bring, again, changes, reflected, after, saving, files, fully, within, username, password, ssh, may, task, executor, various, hostsupdater, installed, recommended, automatically, allow, manually, editing, repository, includes, vagrantfile, quickly, configuration, binary, executable, through, package, manager, how, webpushsubscription, translation, token, termsofservice, tag, suggestion, statussource, statusedit, status, shallowtag, shallowquote, scheduledstatus, rule, role, relationshipseveranceevent, relationship, reaction, quoteapproval, privacypolicy, previewcardauthor, previewcard, poll, notificationrequest, notificationfallback, notification, mediaattachment, marker, list, identityproof, filterstatus, filterresult, filterkeyword, featuredtag, featureapproval, familiarfollowers, extendeddescription, error, customemoji, conversation, context, collectionwithaccounts, collectionitem, collection, asyncrefresh, application, appeal, annualreport, announcement, measure, ipblock, emaildomainblock, domainallow, dimension, cohort, canonicalemailblock, accountwarning, entities, markers, lists, conversations, timelines, scheduled_statuses, polls, media, statuses, proofs, oembed, push, custom_emojis, announcements, health, grouped, async_refreshes, annual, retention, measures, ip_blocks, email_domain_blocks, domain_allows, dimensions, canonical_email_blocks, tags, suggestions, mutes, followed_tags, follow_requests, filters, featured_tags, favourites, endorsements, bookmarks, blocks, methods, rate, limits, scopes, guidelines, best, practices, datetime, formats, rest, bearcaps, microformats, webfinger, activitypub, spec, compliance, design, reference, creating, themes, css, styling, management, components, frontend, issues, responsible, disclosure, routes, structure, technical, overview, contributing, libraries, implementations, logging, obtaining, client, app, playing, public, getting, roles, webhooks, index, corruption, troubleshooting, errors, moderation, actions, scaling, migrating, backing, upgrading, release, cli, single, sign, captcha, onion, services, object, storage, optional, text, official, ios, android, moving, leaving, externally, more, settings, promoting, others, dealing, unwanted, content, quoting, other, network, posting, signing, what, documentation,
Text of the page (random words):
setting up a dev environment mastodon documentation what is mastodon using mastodon signing up for an account setting up your profile posting to your profile using the network features quoting other posts dealing with unwanted content promoting yourself and others set your preferences more settings using mastodon externally moving or leaving accounts official ios and android apps running your own server running mastodon preparing your machine installing from source configuring your environment configuring full text search installing optional features object storage onion services captcha single sign on setting up your new instance using the admin cli upgrading to a new release backing up your server migrating to a new machine scaling up your server moderation actions troubleshooting errors database index corruption webhooks roles developing mastodon apps getting started with the api playing with public data obtaining client app access logging in with an account libraries and implementations implementing quote posts implementing collections contributing to mastodon technical overview setting up a dev environment code structure routes security issues and responsible disclosure frontend guide components state management css and styling creating themes design tokens reference spec compliance activitypub webfinger security microformats oauth bearcaps rest api datetime formats guidelines and best practices oauth tokens oauth scopes rate limits api methods accounts blocks bookmarks domain_blocks endorsements favourites featured_tags filters follow_requests followed_tags mutes preferences reports suggestions tags admin accounts canonical_email_blocks dimensions domain_allows domain_blocks email_domain_blocks ip_blocks measures reports retention trends annual reports apps emails oauth async_refreshes collections grouped notifications health instance announcements custom_emojis directory trends notifications push oembed profile proofs search statuses media polls scheduled_statuses timelines conversations lists markers streaming api entities account accountwarning admin account admin canonicalemailblock admin cohort admin dimension admin domainallow admin domainblock admin emaildomainblock admin ip admin ipblock admin measure admin report announcement annualreport appeal application asyncrefresh collection collectionitem collectionwithaccounts context conversation customemoji domainblock error extendeddescription familiarfollowers featureapproval featuredtag filter filterkeyword filterresult filterstatus identityproof instance list marker mediaattachment notification notificationfallback notificationpolicy notificationrequest poll preferences previewcard previewcardauthor privacypolicy profile quote quoteapproval reaction relationship relationshipseveranceevent report role rule scheduledstatus search shallowquote shallowtag status statusedit statussource suggestion tag termsofservice token translation v1 filter v1 instance v1 notificationpolicy webpushsubscription setting up a dev environment instructions on how to start developing for mastodon quick start with vagrant manual install from source setup running working with emails in development preparing to run tests useful commands for testing updating your development instance quick start with vagrant for convenience the mastodon repository includes a vagrantfile for quickly setting up a development environment without manual configuration to use this development environment install vagrant using a binary executable or through your package manager once you have vagrant installed for convenience it is recommended to install a plugin to automatically update your machine s hosts file this will allow you to access the dev environment at http mastodon local without manually editing the hosts file yourself to do so vagrant plugin install vagrant hostsupdater the virtual machine can then be started vagrant up once the virtual machine has been started you may launch the foreman task executor to launch the various mastodon processes vagrant ssh c cd vagrant foreman start once the mastodon processes have fully started up you can load http mastodon local in your browser to access the mastodon instance within the vm you can log in as the default admin user with the username admin mastodon local and the password mastodonadmin any changes to the source code will be reflected after saving your files to reset the vm to a fresh state you can destroy it and bring it up again vagrant destroy vagrant up manual install from source you can follow the pre requisites instructions from the production guide but do not create a mastodon user you also don t have to install nginx certbot and python certbot nginx as the development environment brings its own webserver setting up and running a development environment has been proven successful over wsl2 as well if you are on windows setup run the following commands in the project directory bundle install yarn install in the development environment mastodon will use postgresql as the currently signed in linux user using the ident method ensure that you have created a postgresql user and database for your current signed in user sudo u postgres createuser your_username_here createdb you can now create the databases mastodon_development and mastodon_test load the schema into them and create seed data defined in db seeds into mastodon_development rails_env development bin rails db setup you can now launch http localhost 3000 in your browser and log in with the default admin user admin localhost mastodonadmin by default mastodon will run on port 3000 if you configure a different port for it the generated admin account will use that number as well running there are multiple processes that need to be run for the full set of mastodon s functionality although they can be selectively omitted to run all of them with just one command you can install and use foreman gem install foreman no document bin dev this will start processes defined in procfile dev which will give you a rails web server a vite server for assets a streaming api server and sidekiq for background jobs of course you can run any of those things stand alone depending on your needs working with emails in development in development mode mastodon will use a gem called letter opener for sending emails which allows you to debug emails in your browser without actually having to send emails via an smtp server in order to work with emails you ll need sidekiq redis and postgresql running and then emails can be viewed by visiting http localhost 3000 letter_opener if you re developing in docker you ll need to set the remote_dev true environment variable preparing to run tests set up the test database rails_env test bin rails db setup generate test mode precompiled assets rails_env test bin rails assets precompile useful commands for testing bin rspec run the ruby test suite yarn run test run the javascript test suite bin rubocop check the ruby code for conformance with our code style updating your development instance bundle install update ruby gems and install any new dependencies yarn install update javascript packages and install any new dependencies rails_env development bin rails db migrate run new database migrations for your development instance s database last updated november 21 2025 improve this page sponsored by join mastodon blog view source cc by sa 4 0 imprint
|