{"id":13564561,"url":"https://github.com/thedevdojo/larasail","last_synced_at":"2025-04-07T03:18:04.950Z","repository":{"id":41148651,"uuid":"135364166","full_name":"thedevdojo/larasail","owner":"thedevdojo","description":"LaraSail - Set Sail with your Laravel app on DigitalOcean","archived":false,"fork":false,"pushed_at":"2024-10-03T08:01:57.000Z","size":101,"stargazers_count":614,"open_issues_count":4,"forks_count":105,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-31T02:13:08.346Z","etag":null,"topics":["bash","bash-script","hacktoberfest","laravel"],"latest_commit_sha":null,"homepage":"https://devdojo.com/devdojo/larasail-laravel-on-digital-ocean","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedevdojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-29T23:46:47.000Z","updated_at":"2025-03-24T01:09:31.000Z","dependencies_parsed_at":"2024-01-14T03:48:25.671Z","dependency_job_id":"552f74a7-35df-4075-be5d-b4b0f32ff9ee","html_url":"https://github.com/thedevdojo/larasail","commit_stats":{"total_commits":113,"total_committers":11,"mean_commits":"10.272727272727273","dds":0.5309734513274336,"last_synced_commit":"e0a4612f8fd467768363cf24fb9280b9b4028464"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Flarasail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Flarasail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Flarasail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevdojo%2Flarasail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedevdojo","download_url":"https://codeload.github.com/thedevdojo/larasail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247584111,"owners_count":20962075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","hacktoberfest","laravel"],"created_at":"2024-08-01T13:01:32.963Z","updated_at":"2025-04-07T03:18:04.921Z","avatar_url":"https://github.com/thedevdojo.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://s3.amazonaws.com/larasail/logo.svg\" width=\"300\"\u003e\u003c/p\u003e\n\n# LaraSail\n\nLaraSail is a CLI tool for Laravel to help you sail the servers of the [DigitalOcean](https://digitalocean.com/).\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://s3.amazonaws.com/larasail/larasail-command.png\"\u003e\u003c/p\u003e\n\n---\n\nYou'll need a DigitalOcean account before getting started ([Signup here](https://m.do.co/c/6e2fb7e2925f)), then you'll need to create a `New Droplet`. Make sure to select Ubuntu Server:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/21223421/194825321-c91e059f-a862-481e-a928-4f9d7ebce08e.png\"\u003e\u003c/p\u003e\n\n## Installation\n\nSSH into your server and run the following command:\n\n```\ncurl -sL https://github.com/thedevdojo/larasail/archive/master.tar.gz | tar xz \u0026\u0026 source larasail-master/install\n```\n\nYou can make sure it's installed by running:\n\n```\nlarasail -h\n```\n\n## Setup your server\n\n```\nlarasail setup\n```\n\nThe default configuration will install `Nginx`, `PHP 8.2`, and `MySQL 8`. If you wish to use PHP `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1` or `8.3` you can include the argument `php71`/`php72`/`php73`/`php74`/`php80`/`php81`/`php83` like so:\n\n```\nlarasail setup php71 # Install with PHP 7.1\nlarasail setup php72 # Install with PHP 7.2\nlarasail setup php73 # Install with PHP 7.3\nlarasail setup php74 # Install with PHP 7.4\nlarasail setup php80 # Install with PHP 8.0\nlarasail setup php81 # Install with PHP 8.1\nlarasail setup php83 # Install with PHP 8.3\n```\n\n### Database\n\nBy default, LaraSail will set up the latest version of MySQL. To opt for MariaDB instead, kindly pass `mariadb` to `larasail setup` as the second or third parameter like so:\n\n```\nlarasail setup mariadb # will install default PHP version (7.4) and MariaDB\nlarasail setup php80 mariadb # will install the selected PHP version (8.0 in this case) and MariaDB\nlarasail setup mariadb php80 # same as above\n\n```\n\n### Redis\nBy default, LaraSail does not install a Redis server. To opt to install `redis`, pass `redis` option to `larasail setup` as the second or third parameter like so:\n\n```shell\nlarasail setup php82 redis\n```\n\nor\n\n```shell\nlarasail setup redis\n```\n\n## Creating a new site\n\n### :sparkles: Automatically\n\n#### Laravel\n\nAfter setting up the server you can create a new project by running:\n\n```\nlarasail new \u003cproject-name\u003e [--jet \u003clivewire|inertia\u003e] [--teams] [--www-alias]\n```\n\nThis will automatically create a project folder in `/var/www` and set up a host if the provided project name contains periods (they will be replaced with underscores for the directory name). By default, LaraSail sets up the Nginx site configuration and [Let’s Encrypt](https://letsencrypt.org/) SSL certificate for your domain. If you would like both the `www` alias and root domain setup (i.e. `example.com` and `www.example.com`) kindly pass the `--www-alias` flag.\n\n#### Wave\n\n[Wave](https://github.com/thedevdojo/wave) - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams. :rocket: :moneybag:\nLaraSail allows you to create a new Wave project automatically by adding `--wave` flag to the `new` command as follows:\n\n```\nlarasail new \u003cproject-name\u003e [--wave]\n```\n\nJust like Laravel above, this will create a project folder, setup the Nginx site configuration and Let’s Encrypt SSL certificate for your domain. By default, you will be prompted to create a project database and if successful, will migrate and seed the database.\n\n### :construction: Manually\n\nAlternatively, you can clone a repository or create a new Laravel app within the `/var/www` folder:\n\n```\ncd /var/www \u0026\u0026 laravel new mywebsite\n```\n\nIf you want to include [Laravel Jetstream](https://jetstream.laravel.com/) into your project, you need to specify the `--jet` option:\n\n```\ncd /var/www \u0026\u0026 laravel new mywebsite --jet\n```\n\nThen, you'll need to setup a new Nginx host by running:\n\n```\nlarasail host mywebsite.com /var/www/mywebsite --www-alias\n```\n\n`larasail host` accepts three parameters:\n\n1. Your website domain *(mywebsite.com)*\n2. The location of the files for your site *(/var/www/mywebsite/public)*\n3. Optional flag if you would like to include your project's `www` alias: `www.mywebsite.com` *(--www-alias)*\n\nFinally, point your domain to the IP address of your new server. And wallah, you're ready to rock 🤘 with your new Laravel website. If you used the `--www-alias` flag, don't forget to add your domain's www `CNAME` record\n\n## Passwords\n\nWhen installing and setting up LaraSail there are two passwords that are randomly generated:\n\n1. The password for the `larasail` user created\n2. The default MySQL password\n\nTo get the `larasail` user password you can type in the following command:\n\n```\nlarasail pass\n```\n\nAnd the password for the `larasail` user will be displayed. Next, to get the default MySQL root password you can type the following command:\n\n```\nlarasail mysqlpass\n```\n\nAnd the MySQL root password will be displayed.\n\n## Creating a database\n\nAfter you have created your project you can create a database and user for it by using the following command:\n\n```\nlarasail database init [--user larasail] [--db larasail] [--force]\n```\n\nBy default it will create a database and the user `larasail` and grant all permissions to that user.\n\n**TIP**: If you are in the project directory when you run this command, it will also try to update the `.env` file\nwith the newly generated credentials.\n\nAfter you have created a database, you can show the newly generated passwords using the following command:\n\n```\nlarasail database pass\n```\n\n## Switching to the larasail user\n\nWhen you SSH into your server you may want to switch users back to the `larasail` user, you can do so with the following command:\n\n```\nsu - larasail\n```\n\nMake sure to star this repository and watch it for future updates. Thanks for checking out LaraSail. ⛵\n\n## Contributing\n\nIf you are contributing, please read the [contributing file](CONTRIBUTING.md) before submitting your pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevdojo%2Flarasail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedevdojo%2Flarasail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevdojo%2Flarasail/lists"}