Skip to content

Commit 04de069

Browse files
bene2k1RoRoJ
andauthored
chore(tuto): review content overleaf (#4191)
* chore(tuto): review content overleaf * chore(tuto): add content * Apply suggestions from code review Co-authored-by: Rowena Jones <[email protected]> --------- Co-authored-by: Rowena Jones <[email protected]>
1 parent edcacfe commit 04de069

File tree

1 file changed

+111
-90
lines changed

1 file changed

+111
-90
lines changed

tutorials/overleaf/index.mdx

+111-90
Original file line numberDiff line numberDiff line change
@@ -5,79 +5,90 @@ meta:
55
content:
66
h1: Installing Overleaf Community Edition
77
paragraph: This page shows you how to install Overleaf Community Edition on Ubuntu Linux
8-
tags: media Overleaf ubuntu
8+
tags: media Overleaf ubuntu
99
categories:
1010
- instances
1111
dates:
12-
validation: 2024-08-12
12+
validation: 2025-01-09
1313
posted: 2023-10-02
1414
---
1515

16-
Overleaf is a collaborative writing and publishing system that uses LaTeX, a typesetting software that allows for the creation of structured, professional documents online.
16+
17+
Overleaf is a collaborative writing and publishing system that uses LaTeX, a typesetting software that allows for creating structured, professional documents online.
1718

1819
It is particularly favored by academics and professionals for producing scientific documents, research papers, theses, and presentations due to its precise formatting and styling capabilities. Overleaf also supports real-time collaboration between multiple authors.
1920

2021
<Macro id="requirements" />
21-
2222
- A Scaleway account logged into the [console](https://console.scaleway.com)
23-
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23+
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission)
2424
- An [SSH key](/identity-and-access-management/organizations-and-projects/how-to/create-ssh-key/)
25-
- An [Instance](/compute/instances/how-to/create-an-instance/) running on the Docker image or with Docker installed
25+
- An [Instance](/compute/instances/how-to/create-an-instance/) with Docker installed and at least **30 GB of storage**
2626
- Installed `git` on your Instance
27-
For optimal performance, we recommend running this tutorial on an Instance with more than 30 GB of storage.
28-
29-
<Message type="tip">
30-
Make sure to run this tutorial on an Instance running the [Docker InstantApp image](/tutorials/docker-instantapp/) or make sure [Docker is installed](/tutorials/install-docker-ubuntu-jammy-jellyfish/) on the Instance, as Overleaf requires Docker.
31-
</Message>
27+
- Properly configured DNS A/AAAA records pointing to your Instance's public IP
3228

33-
## Installing Overleaf community edition
34-
35-
1. Connect to your Instance using SSH:
36-
```
29+
### Preparing the environment
30+
1. SSH into your Instance:
31+
```bash
3732
ssh root@<YOUR-INSTANCE-IP>
3833
```
39-
2. Use `git` to download the Overleaf code repository:
34+
2. Ensure Docker is installed:
35+
- If Docker is not installed, follow the [Docker Installation Guide](/tutorials/install-docker-ubuntu-jammy-jellyfish/).
36+
- Verify Docker installation:
37+
```bash
38+
docker --version
39+
```
40+
41+
3. Create a directory for Overleaf:
42+
```bash
43+
mkdir -p /opt/overleaf-toolkit
44+
cd /opt/overleaf-toolkit
4045
```
46+
47+
4. Clone the Overleaf repository from GitHub:
48+
```bash
4149
git clone https://github.com/overleaf/toolkit.git /opt/overleaf-toolkit
4250
```
43-
3. Enter the Overleaf `overleaf-toolkit` directory.
44-
```
51+
52+
5. Initialize the configuration:
53+
```bash
4554
cd /opt/overleaf-toolkit
46-
```
47-
4. Run the following command to copy the configuration files:
48-
```
4955
./bin/init
5056
```
51-
5. Download and start the Overleaf container and its requirements:
52-
```
57+
58+
6. Start the application and its containers:
59+
```bash
5360
./bin/up
5461
```
55-
<Message type="tip">
56-
* If a web server is already running on port 80, be sure to stop it before executing the above command.
57-
* Downloading and configuring the application for the first start may take some time.
62+
<Message type="note">
63+
If a web server is already running on port 80, stop it before running the command.
5864
</Message>
59-
6. Stop the application by pressing `CTRL+C`.
60-
7. Open the file `./config/overleaf.rc` in a text editor and edit the `NGINX_HTTP_PORT=80` line. Set the value to `NGINX_HTTP_PORT=8877`, then save the file and exit the editor.
6165

62-
## Configuring a systemd script
66+
## Stopping the application and updating Overleaf's configuration
6367

64-
Once Overleaf runs correctly, you can create a systemd daemon service.
68+
1. Stop the application with `CTRL+C`.
69+
2. Edit the Overleaf configuration file:
70+
```bash
71+
nano ./config/overleaf.rc
72+
```
73+
3. Modify the following line:
74+
```bash
75+
OVERLEAF_PORT=80
76+
```
77+
Change it to:
78+
```bash
79+
OVERLEAF_PORT=8877
80+
```
81+
4. Save and exit.
6582

66-
1. Create and open the `/etc/systemd/system/overleaf.service` file in a text editor of your choice and paste the following content into it:
67-
```
68-
[Unit]
69-
Description=Overleaf Community Edition
70-
71-
[Service]
72-
User=root
73-
WorkingDirectory=/opt/overleaf-toolkit
74-
ExecStart=/opt/overleaf-toolkit/bin/up
75-
Restart=always
76-
RestartSec=10
7783

78-
[Install]
79-
WantedBy=multi-user.target
84+
## Configuring a systemd service
8085

86+
1. Create a systemd service file:
87+
```bash
88+
nano /etc/systemd/system/overleaf.service
89+
```
90+
2. Add the following content:
91+
```
8192
[Unit]
8293
Description=Overleaf Community Edition
8394
@@ -91,69 +102,70 @@ Once Overleaf runs correctly, you can create a systemd daemon service.
91102
[Install]
92103
WantedBy=multi-user.target
93104
```
94-
2. Save the file and exit the text editor.
95-
3. Reload systemd by running the following command:
96-
```
105+
3. Save and exit the editor.
106+
4. Reload systemd:
107+
```bash
97108
systemctl daemon-reload
98109
```
99-
4. Enable the `overleaf.service` to be started on reboot:
100-
```
110+
5. Enable and start the service:
111+
```bash
101112
systemctl enable overleaf.service
102-
```
103-
5. Start the Overleaf service:
104-
```
105113
systemctl start overleaf.service
106114
```
107-
6. Check the status of the Overleaf service:
108-
```
115+
6. Check the service status:
116+
```bash
109117
systemctl status overleaf.service
110118
```
111119

112120
## Installing LaTeX packages
113121

114-
The LaTeX packages can now be installed, using TeX Live.
115-
116-
1. Run the following command to launch the Texlive manager update:
122+
1. Update the TeX Live Manager:
123+
```bash
124+
docker exec sharelatex tlmgr update --self
117125
```
118-
docker exec Overleaf Community Edition tlmgr update --self
126+
2. Install the full TeX Live package:
127+
```bash
128+
docker exec sharelatex tlmgr install scheme-full
119129
```
120-
2. Run the following command to launch the full `texlive` installation:
121-
```
122-
docker exec Overleaf Community Edition tlmgr install scheme-full
123-
```
124-
<Message type="note">
125-
The installation of `texlive` may take a while.
126-
</Message>
130+
<Message type="note">
131+
- Replace `sharelatex` with the name of the Share LateX container. Use `docker ps` to find it.
132+
- The installation of `textlive` may take a while and take up a lot of storage space. Ensure your Instance has sufficent storage available.
133+
</Message>
127134

128-
## Configuring Nginx
135+
## Configuring SSL
129136

130-
This tutorial uses [NGINX](https://nginx.org/en/) with [Let's Encrypt](https://letsencrypt.org/) and [CertBot](https://certbot.eff.org/) as an SSL-enabled reverse proxy to secure the connection between the client and our server.
137+
1. Install Certbot and nginx
138+
```bash
139+
apt install python3-certbot-nginx nginx
140+
```
131141

132-
1. Install Certbot on the server:
133-
```
134-
apt install python3-certbot-nginx
135-
```
136-
2. Generate the certificate, by running the following command:
137-
```
138-
sudo certbot --nginx certonly
139-
```
142+
2. Obtain an SSL certificate
143+
```bash
144+
sudo certbot --nginx certonly
145+
```
140146

141-
SSL certificates issued by Let's Encrypt are valid for 90 days. Certbot comes with the option to automatically renew the certificate.
142-
3. Configure a cron job that launches Certbot daily to check the status of the certificate. Open the crontab by typing:
143-
```
147+
3. Add a daily cron job for certificate renewal:
148+
```bash
144149
crontab -e
145150
```
146-
4. Add the following line which will stop Nginx, renew the certificate, and restart the web server daily at 4:30 in the morning:
151+
Add the following line to the crontab:
152+
```bash
153+
30 4 * * * certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
147154
```
148-
30 4 * * * /opt/letsencrypt/certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx start"
155+
156+
## Configuring Nginx
157+
158+
1. Edit the Nginx configuration:
159+
```bash
160+
nano /etc/nginx/sites-enabled/default
149161
```
150-
5. Edit the `/etc/nginx/sites-enabled/default` file so that it looks like the example below. This allows you to configure Nginx in a way that will serve our Overleaf Community Edition site as the default site:
162+
2. Replace the file content with:
151163
```
152164
server {
153165
listen 80;
154166
listen [::]:80;
155167
156-
server_name my.overleave-instance.tld;
168+
server_name my.overleaf-instance.tld;
157169
158170
location / {
159171
return 301 https://$server_name$request_uri;
@@ -164,10 +176,10 @@ This tutorial uses [NGINX](https://nginx.org/en/) with [Let's Encrypt](https://l
164176
listen [::]:443 ssl ipv6only=on;
165177
listen 443 ssl;
166178
167-
server_name my.overleave-instance.tld;
179+
server_name my.overleaf-instance.tld;
168180
169-
ssl_certificate /etc/letsencrypt/live/my.overleave-instance.tld/fullchain.pem;
170-
ssl_certificate_key /etc/letsencrypt/live/my.overleave-instance.tld/privkey.pem;
181+
ssl_certificate /etc/letsencrypt/live/my.overleaf-instance.tld/fullchain.pem;
182+
ssl_certificate_key /etc/letsencrypt/live/my.overleaf-instance.tld/privkey.pem;
171183
include /etc/letsencrypt/options-ssl-nginx.conf;
172184
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
173185
@@ -191,14 +203,23 @@ This tutorial uses [NGINX](https://nginx.org/en/) with [Let's Encrypt](https://l
191203
proxy_read_timeout 3m;
192204
proxy_send_timeout 3m;
193205
194-
access_log /var/log/nginx/Overleaf Community Edition.access.log;
195-
error_log /var/log/nginx/Overleaf Community Edition.error.log;
206+
access_log /var/log/nginx/overleaf.access.log;
207+
error_log /var/log/nginx/overleaf.error.log;
196208
}
197209
}
198210
```
199-
6. Restart Nginx with the following command:
200-
```
211+
<Message type="note">
212+
Replace `my.overleaf-instance.tld` with your Overleaf domain name in the configuration.
213+
</Message>
214+
3. Save and restart Nginx:
215+
```bash
201216
service nginx restart
202217
```
203-
You can now reach your Overleaf installation at `https://<YOUR-INSTANCE-IP>/launchpad`.
204-
Open a web browser and navigate to this page to set up your instance's administrator credentials, log in, and you can start drafting your documents, and invite collaborators to work with you.
218+
219+
## Creating a first admin user
220+
221+
1. Open your browser and navigate to `<http://<YOUR_OVERLEAF_DOMAIN>/launchpad/`. A form displays, prompting you to set up your admin account by entering an email and password. After filling in the credentials, click **Register**.
222+
223+
2. Follow the link to the login page (`<http://<YOUR_OVERLEAF_DOMAIN>/login>/`) and enter the credentials you just created. Upon successful login, you'll be directed to a welcome page.
224+
225+
To begin using Overleaf, click the green button at the bottom of the welcome page. For more information on how to use Overleaf, refer to the [official documentation](https://www.overleaf.com/learn).

0 commit comments

Comments
 (0)